one of the Hyper-V components is not running

Oct 20, 2010 at 2:18 PM

Hi James

I've just installed your terrific module on 2008 R2 SP1 Beta Core.

the creation of VM runs apparently smooth:

PS>Import-Module HyperV

PS>$VMname = “Win XP x64”

PS>$VHDname = “c:\VHDs\$($VMname ).VHD”

PS>$newVM = (New-VM $VMname)

PS>Set-VMMemory $newVM 1024MB

PS>Set-VMCPUCount $newVM 1

PS>Add-VMDrive $new  0 0

PS>New-VHD $VHDname 4GB -wait

PS>Add-VMDisk $newVM 0 0 $VHDname 

PS>Add-VMDrive $newVM 1 0 –dvd

PS>Add-VMDisk $newVM 1 0 “C:\ISOs\WinXP_x64.iso” –dvd

PS>Add-VMNIC $newVM -virtualSwitch “Public”

(normal informational output omitted...)


However, the final shot 

PS>VM-Start $newVM -wait

causes failure:

Test-WMIResult : Failed to change state of VM Win XP x64 to: Running'Win XP x64' failed to start. (Virtual machine ID 362498E7-15B5-4600-B541-D1A9A3271E6B)

The Virtual Machine Management Service failed to start the virtual machine 'Win XP x64' because one of the Hyper-V components is not running (Virtual machineID 362498E7-15B5-4600-B541-D1A9A3271E6B).

At C:\Program Files\Modules\HyperV\VM.ps1:709 char:65                 

+ $VM.RequestStateChange($State) | Test-wmiResult <<<<  -wait:$wait -JobWaitText ($lStr_VMStateWaiting -f $State, $Vm.elementName ) `    

+ CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException    

+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Test-WMIResult


What can be the reason? Am I missing something?

Thank you in advance

Oct 22, 2010 at 4:51 PM

It sounds like the hypervisor isn't running, so you can configure but not start VMs. I'd have a dig in the event log for reasons why that might be, but the most common is not enabling virtualization support in the system bios (which requires a complete power cycle once you've done it).