Summary: Use Windows PowerShell to add disks to a live virtual machine on Hyper-V. How can I easily add disk drives to my virtual machine while it is live?
Use the Add-VMScsiController and Add-VMHardDiskDrive cmdlets.
First, stop the virtual machine, add the SCSI controller, then start the virtual machine:
STOP-VM “My Virtual Machine”
ADD-VMScsiController -VMname “My Virtual Machine”
START-VM “My Virtual Machine”
Now attach disks live:
NEW-VHD -Dynamic C:VHDMyDrive.vhdx -SizeBytes 60GB
ADD-VMHardDiskDrive -vmname “My Virtual Machine” -path C:VHDMyDrive.VHDX -ControllerType SCSI
0 comments