The Deployment Bunny

OS Deployment, Virtualization, Microsoft based Infrastructure…

  • Archives

  • Meta

Archive for the ‘Hyper-V’ Category

Issue – Emulex Nic in Windows Server 2012 R2 with VMQ still does not work

Posted by Mikael Nystrom on September 3, 2014

Today, working at a customer deploying Hyper-V hosts with Emulex CNA1100 we run into issues (did not surprise me, since the issue have been around for more than a year, but I still try and test to see if it ever gets better).

The issue is that VMQ still needs to be disabled on every Emulex NIC. That bad thing is that the issue has been around for a very, very long time. It took a very long time for the vendor to acknowledge the issue and now they state that there is a solution soon to be released. I really hope that, but I have heard it before…

Read more here:

http://blogs.emulex.com/implementers/2014/06/19/microsoft-windows-20122012-r2-hyper-vms-losing-network-connectivity-workaround/

My simple recommendation is to disable VMQ in all Emulex Network adapters if they are installed in Windows Server 2012 R2 or buy something that works and use VMQ.

When they release something that actually works I will remove this blog post.

/m

Posted in Hyper-V | Tagged: | 4 Comments »

PowerShell is King – Create the “missing” VM on all the lab machines

Posted by Mikael Nystrom on July 9, 2014

Lets assume that you are running a class and suddenly someone raise the hand and say “I’m missing one of the VMs…” That is far from god, but wait a minute, what about PowerShell to the rescue?, of course, so here it is:

image

Code snip below:


$servers = 1..21 | ForEach-Object {
“VIAMONSTRA{0:D3}” -f $_
}

foreach ($Server in $Servers)
{
Invoke-Command -ComputerName $Server -ScriptBlock {
HostName
$VMName = “FS01″
$VMMemory = 2048MB
$VMDiskSize = 60GB
$VMNetwork = “Internal”
$VMLocation = “C:\VMs”
New-VM -Name $VMName -Generation 2 -MemoryStartupBytes $VMMemory -SwitchName $VMNetwork -Path $VMLocation -NoVHD | Out-Null
New-VHD -Path “$VMLocation\$VMName\Virtual Hard Disks\$VMName-Disk1.vhdx” -SizeBytes $VMDiskSize | Out-Null
Add-VMHardDiskDrive -VMName $VMName -Path “$VMLocation\$VMName\Virtual Hard Disks\$VMName-Disk1.vhdx” | Out-Null
}
}

 


Posted in Hyper-V, PowerShell | Tagged: , , | Leave a Comment »

Nice to Know–After a long time, Emulex now finally admit that there is an issue in the firmware and help is soon to appear

Posted by Mikael Nystrom on June 22, 2014

The combo of Hyper-V, VMQ, Emulex and lost network connectivity has been a nightmare for a long time. We have tried it all and the ONLY solution that works has been to disable VMQ, which sucks. Just a couple of days ago Emulex posted a note where they state that “some customers” (that is BS!) have reported loss of network connectivity. But there is light in the tunnel, they are working on new firmware so stay tuned for that. The new firmware is about to released mid-July 2014.

You should read the entire story and you can do that here:

http://blogs.emulex.com/implementers/2014/06/19/microsoft-windows-20122012-r2-hyper-vms-losing-network-connectivity-workaround/

/mike

Posted in Emulex, Hyper-V, VMQ, Windows Server 2012 R2 | Tagged: , , | Leave a Comment »

TechEd NA 2014 – The Scripts from my session – DCIM-B309 – Bare Metal OS Deployment in Microsoft System Center 2012 R2 Virtual Machine Manager

Posted by Mikael Nystrom on May 15, 2014

Here is the sample scripts from my session at TechEd NA 2014 (DCIM-B309 – Bare Metal OS Deployment in Microsoft System Center 2012 R2 Virtual Machine Manager: This Is How It Is Done!)

SkyDrive: http://1drv.ms/1n0vTm2

Channel 9: http://channel9.msdn.com/Events/TechEd/NorthAmerica/2014/DCIM-B309

/mike

Posted in Deployment, Hyper-V, SCVMM, System Center Virtual Machine Manager 2012, TechEd | Tagged: | Leave a Comment »

PowerShell is King – Simple resource Metering using PowerShell

Posted by Mikael Nystrom on March 25, 2014

This morning the Big Boss sent an email “There is something wrong, it’s slow, fix it.”

Yes, Sir, no problem Sir, absolutely Sir (you get the picture). Anyway, I know we could have problems, since we are moving around all VM’s to change basically everything from design to hardware, so I needed a fast way to find out on what server, what VM and why. The first thing that comes to mind is the most valuable thing you have in a virtualized platform and that is IOPS, so for a few servers that could be having issues I run this:

 

$ServerNames = "HOST01","HOST02","HOST03","HOST04"

foreach ($ServerName in $ServerNames)

{

Get-VM -ComputerName $ServerName -Verbose| Enable-VMResourceMetering -Verbose

Get-VM -ComputerName $ServerName | Measure-VM | select VMname,AggregatedAverageNormalizedIOPS,AggregatedAverageLatency,AggregatedDiskDataRead,AggregatedDiskDataWritten | ConvertTo-Html > "$ServerName.html" -Verbose

}

MeassureVMSimple

/mike

Posted in Hyper-V, PowerShell, Windows Server 2012 R2 | Tagged: | 1 Comment »

Recording–Windows Server 2012 Hyper-V

Posted by Mikael Nystrom on January 27, 2014

(In Swedish)

För Microsofts räkning så spelade jag in en serie korta filmer, varsågod.

“Mikael Nyström, expert inom setup & deployment och konsult på TrueSec, lär dig att konfigurera Hyper-V och upptäcka alla fördelar med att köra virtuella maskiner i Windows Server 2012. “

/mike

Posted in Hyper-V, Recording, Windows Server 2012 | Tagged: | Leave a Comment »

PowerShell is King – Convert WIM to VHD/VHDX with support for Gen 1 and Gen 2 (BIOS/UEFI) and then some…

Posted by Mikael Nystrom on December 19, 2013

In my line of work, automation is important, since time is the only thing I don’t have. Many years ago I created the WIM2VHD script and that was ok, so when R2 came out I needed to update it to support UEFI. That was easier said then done. The problem is that the UEFI boot process requires fat32, GPT and a bunch of partitions and when using PowerShell to create them the OS will immediately start protecting them after creation which makes it impossible to copy files to the boot partition since it is “protected”, but since I’m a very creative person I found the solution in diskpart. (read about it further down)

Mounting the ISO

I actually have to scripts in this case, one is to mount the ISO that will return the drive letter, kind of handy to have since I need to know the path to the wim file

image

The script to mount the ISO

image

The script to mount the ISO (Text)

————————————————-

# Mount ISO and get driveletter
Param(
[parameter(mandatory=$true,HelpMessage="Please, provide a path to ISO.")]
[ValidateNotNullOrEmpty()]
$ISO
)
Mount-DiskImage -ImagePath $ISO
Write-host (get-date -Format u)" – Mounting =" $ISO
$ISOImage = Get-DiskImage -ImagePath $ISO | Get-Volume
$ISODrive = [string]$ISOImage.DriveLetter+":"
Write-host (get-date -Format u)" – Driveletter is now =" $ISODrive

———————————————–

Getting the correct Index number in the WIM

After the ISO is mounted you can use the Get-WindowsImage commandlet to see what Indexes you have in the WIM file.
The Command Get-WindowsImage – Path d:\sources\install.wim will give me this list.

image

 

Converting the WIM file to the VHDX file

Besides converting the WIM to a VHDX file it also creates the UEFI style disk layout or the BIOS style disk layout. It also give you the opportunity to add the SXS folder to the drive (makes it a bit easier to add .Net framework without internet access or media access) and it will also ask you to add a Tools folder, if you do it will end up in c:\Tools, extremely handy, I usually put things in there that I need, NP++, Sysinternals, 7-Zip, and such.

If you open the script you will one thing that is a bit strange (actually two), when creating the UEFI style disk partition we create the first partition with the WRONG GUID number and that is the way we need to do it, otherwise windows will start protecting the drive, so we create the partition with the GUID for data drive, later on we create a text file and we let diskpart run against that text file that will then change the GUID number to the correct one. scary…

Sample command to create a BIOS based VHDX

.\Create-VHDX.ps1 -SourceFile d:\sources\install.wim -DestinationFile C:\Test\RWS2012R2BIOS.vhdx -Disklayout BIOS -Index 2 -PathtoSXSFolder d:\sources\sxs -PathtoExtraFolder C:\HYDV4\Tools –Verbose

Sample command to create a UEFI based VHDX

.\Create-VHDX.ps1 -SourceFile d:\sources\install.wim -DestinationFile C:\Test\RWS2012R2BIOS.vhdx -Disklayout UEFI -Index 2 -PathtoSXSFolder d:\sources\sxs -PathtoExtraFolder C:\HYDV4\Tools –Verbose

When running it looks like this

I have tested the script on WS2012R2/W8.1 with Hyper-V but it should work on WS2012/W8 as well, just that I don’t have any of those old systems running at home anymore…

image
Since the script is 255 lines of POSH, you better download it from here http://sdrv.ms/1foJ3Wg
/mike

Posted in BIOS, Deployment, Hyper-V, PowerShell, UEFI, Windows 8.1, Windows Server 2012 R2 | Tagged: , | 10 Comments »

Windows Server 2012 R2 Hyper-V – Hands On LAB

Posted by Mikael Nystrom on August 8, 2013

(In Swedish)

Har under våren och sommaren jobbat mycket med Windows Server 2012 R2 och väldigt mycket med Hyper-V vNext och därför ska det bli så förbaskat kul att köra första Hands-On LAB med fokus på Hyper-V baserat på Windows Server 2012 R2, principen är den samma som vi kört tidigare, du bygger en Hyper-V lösning under 3 dagar med i princip alla funktioner som finns, det blir en del UI saker, men framförallt blir det mycket PowerShell då det är det enda sättet att bygga Hyper-V lösningar numera. Då du har tillgång till mer än en server så bygger vi också upp kluster på rätt sätt. Vi snackar LAB på riktigt helt enkelt. Det är inte alltid som det blir fullt, men troligen så vill du vara först med R2 så får du boka upp dej på

http://labcenter.se/Labs#!lab=Mastering_Windows_Server_2012_Hyper_V

(English)

If you are English speaking and you would like to attend to a training on Windows Server 2012 R2 Hyper-V, check out http://www.truesec.com or send an email to per.kimblad@truesec.com

/mike

Posted in Hyper-V, Training, Windows Server 2012 R2 | Tagged: , , | Leave a Comment »

Running DC’s on Hyper-V? – Please read this – Keeping your Virtual Active Directory Domain Controllers Safe

Posted by Mikael Nystrom on July 23, 2013

At the Hyper-v.nu site Hans Vredevoort has written a very important post regarding running DC’s virtualized (which I do and many of our customers), but there are things that should be aware of, so I urge you to read this, like now

http://www.hyper-v.nu/archives/hvredevoort/2013/07/keeping-your-virtual-active-directory-domain-controllers-safe/

/mike

Posted in Hyper-V, Windows Server 2012, Windows Server 2012 R2 | Tagged: , , | 2 Comments »

Nice to Know – Video: Hybrid Cloud (Swedish)

Posted by Mikael Nystrom on July 3, 2013

FrontPage

Jag fick jobbet att spela in en packe filmer, vilket jag nu har gjort, det blev totalt 17 stycken om Windows Server 2012, Windows 8, Office 2013, System Center 2012, Private Cloud, Public Cloud, Partner Cloud kring saker JAG tycker är viktigt att förstå och kunna. Hur kan man ha roligare

Nionde filmen handlar om Hybrid Moln (vilket är skitballt)

/mike

Posted in Azure, Cloud, Hyper-V, SCVMM, System Center 2012, Windows Server 2012 | Tagged: | Leave a Comment »

 
Follow

Get every new post delivered to your Inbox.

Join 3,866 other followers