Script to Reboot hyper-v virtual machine with email notification

Hello, I have been playing with this all day today but cannot seem to get it to do what I want. I want to restart 4-6 Virtual machines housed in hyper-v using a script. Then I want to send out an email letting myself know it was successful. Here is what
I have been trying to work with but no matter what I have changed I cant seem to get it to work.
Import-Module Hyper-v
$VM = "server1, server2, server3, server4"
Stop-VM -name $VM
start-sleep -s 240
$getVM = get-vm $vm
if ($getvm.Enabledstate -eq "3"){
$date = Get-date
start-VM -name $vm
start-sleep -s 60
$getVm2 = Get-VM -VM $vm -server HYPERVHOST
if ($getVM2.enabledstate -eq "2") {
$messageParameters = @{
Subject = "$VM reboot status for $((Get-Date).ToShortDateString())"
Body = " The Server $vm has rebooted at - $date. The server is up and operational."
From = "[email protected]"
To = "[email protected]"
SmtpServer = "SMTPSERVER" }
send-mailmessage @messageparameters -bodyashtml
if ($getVM2.enabledstate -ne "3") {
$messageParameters2 = @{
Subject = "$VM reboot status for $((Get-Date).ToShortDateString())"
Body = " The Server $vm has rebooted at - $date. Please check the vm $vm as there may be an issue. It has not fully restarted"
From = "[email protected]"
To = "[email protected]"
SmtpServer = "SMTPSERVER" }
send-mailmessage @messageparameters2 -bodyashtml
 

This line of code looks wrong:
$VM = "server1, server2, server3, server4"
That will assign a single string to the $VM variable. If you intend the $VM variable to contain a list of 4 items, write it this way:
$VM = "server1","server2","server3","server4"
-- Bill Stewart [Bill_Stewart]

Similar Messages

  • Create Hyper-V Virtual Machines with Windows PowerShell searching on hostname

    Dear,
    I’m a starter with PowerShell scripting an I’m looking for a script to create Hyper-V Virtual Machines with Windows PowerShell. The idea behind the script is that when I run the script its first searching for the hostname. I’m migrating 24 locations and each
    location have a different hostname like xxx-SRV001. The script needs to use the first 3 signs from the hostname in this case “xxx” and create 2 VM's with below info:
    Virtual Machine 1 2048MB
    Virtual Machine 2 4096MB
    Location D:\VM\
    I can create VM's with Powershell into Hyper-V so only a script to first searching for the first 3 characters of the hostname is enough.
    Example:
    It's the intention that when the script runs it's looking for the hostname. As example we have hostname 000-SRV001
    If the script see the first 3 characters of the hostname, in this case 000 he need to create 2 VMs with name xxx-SRV002 and xxx-SRV004
    I think it must be something with 
    $hostname = "Get-WmiObject -computername $Machine Win32_Computersystem"
    But then when i'm asking for $hostname he must give me back the hostname and if the hostname is 1 of the 24 locations then he need to create 2 vm's in Hyper-V with above info.
    Can you help me or do you have a script for this? 

    Juste use :
    $vram = 1GB*$vRam
    You not need the "
    Do you have any error with the creation of the VM?
    # Variables
    $VMName = Import-Csv "C:\HyperV\input.csv"
    $VHD = 40GB
    $VMLOC = "C:\HyperV"
    $vSwitch = "External"
    $ISO = "C:\ISO\WinServer2012R2.iso"
    $LocationCode = $env:COMPUTERNAME.Split("-")[0]
    # Create VM Folder
    MD $VMLOC -ErrorAction SilentlyContinue
    Foreach ($VM in $VMNames)
    $Name = $VM.name
    [int64]$vRam = $vm.vram
    $vram = 1GB*$vRam
    $VMName = $LocationCode+$Name
    # Create Virtual Machine
    New-VM -Name $VMName -Path $VMLOC -MemoryStartupBytes $vRam -NewVHDPath "$VMLOC\$VMName\Virtual Harddisks\$VMName.vhdx" -NewVHDSizeBytes $VHD -SwitchName $vSwitch
    # Configure Virtual Machines
    Set-VMDvdDrive -VMName $VMName -Path $ISO
    Start-VM $VMName
    # Configure Virtual Machines
    Set-VMDvdDrive -VMName $VMName -Path $ISO
    Start-VM $VMName
    Error message 
    New-VM : '003' failed to modify device 'Memory'. (Virtual machine ID 8F5F32D7-F1A0-4A68-8B01-CA6661869A1E)
    Invalid startup memory amount assigned for '003'. The minimum amount of memory you can assign to this virtual machine is '32' MB. (Virtual machine ID 8F5F32D7-F1A0-4A68-8B01-CA6661869A1E)
    A parameter that is not valid was passed to the operation.
    At line:20 char:5
    + New-VM -Name $VMName -Path $VMLOC -MemoryStartupBytes $vRam -NewVHDPath "$VM ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidArgument: (Microsoft.HyperV.PowerShell.VMTask:VMTask) [New-VM], VirtualizationOperationFailedException
    + FullyQualifiedErrorId : InvalidParameter,Microsoft.HyperV.PowerShell.Commands.NewVMCommand
    Set-VMDvdDrive : A parameter is invalid. Hyper-V was unable to find a virtual machine with name 003.
    At line:23 char:5
    + Set-VMDvdDrive -VMName $VMName -Path $ISO
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidArgument: (003:String) [Set-VMDvdDrive], VirtualizationInvalidArgumentException
    + FullyQualifiedErrorId : InvalidParameter,Microsoft.HyperV.PowerShell.Commands.SetVMDvdDriveCommand
    Start-VM : A parameter is invalid. Hyper-V was unable to find a virtual machine with name 003.
    At line:24 char:5
    + Start-VM $VMName
    + ~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidArgument: (003:String) [Start-VM], VirtualizationInvalidArgumentException
    + FullyQualifiedErrorId : InvalidParameter,Microsoft.HyperV.PowerShell.Commands.StartVMCommand
    Set-VMDvdDrive : A parameter is invalid. Hyper-V was unable to find a virtual machine with name 003.
    At line:27 char:5
    + Set-VMDvdDrive -VMName $VMName -Path $ISO
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidArgument: (003:String) [Set-VMDvdDrive], VirtualizationInvalidArgumentException
    + FullyQualifiedErrorId : InvalidParameter,Microsoft.HyperV.PowerShell.Commands.SetVMDvdDriveCommand
    Start-VM : A parameter is invalid. Hyper-V was unable to find a virtual machine with name 003.
    At line:28 char:5
    + Start-VM $VMName
    + ~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidArgument: (003:String) [Start-VM], VirtualizationInvalidArgumentException
    + FullyQualifiedErrorId : InvalidParameter,Microsoft.HyperV.PowerShell.Commands.StartVMCommand
    New-VM : '003' failed to modify device 'Memory'. (Virtual machine ID C0FC835E-36D4-462E-BD21-69A75A808E2F)
    Invalid startup memory amount assigned for '003'. The minimum amount of memory you can assign to this virtual machine is '32' MB. (Virtual machine ID C0FC835E-36D4-462E-BD21-69A75A808E2F)
    A parameter that is not valid was passed to the operation.
    At line:20 char:5
    + New-VM -Name $VMName -Path $VMLOC -MemoryStartupBytes $vRam -NewVHDPath "$VM ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidArgument: (Microsoft.HyperV.PowerShell.VMTask:VMTask) [New-VM], VirtualizationOperationFailedException
    + FullyQualifiedErrorId : InvalidParameter,Microsoft.HyperV.PowerShell.Commands.NewVMCommand
    Set-VMDvdDrive : A parameter is invalid. Hyper-V was unable to find a virtual machine with name 003.
    At line:23 char:5
    + Set-VMDvdDrive -VMName $VMName -Path $ISO
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidArgument: (003:String) [Set-VMDvdDrive], VirtualizationInvalidArgumentException
    + FullyQualifiedErrorId : InvalidParameter,Microsoft.HyperV.PowerShell.Commands.SetVMDvdDriveCommand
    Start-VM : A parameter is invalid. Hyper-V was unable to find a virtual machine with name 003.
    At line:24 char:5
    + Start-VM $VMName
    + ~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidArgument: (003:String) [Start-VM], VirtualizationInvalidArgumentException
    + FullyQualifiedErrorId : InvalidParameter,Microsoft.HyperV.PowerShell.Commands.StartVMCommand
    Set-VMDvdDrive : A parameter is invalid. Hyper-V was unable to find a virtual machine with name 003.
    At line:27 char:5
    + Set-VMDvdDrive -VMName $VMName -Path $ISO
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidArgument: (003:String) [Set-VMDvdDrive], VirtualizationInvalidArgumentException
    + FullyQualifiedErrorId : InvalidParameter,Microsoft.HyperV.PowerShell.Commands.SetVMDvdDriveCommand
    Start-VM : A parameter is invalid. Hyper-V was unable to find a virtual machine with name 003.
    At line:28 char:5
    + Start-VM $VMName
    + ~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidArgument: (003:String) [Start-VM], VirtualizationInvalidArgumentException
    + FullyQualifiedErrorId : InvalidParameter,Microsoft.HyperV.PowerShell.Commands.StartVMCommand

  • Backing Up Hyper-V Virtual Machines with dynamic vhdx disks attached

    Hi folks.
    Can i  make an online backup
    for a virtual machine that has a hard drive
    attached  dynamic vhdx running on
    windows server 2012 r2?
    Regards

    I think we should try to duplicate this using diskshadow.exe to create a persistent snapshot and manually copy a VM.
    1) On the hyper-V host open an administrative command prompt.
    2) Run diskshadow.exe - and after it starts enter the following commands as written except for the drive letters used:
       Diskshadow> Set Verbose on
       Diskshadow> Set context Persistent
       Diskshadow> Add Volume X: ALIAS xvol    (Where
    X: is the drive letter of the volume containing the Hyper-V guests you want to make a snapshot for)
       Diskshadow> Begin backup
       Diskshadow> create                   
       Diskshadow>end backup
       DiskShadow> Expose %xvol% S:              (Where S: is a free drive letter)
    3) Now Go into explorer and copy out VM's from the S: Drive which is the live shadow copy and see if that duplicates your problem.
    When you are done, delete the shadow copy in diskshadow using the following command.
       DiskShadow>Delete shadows exposed S:  
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. Regards, Mike J. [MSFT]
    This posting is provided "AS IS" with no warranties, and confers no rights.

  • Hyper-V Virtual machine disappeared

    Hello,
    I am running Windows Server 2008 R2 SP1.  I have the Hyper-V role installed with to virtual machines.  I rebooted yesterday after windows updates loaded and now one of my virtual machine have disappeared.  I have run through hours of technet
    forums trying to find the answer and have come up empty. 
    I checked ProgramData\Microsoft\Windows|Hyper-V\Virtual Machines and the symbolic link is gone.  I tried to recreat it using the mklink command, but every time I recreate the symbolic link to the .xml it comes back as a link to a file folder.
    I checked the acl on the virtual machine .xml on my D: drive and the GUID SID is missing.  I also tried to add it back via the iacls command but it doesn't seem to exist. 
    After all that, I decided to recreate the entire virtual machine, but now I can't create virtual machines.  I get teh following error:
    "Failed to create external configuration store at 'folder path': A required privilege is not held by the client. (Virtual machine ID 0x80070522)"
    After that error I opend azman.msc and verified that the initalstore.xml has the administrators group in it.
    I do not know what else I can do from here.  Any help would be appreciated.

    Hi Jumar2,
    This will help others who are fighting with similar issues.
    Thanks for your sharing .
    Best Regards
    Elton Ji
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • Hyper-V virtual machines disappearing

    Running W10 Enterprise TP with no security software, nothing fancy.
    Twice now my Virtual Machine running locally in Hyper-V Manger have disappeared after a reboot. They are still running in the background by their VHDs being in use, but I can't see them to do anything.
    Last time this happened, I had to remove Hyper-V, reboot, re-add Hyper-V, and the VM appeared. However, there was something wrong with the VM so I deleted it and started over.
    Any ideas?
    My idea of a party is a virtualization server and a room of TechNet DVDs

    @ThrashZone, Thank you but this is an issue that occurs after it has already been up and running.
    @h_vHE I'm running Windows 10. Interesting: Everything has disappeared from C:\Users\Public\Documents\Hyper-V\. However, the virtual machine "IMAGEBASE" appears in C:\ProgramData\Microsoft\Windows\Hyper-V\. Here's a dir /b /s:
    C:\ProgramData\Microsoft\Windows\Hyper-V\data.vmcx
    C:\ProgramData\Microsoft\Windows\Hyper-V\Groups
    C:\ProgramData\Microsoft\Windows\Hyper-V\Groups Cache
    C:\ProgramData\Microsoft\Windows\Hyper-V\IMAGEBASE
    C:\ProgramData\Microsoft\Windows\Hyper-V\Persistent Tasks
    C:\ProgramData\Microsoft\Windows\Hyper-V\Planned Snapshots
    C:\ProgramData\Microsoft\Windows\Hyper-V\Planned Snapshots Cache
    C:\ProgramData\Microsoft\Windows\Hyper-V\Planned Virtual Machines
    C:\ProgramData\Microsoft\Windows\Hyper-V\Planned Virtual Machines Cache
    C:\ProgramData\Microsoft\Windows\Hyper-V\Resource Types
    C:\ProgramData\Microsoft\Windows\Hyper-V\Snapshot Groups
    C:\ProgramData\Microsoft\Windows\Hyper-V\Snapshot Groups Cache
    C:\ProgramData\Microsoft\Windows\Hyper-V\Snapshots
    C:\ProgramData\Microsoft\Windows\Hyper-V\Snapshots Cache
    C:\ProgramData\Microsoft\Windows\Hyper-V\UndoLog Configuration
    C:\ProgramData\Microsoft\Windows\Hyper-V\UndoLog Configuration Cache
    C:\ProgramData\Microsoft\Windows\Hyper-V\Virtual Machines
    C:\ProgramData\Microsoft\Windows\Hyper-V\Virtual Machines Cache
    C:\ProgramData\Microsoft\Windows\Hyper-V\Groups\groupregistry.vmcx
    C:\ProgramData\Microsoft\Windows\Hyper-V\Groups Cache\groupregistry.vmcx
    C:\ProgramData\Microsoft\Windows\Hyper-V\IMAGEBASE\Virtual Hard Disks
    C:\ProgramData\Microsoft\Windows\Hyper-V\IMAGEBASE\Virtual Machines
    C:\ProgramData\Microsoft\Windows\Hyper-V\IMAGEBASE\Virtual Hard Disks\IMAGEBASE.vhdx
    C:\ProgramData\Microsoft\Windows\Hyper-V\IMAGEBASE\Virtual Machines\DC334ED4-B8DF-4EFB-A6F0-10C508E7BA54
    C:\ProgramData\Microsoft\Windows\Hyper-V\IMAGEBASE\Virtual Machines\DC334ED4-B8DF-4EFB-A6F0-10C508E7BA54.vmcx
    C:\ProgramData\Microsoft\Windows\Hyper-V\IMAGEBASE\Virtual Machines\DC334ED4-B8DF-4EFB-A6F0-10C508E7BA54.VMRS
    C:\ProgramData\Microsoft\Windows\Hyper-V\Resource Types\06FF76FA-2D58-4BAF-9F8D-455773824F37.vmcx
    C:\ProgramData\Microsoft\Windows\Hyper-V\Resource Types\118C3BE5-0D31-4804-85F0-5C6074ABEA8F.vmcx
    C:\ProgramData\Microsoft\Windows\Hyper-V\Resource Types\146C56A0-3546-469B-9737-FCBCF82428F4.vmcx
    C:\ProgramData\Microsoft\Windows\Hyper-V\Resource Types\19839BFF-6F04-4B24-B4B5-1AFCCBE729DE.vmcx
    C:\ProgramData\Microsoft\Windows\Hyper-V\Resource Types\353B3BE8-310C-4CF4-839E-4E1B14616136.vmcx
    C:\ProgramData\Microsoft\Windows\Hyper-V\Resource Types\4764334E-E001-4176-82EE-5594EC9B530E.vmcx
    C:\ProgramData\Microsoft\Windows\Hyper-V\Resource Types\4EA4F71F-16E6-4250-99A8-A2315332CC64.vmcx
    C:\ProgramData\Microsoft\Windows\Hyper-V\Resource Types\6A45335D-4C3A-44B7-B61F-C9808BBDF8ED.vmcx
    C:\ProgramData\Microsoft\Windows\Hyper-V\Resource Types\70BB60D2-A9D3-46AA-B654-3DE53004B4F8.vmcx
    C:\ProgramData\Microsoft\Windows\Hyper-V\Resource Types\72027ECE-E44A-446E-AF2B-8D8C4B8A2279.vmcx
    C:\ProgramData\Microsoft\Windows\Hyper-V\Resource Types\78AA0C27-B2BD-45BA-83D1-5F2A8C4C6656.vmcx
    C:\ProgramData\Microsoft\Windows\Hyper-V\Resource Types\7951A5ED-8DC5-42D7-AA8C-9F14C54CEB84.vmcx
    C:\ProgramData\Microsoft\Windows\Hyper-V\Resource Types\B637F347-6A0E-4DEC-AF52-BD70CB80A21D.vmcx
    C:\ProgramData\Microsoft\Windows\Hyper-V\Resource Types\BDE5D4D6-E450-46D2-B925-976CA3E989B4.vmcx
    C:\ProgramData\Microsoft\Windows\Hyper-V\Resource Types\D45268DA-37C5-44DA-B827-B0C55CCB3BDC.vmcx
    C:\ProgramData\Microsoft\Windows\Hyper-V\Resource Types\D92D268E-9AA8-49DD-8C7D-821CEFB5F597.vmcx
    C:\ProgramData\Microsoft\Windows\Hyper-V\Resource Types\DACDCF3F-6F67-4EB8-A4D0-5D93B48A2468.vmcx
    C:\ProgramData\Microsoft\Windows\Hyper-V\Resource Types\ED28BF6C-B698-4513-B8F4-7BDD01E006A2.vmcx
    C:\ProgramData\Microsoft\Windows\Hyper-V\Resource Types\F6293891-F32F-4930-B2DB-1A8961D9CB75.vmcx
    C:\ProgramData\Microsoft\Windows\Hyper-V\Snapshot Groups\groupregistry.vmcx
    C:\ProgramData\Microsoft\Windows\Hyper-V\Snapshot Groups Cache\groupregistry.vmcx
    C:\ProgramData\Microsoft\Windows\Hyper-V\Virtual Machines Cache\DC334ED4-B8DF-4EFB-A6F0-10C508E7BA54
    C:\ProgramData\Microsoft\Windows\Hyper-V\Virtual Machines Cache\DC334ED4-B8DF-4EFB-A6F0-10C508E7BA54.vmcx
    My idea of a party is a virtualization server and a room of TechNet DVDs

  • Hyper V virtual machine randomly loses network connectivity

    I have an extremely odd issue happening on one of my Hyper-V virtual machines.  For no apparent reason and completely sporadically my virtual machine will lose all network connectivity.  It is a linux Vyatta firewall image.  Digging through
    the logs shows nothing at all when the machine actually goes offline, but when the machine starts back up I just get a Warning stating the network driver on my virtual machine loaded but has a different version from the server.  Server Version 3.2 Client
    version 0.2
    I've ran the integrated services setup disk and nothing has fixed this.  When the VM loses connectivity it is for no apparent reason, sometimes at 1am sometimes at noon, just happens.  The only solution is to reboot the VM to bring it back online. 
    Has anyone else seen this or know of a fix for it?  Its starting to slowly drive me insane! 
    Hyper V Server - Windows Server 2008 R2 - Hyper V Manager Version 6.1.7601.17514
    VM - Linux Vyatta Core 6.3

    I tried downloading new integrated services disk setup for linux, but Vyatta wouldn't work with it so I was kind of stuck there.  And not sure where you are talking about changing NIC to legacy at.  I did disable some TCP chimpney settings as
    per an article I found, but not sure if it will fix it or not.  Sometimes the machine will stay on for a month before losing network connection and sometimes it comes in spurts and happens like 3-4 times over a couple days.  Its really odd

  • How to find out whether a program is running in Hyper-V virtual machine or not?

    If I want to make a program which only running in Hyper-V virtual machine, how can I find out whether
    the program is running in Hyper-V  virtual machine or not?

    https://gallery.technet.microsoft.com/scriptcenter/Determine-if-a-computer-is-cdd20473
    http://social.technet.microsoft.com/wiki/contents/articles/942.hyper-v-how-to-detect-if-a-computer-is-a-vm-using-script.aspx
    http://www.grouppolicy.biz/2014/01/how-to-target-group-policy-to-virtual-computers/
    Mike Crowley | MVP
    My Blog --
    Baseline Technologies

  • Hyper-v virtual machine management in status stopping

    Hello,
    I had a problem with one vm showing status backing up.
    I read on TechNet that restarting the hyper-v virtual machine management service would solve the problem.
    I have tried to shutdown the service but it now says status stopping...
    How long time does it take to shutdown the service? Is there anything I can do to hurry it up?
    ps. I have production vm running on the host that I can't take down...
    Regards
    Roger

    Hi Roger,
    I also tested in my lab to disable  that service forcibly ,then I found that it will leads the VMs to unexpected shutdown .
    Based on this ,it seems that restarting the host is necessary .
    Best Regards
    Elton Ji
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • Can i install VS 2013 in my Virtual Machine with Windows 8.1 and work for Mobile Development,Mobile Emulator can work in my Virtual Machine ?

    I have a Virtual Machine with Windows 8.1 OS and 4gb RAM, 200gb Disk.
    I want to develop apps for Windows Mobile 8.1 with VS 2013 Update 4, Mobile Emulators can work in my Virtual Machine, bcz i am getting bellow error.
    Windows Phone Emulator is unable to verify that the virtual machine is running:
    Something happend while starting a virtual machine:'Emulator 8.1 WVGA 4 inch 512MB.APPUSER' failed to start.(Virtual machine ID xxxxxx-xxxxx-xxxx-xxxx-xxxxxxx)
    The Virtual Machine Management Service failed to start the virtual machine 'Emulator 8.1 WVGA 4inch 512MB.appuser' because one of the Hyper-V components is not running (Virtual machine ID xxxx-xxxxx-xxxx-xxxx-xxxx).

    No you cannot do that.  You need a physical machine that supports Hyper-V
    Jeff Sanders (MSFT)
    @jsandersrocks - Windows Store Developer Solutions
    @WSDevSol
    Getting Started With Windows Azure Mobile Services development?
    Click here
    Getting Started With Windows Phone or Store app development?
    Click here
    My Team Blog: Windows Store & Phone Developer Solutions
    My Blog: Http Client Protocol Issues (and other fun stuff I support)

  • Restore of virtual machine with checkpoints W2012 R2 DPM 2012R2

    Hi
    We have some windows 2012 R2 hyper-v standalone hosts where we running a loads of VMs on.
    We backing them up with DPM 2012 R2 with "hyper-v virtual machines backup"
    We have some training machines that was getting corrupted and we need to restore then, is it possible to restore the machines and include
     the checkpoints?
    When I was trying to restore the vhdx that are C: DPM also restored 2 avhdx files that I suppose is the checkpoint files, but then I then create t new VM from the vhdx the checkpoints do not
    pops up.
    I know that in W 2008 R2 hyper-v and DPM 2012 SP1 it was not possible.
    But is it possible now with Hyper-v 2012 R2 and DPM 2012R2?
    thank

    Just for information, it is possible to restore VMs and retain checkpoints. I find out how to do that now.
    Will you share what you found out or post a link to a blog/article etc?
    My Blog | www.buchatech.com | www.systemcenterportal.com
    If you found this post helpful, please give it a "Helpful" vote. If it answered your question, remember to mark it as an "Answer". This posting is provided "AS IS" with no warranties and confers no rights! Always test ANY suggestion
    in a test environment before implementing!

  • Windows 8 Hyper-V - Virtual Machine Management Service failed to start the virtual machine

    I have Hyper-v running on Dell Precision T3600 with Windows 8 OS.  I am trying to start a VM (called Windows8VM) to install Windows 8 in the hyper-v virtual machine, but I keep getting the following message:
    "Windows8VM" failed to start.
    Failed to start the virtual machine "Windows8VM" because one of the Hyper-V components is not running.
    "Windows8VM" failed to start.  (Virtual machine ID D670D3BB-9AE2-0453D-9191-EA6EFC242A9C)
    The Virtual Machine Management Services failed to start the virtual machine "Windows8VM" because one of the Hyper-V components is not running.
    I have turned the hyper-v feature on in the "Turn Windows feature on or off.  The BIOS has virtualization enable.  Help!!! driving me nuts for a week now.
    Nick :(

    Okay,  I turned off hyper-v, went to bios and enabled Intel TXT(LT-SX) Configuration.  Made sure that both Virtualization and VT for Direct I/0 are on.  Next, I turned on Hyper-V and I create a brand new Virtual Machine call Windows8 and had
    the DVD point to Windows8 ISO file on hard drive.  When I clicked on start, it stayed in the Starting status mode for about 5 minutes.  Then of course it failed.  I looked at the Hyper-V-VMMS log and here is what it output:
    Log Name: Microsoft-Windows-Hyper-V-VMMS/Admin
    1) Error: The virtualization infrastructure driver (VID) is not running.
    2) Info:  Found a certificate for server authentication. Remote access to virtual machines is now possible.
    3) Info:  Successfully started the Virtual Machine migration connection manager.
    4) Info:  Virtual Machine Management service is started successfully.
    5) Info:  The WMI provider 'VmmsWmiInstanceAndMethodProvider' has started.
    6) Info:  The WMI provider 'VmmsWmiEventProvider' has started.
    7) Info:  The WMI provider 'VmmsWmiInstanceAndMethodProvider' has started.
    8) Info:  The WMI provider 'VmmsWmiEventProvider' has started.
    9) Info:  The Integration Services Setup Disk image was successfully updated.
    10) Error: The virtual machine bus is not running.
    11) Error: 'Virtual Machine Bus' driver required by the Virtual Machine Management service is not installed or is disabled. Check your settings or try reinstalling the Hyper-V role.
    12) Error: 'Storage Virtualization Service Provider' driver required by the Virtual Machine Management service is not installed or is disabled. Check your settings or try reinstalling the Hyper-V role.
    13) Error:  The Virtual Machine Management Service failed to start the virtual machine 'Window8' because one of the Hyper-V components is not running (Virtual machine ID 2B393AF4-7B7E-4243-805B-23C09D20F4FB).
    14) Error:  'Window8' failed to start. (Virtual machine ID 2B393AF4-7B7E-4243-805B-23C09D20F4FB)
    Nick

  • Cannot start Hyper-V virtual machine

    Hi,
    I have a Windows 2008 Server. It has been now upgraded to Windows 2012. Everything was working fine. But, now I turned off the virtual machine and copied the VHD file to another drive for backup. After this, I am not able to start the old virtual machine.
    (The VHDs are in place. I only copied them) However, two another virtual machines are running now without any problem. While trying to start, I am getting the error "the operation cannot be performed while the object is in its current state". These are
    critical server. Any quick thoughts?
    Thanks
    Tom Jacob

    Hi,
    If possible please restart the Hyper-V host server, then check whether still has such issue.
    If issue still there, launch Event Viewer, check Hyper-V related logs. Post the logs for further troubleshooting.
    And I notice you mentioned turned off the virtual machine, do you mean the VM running well in the past? (I mean after you upgrade server to Windows server 2012)
    Can you export the VM now? Export it then delete the VM from Hyper-V, import the VM again and check the result.
    For more information please refer to following MS articles:
    Hyper-V: Can’t delete Virtual Machine with ‘Opertion cannot be performed while the object in current state’
    http://blogs.technet.com/b/chrad/archive/2010/06/24/hyper-v-can-t-delete-virtual-machine-with-opertion-cannot-be-performed-while-the-object-in-current-state.aspx
    Operation is not valid due to the current state of the object
    http://social.technet.microsoft.com/Forums/en-NZ/ilm2/thread/0646a166-67b1-4322-ba9a-77e3e3ced31d
    Lawrence
    TechNet Community Support

  • Hyper V Virtual Machine Creation

    While we try creating a new virtual machine for our windows phone application, we are facing the following error.
    -Failed to add device 'Virtual Hard disk
    -Hyper V virtual machine management service account does not have permission to open attachment.
    ERROR: General access denied error(0x80070005)

    Unblock whatever it is that you downloaded.
    Check that your antivirus software is set with the proper exclusions.
    I don't recall anyone reporting this error before - as the installer for the phone emulator generally takes care of the machine creation and permissions.
    I can only guess that you are attempting to duplicate the phone emulator VM.  If so, use Export and Import.
    Brian Ehlert
    http://ITProctology.blogspot.com
    Learn. Apply. Repeat.

  • Modify the headless options of the BIOS on a Hyper-V Virtual Machine

    Hi everyone,
    I am attempting to do something which is (surprisingly) complex using a Hyper-V virtual machine.  Using VMware Workstation I have been able to boot from the network using VMware autodeploy.  This loads ESXi 5.5 as the operating system.  This
    works great, but I would like to try to accomplish he same feat using Hyper-V, and I've succeeded.  This creates is a nested ESXi 5.5 host.
    The process was long and painful, but I have gotten to the point that I am able to successfully boot a Hyper-V virtual machine off the network (legacy network card as the boot device) then load the OS.  The only problem is that in order to get it to
    boot I need to hit shift + o during the ESXi boot startup, and enter the following line:
    ignoreHeadless=TRUE
    The problem is that I can't do this manually every time.  To understand how to fix this, I first needed to understand what exactly "ignoreHeadless=TRUE" was doing.  My understanding is that this has to do with the display, specifically:
    "Some systems which have a video display device can be configured to report themselves as headless via the configuration, usually in the system BIOS."
    I believe this is my issue, by default a Windows Hyper-V virtual machine reports itself as headless, therefore you need to ignore this configuration on startup or ESXi thinks there is a display error. 
    My question is, can I fix this from the virtual machine side?  Can I modify the virtual machine so that it does NOT report itself as headless? 

    Hi,
    The Hyper-V is the full virtualization technology, and it must installed on bare-metal computer, personal experience, if you are using the WDS with Hyper-V environment to
    deploy the Windows system, the performance will lower than the physical computer and you must choose the corresponding method if you have the different environment.
    More information:
    Windows Deployment Services Overview
    http://technet.microsoft.com/en-us/library/hh831764.aspx
    Hope this helps.
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • Error Creating VM on 2011 iMac - The Hyper-V Virtual Machine Management service encountered an unexpected error: The remote procedure call failed. (0x800706BE).

    I am running Hyper-V in Windows 8.1 on a late 2011 27 inch iMac. Whenever I try to create a virtual machine I get the error below and Windows warns that it will restart in 1 minute. I tried a clean install of Windows, but my PC still crashes ever
    time I try to create a VM. I was able to successfully use Hyper-V in prior versions of Windows on this same PC. Any clue as to what is going on? A driver? Windows 8.1? Mac Hardware related?
    I see the following two entries in event viewer but have no other clue as to what is happening:
    Log Name:      Microsoft-Windows-Hyper-V-VMMS-Admin
    Source:        Microsoft-Windows-Hyper-V-VMMS
    Date:          1/10/2014 10:48:46 AM
    Event ID:      16000
    Task Category: None
    Level:         Error
    Keywords:     
    User:          SYSTEM
    Computer:      Charles-PC.CHARLESPOOL.local
    Description:
    The Hyper-V Virtual Machine Management service encountered an unexpected error: The remote procedure call failed. (0x800706BE).
    Event Xml:
    <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
      <System>
        <Provider Name="Microsoft-Windows-Hyper-V-VMMS" Guid="{6066F867-7CA1-4418-85FD-36E3F9C0600C}" />
        <EventID>16000</EventID>
        <Version>0</Version>
        <Level>2</Level>
        <Task>0</Task>
        <Opcode>0</Opcode>
        <Keywords>0x8000000000000000</Keywords>
        <TimeCreated SystemTime="2014-01-10T15:48:46.770451300Z" />
        <EventRecordID>58</EventRecordID>
        <Correlation />
        <Execution ProcessID="2488" ThreadID="8704" />
        <Channel>Microsoft-Windows-Hyper-V-VMMS-Admin</Channel>
        <Computer>Charles-PC.CHARLESPOOL.local</Computer>
        <Security UserID="S-1-5-18" />
      </System>
      <UserData>
        <VmlEventLog xmlns:auto-ns2="http://schemas.microsoft.com/win/2004/08/events" xmlns="http://www.microsoft.com/Windows/Virtualization/Events">
          <ErrorMessage>%%2147944126</ErrorMessage>
          <ErrorCode>0x800706BE</ErrorCode>
        </VmlEventLog>
      </UserData>
    </Event>
    Log Name:      Microsoft-Windows-Hyper-V-VMMS-Admin
    Source:        Microsoft-Windows-Hyper-V-VMMS
    Date:          1/10/2014 10:48:46 AM
    Event ID:      16010
    Task Category: None
    Level:         Error
    Keywords:     
    User:          SYSTEM
    Computer:      Charles-PC.CHARLESPOOL.local
    Description:
    The operation failed.
    Event Xml:
    <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
      <System>
        <Provider Name="Microsoft-Windows-Hyper-V-VMMS" Guid="{6066f867-7ca1-4418-85fd-36e3f9c0600c}" />
        <EventID>16010</EventID>
        <Version>0</Version>
        <Level>2</Level>
        <Task>0</Task>
        <Opcode>0</Opcode>
        <Keywords>0x8000000000000000</Keywords>
        <TimeCreated SystemTime="2014-01-10T15:48:46.773497100Z" />
        <EventRecordID>59</EventRecordID>
        <Correlation />
        <Execution ProcessID="2488" ThreadID="8704" />
        <Channel>Microsoft-Windows-Hyper-V-VMMS-Admin</Channel>
        <Computer>Charles-PC.CHARLESPOOL.local</Computer>
        <Security UserID="S-1-5-18" />
      </System>
      <ProcessingErrorData>
        <ErrorCode>15005</ErrorCode>
        <DataItemName>Parameter0</DataItemName>
        <EventPayload>
        </EventPayload>
      </ProcessingErrorData>
    </Event>

    Hi CharlesPool,
    I am assuming that the win8.1 is in-place updated from win8 .
    Maybe you need to check the state of hypervisorlaunchtype .
    If it is off , please run command " bcdedit /set hypervisorlaunchtype auto "
    Best Regards
    Elton Ji
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

Maybe you are looking for

  • How do I check for Malware? I have a 4giga IMac and she is using 3.9 only running Safari.

    I have IMac OSX 10.9.4, 4GB,Processor 3.06 with Intell2Duo. I would like to check for Malware. I run a TechTool Pro 6 every month and that comes up great. When check how much memory I am using, with only Safari open I am using 3.9 and more of her 4.0

  • Small Query help

    small query i have data like below , Month ProductNo CustomerNo     Units Jan 9001 1001-09 100 jan 9002 1002-09 200 jan 9003 1003-09 300 jan 9001 ABCCustomer 400 Jan 9002 1004-09 500 for any record - if column - customerNo starts with numeric it has

  • Please Help - Screen corruption while in Aperture - graphics card problem?

    Over the past few weeks, I have noticed frequent screen corruption within the confines of the image that I am currently editing. The corruption only occurs when in Aperture. The corruption occurs as multiple thin (one pixel?) horizontal lines of rand

  • File Content Conversion at the receiver side

    Hello All, I have a field which has to be truncated at 50th character. What content conversion parameters do I need to add ...?!?!? Thanks, Smita

  • Business System not imported to Integration Builder

    Hi, I have created the Business System in SLD and when I imported that into the Integration Repositoty, I am unable to locate the same. Could anyone let me know the problem in this? Regards, Ram Mohan Naidu