Tag: Hyper-V 3

Hyper-V.nu Event 2012 Videos

A few weeks ago was the Hyper-V.nu Community Event in Amsterdam. Carsten Rachfahl recorded the sessions.

Hyper-V.NU – Keynote – Jaap Wesselius and Peter Noorderijk

Hyper-V.NU – Windows Server 8 Hyper-V Networking – Aidan Finn

listen carefully at 59:00 ;-)

Hyper-V.NU – SCVMM 2012 – Maarten Wijsman

Hyper-V.NU – Windows Server 8 Hyper-V Storage — Hans Vredevoort

Hyper-V.NU – Windows 8 DDDD – Ronald Beekelaar

 



Install CentOS on Windows 8 Hyper-V

For some courses at KTSI we need a CentOS to test some Linux spesific things like Apache and other stuff. The good thing, Windows 8 got Hyper-V and Hyper-V supports CentOS.

With Version 3.2 oft the Linux Integration Services Microsoft fixed also a bug which occurred in Windows 8.

  1. First download CentOS
  2. Download the Linux Integration Services Version 3.2 for Hyper-V
  3. Start Hyper-V Manager and create a new Virtual Machine
  4. Install CentOS 6.x
    centos hyper-v
  5. Reboot the virtual machine
  6. Login as root
    centos hyper-v
  7. Mount the Linux Integration Services ISO from step 2
  8. Now run the following commands in the virtual machine
    sudo mount /dev/cdrom /media
    sudo /media/install.sh

    centos hyper-v

  9. After you the Installation is completed you have to reboot the virtual machine again
    centos hyper-v
  10. done ;-)

 



Hyper-V 3: Import and Export VMs with PowerShell

Hyper-V-Powershell02

Aidan Finn (Virtual Machine MVP) just made a blog post about Hyper-V & PowerShell in Windows Server 8 and how you can enable Hyper-V via PowerShell in Windows Server 8. So this gave me the idea about doing a little more with PowerShell and Hyper-V 3.

I already did a blog post about how you can attach multiple VHDs to a SCSI Controller with PowerShell in Windows Server 8. In this post I will show how easy you can export and import a lot of Virtual Machines.

First you can run a Get-VM Test*, to check which VMs you will export.

 
Get-VM Test*

Now you can export the Virtual Machines

 
Get-VM Test* | Export-VM -Path "C:\VMs"

Now I removed the Virtual Machines in Hyper-V with Powershell (You could also add the -confirm parameter so you don’t have to press “y” for each VM.

 
Get-VM Test* | Remove-VM

And now you can import the Virtual Machines again

 
Get-Childitem "C:\VMs" -Recurse *.xml | Import-VM

Hyper-V-Powershell01

I will post more about PowerShell in Windows 8 and Windows Server 8 (Hyper-V 3) in the next upcommig weeks. If you want know more about what new Hyper-V features and improvments are coming in Windows Server 8, you can read the following blog post: “Hyper-V: Version 3 kills them all

 



Windows Server 8 Hyper-V VHDX improvements

VHDX

With Windows 8 and Windows Server 8 Microsoft released a new file format for Virtual Hard Disk called VHDX.

The VHD format, which was availible since 2005 (Microsoft Virtual PC) and is now used by Microsoft Hyper-V and other Hypervisor, had some limitations.

The latest version of the VHD format was limited to 2TB of size and a block file size of 512bytes.

Now with VHDX Microsoft kills this limitations and brings some other improvements:

  • Supports up to 16TB size
  • Supports larger block file size
  • improved performance
  • improved corruption resistance

At this time you can use the VHDX format only with Windows 8 and Windows Server 8. But you can convert VHDs the VHDX format and VHDX disks back to VHDs.

Windows Server 8 Hyper-V VHDX



Windows Server 8 Hyper-V Network Bandwidth Management

With the new version of Hyper-V which comes with Windows Server 8 Developer Preview you can now manage the Network Bandwidth with a Maximum and a Minimum value.

Bandwidth Management Windows Server 8 Hyper-V

This allows you to create some SLAs for hosted Virtual Machines.

For example this is a possible scenario:

Windows Server 8 Hyper-V Networking

There are a lot of other networking improvments in Windows Server 8 and Hyper-V 3. You can get some of them in my little Overview about new features in Windows Server 8 Hyper-V: Hyper-V: “Version 3 kills them all”.



Hyper-V 3: Attach multiple VHDs via PowerShell

Powershell Hyper-V Attach VHDs
We are already testing some Windows Server 8 installations and to test some of the new storage features I needed to attach a lot of VHDs to a Virtual Machine. Now with this Windows PowerShell script its very easy and fast.

Important:

  • Needs Windows Server 8 (Developer Preview)
  • Needs Hyper-V 3 (Inculded in Windows Server 8 )
  • Needs PowerShell v3 (Also included in Windows Server 8 )
$filePath = "\\storage01\VHDStorage\Virtual Hard Disks\"
$fileName = "server03-disk" # Your VHD will be called yourvhdnameX.vhdx (X = Number)
$serverName = "server03"
$controllerNumber = "0"
[int64]$vHDSizeGB = "100" # in GB
$vHDFormat = "vhdx" # vhdx or vhd
$vHDType = "Dynamic"
$numberofVHDs = "8"
 
 
for ($i=1;$i -le $numberofVHDs; $i++){
 
    $vHDPath = $filePath + $fileName + $i + "." + $vHDFormat
    New-VHD -Path $vHDPath -SizeBytes ($vHDSizeGB * 1073741824) -VHDFormat $vHDFormat -VHDType $vHDType
    Add-VMHardDiskDrive -VMName $serverName -ControllerType SCSI -ControllerNumber $controllerNumber -Path $vHDPath
 
}

The best thing overall is how you fast you can create such scripts with PowerShell v3. It took me like 10-12 minutes to get this thing done, and if you think how I would have to create and attach all of those VHDs with the wizard, I saved myself a lot of time.



Windows 8: Client Hyper-V and boot from VHD

Windows 8 Client Hyper-V

Some days before the BUILD conference, Microsoft released a video about Hyper-V in Windows 8. Now after some days of testing I am already a big fan of the client Hyper-V. It lets me create a perfect lab at work or a development VM and Linux VM’s for KTSI.

It’s a great solution for me. Sure there were other solutions like Virtual PC, Virtual Box and VMware Workstation before, but using the built-in Hyper-V has some advantages which make my life a little easier.

  • PowerShell support – it lets me start up a whole lab environment within seconds. I can really quick import Virtual Machines and start them up. And also do some other cool scripted solutions.
  • Performance – it offers great performance.
  • VHD and VHDX – it’s great to work with one virtual disk format and not have to convert virtual disks. It’s also great together with the boot from VHD feature.
  • Dynamic Memory
  • Remote Management for Hyper-V Servers (like the RSAT)
  • Live Storage Migration – Move a running Virtual Machine from local disk to another local disk, USB or network share and back

Microsoft made also the boot from VHD feature a little simpler.

  1. First Mount the VHD you want to boot. (right click on the VHD and “Mount”)
    mount vhd
  2. Now check the new drive letter of the VHD in my case this is G:
  3. Open the command prompt and type bcdboot G:\windows
    bcdboot
  4. Now your VHD will appear in the boot menu. You can check that by typing bcdedit
  5. and as you can see no sysprep or generalize needed

Here a small list of Hyper-V client features:

  • 32 Virtual CPUs
  • NUMA in VM
  • 512 GB RAM
  • Sleep, Hibernate
  • Management console
  • Manage Hyper-V Server from this console
  • Snapshots
  • Up to 1024 running VM’s
  • VHD, and VHDX (up to 16TB)
  • Dynamic disks, Differencing disks, pass through disks, fixedsize disks
  • 4K sector size
  • DMTF comliant WMI
  • Networking offloads
  • Live Storage Migration
  • Native VHD boot
  • Dynamic Memory
  • Remote Management
  • PowerShell
  • Export snapshots
  • Resource Pools
  • External, Internal and Private Networks
  • Bi-Direction audio
  • Enlightened IDE & SCSI controllers
  • Hyper-V on SMB
  • up to256 virtual drives
  • up to 12 virtual NICs
  • VLAN support
  • 3D Graphics (Software)
  • Mutli Touch
  • USB redirection (with RDP)
  • Wireless NICs
  • Export & Import VMs
  • Hyper-V Extensible Switch
  • VHDX Resiliency

Supported Operating Systems:

  • Windows XP SP3
  • Windows Server 2003 SP2
  • Windows Server 2003 R2 SP2
  • Windows Vista
  • Windows Server 2008
  • Windows 7
  • Windows Server 2008 R2
  • Windows Storage Server 2008 R2
  • Windows Home Server 2011
  • Windows SBS 2011
  • Windows 8
  • Windows Server 8
  • CentOS 5.2-5.6
  • CentOS 6.0
  • Red Hat Enterprise Linux 5.2-5.6, 6.0, 6.1
  • SUSE Linux Enterprise 10, 11

In my opinion Client Hyper-V is a great solution and lab to go for Developers, IT Pros, Testers, Sales people and a lot more.