Create new vm from existing vhd?

Feb 17, 2009 at 10:58 PM
Great tool, thanks for all of the work you've put in on this!  Is there a way to create a new VM from an existing VHD as in the New VM Wizard?

Feb 26, 2009 at 11:07 AM


Here is what you can do with this awesome library of functions:

$NewVM = New-VM -name "My-VM"

## Add a disk drive to disk controller 0 at position 0
Add-VMDrive $NewVM 0 0

## Attach an existing VHD file
Add-VMDisk $NewVM "C:\MyOS.VHD"