We have a Hyper-V 2012 server with 8 VM's on. We have attached extra virtual hard-drives to each of the computers to store backups on. These drives are stored on a NAS.

After a power failure, we tried to boot the VM's and found that they couldn't be booted without the attached backup drives. We couldn't boot the NAS at that point and so we had to remove all the extra drives manually, boot the VM's and re-attach the drives at a later date when we got the NAS back up and running.

These backup drives are non-essential to the running of the system.

I would like to know if there is a way to boot a VM on Hyper-V 2012 with some of the hard-drives (scsi) missing so that we can recover automatically from a power failure.

  • I'm not judging, but rather just communicating something that will likely affect your ability to get good answers.
    – EEAA
    Dec 4 '12 at 3:13

If your infrastructure is so fragile that a power failure can take it out, that's the problem that you should be focusing on. No NAS should be configured as a single point of failure. Nearly all of them come in a version that can be clustered.

To answer your question, though, no. Hyper-V will not boot a VM with an invalid configuration, and a missing virtual hard disk is an invalid configuration. There's no way Hyper-V could know that that VHD isn't critical to your operation.

Assuming you don't want to solve your power failure problem, there are a couple of things that you could do.

1) Configure the guest VM to use your NAS directly for backup, rather than mounting a VHD stored there. That would allow your VM to boot and do its job, failing only when it comes time to back up.

2) Configure your VMs so that they do not auto-start after a power failure. Write a script that attempts to start them that runs when the machine starts up. Write your script in such a way that, when the VM fails to start, it reconfigures the VM without the missing VHD and then attempts to start it again. Honestly, with PowerShell in Server 2012, this wouldn't be a very hard script to write.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.