Learn about Windows PowerShell
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:\VHD\MyDrive.vhdx -SizeBytes 60GB
ADD-VMHardDiskDrive -vmname "My Virtual Machine" -path C:\VHD\MyDrive.VHDX -ControllerType SCSI
"Use PowerShell to Add Disks to a Live Virtual Machine"
"First, stop the virtual machine"
Guys...How is this 'Live'?
I agree, the title is more than a little misleading.
i wouldn't call it misleading but instead a misinterpretation. If your VM already has a SCSI controller attached to it then the title 'Use PowerShell to Add Disks to a Live Virtual Machine' is truthful but if you don't the way you go about being able to add drives to live VMs is explained
'Live' has many different interpretations. It can be dependent on 'planet', on how much coffee you have had and by religion. To animists 'live' includes rocks and blocks and on the things that don't go bump in the night.
Have you looked under you bed lately?
It's just the beast under your bed
In your closet in your head
haa! haa! ha! ha! ha!
Look up Hyper-V's 'live migration' to see what MS defines as 'live'.
(It means a running VM...)
p.s. Cut down on the weed man
Hey - it's Friday and I just finished the deployment from Hell.
No weeds - I have my lawn done by a really excellent landscaper.
hehe... I sympathize.
I hope it all went well, or you'll know on monday I guess ;-)
@ALL Sorry for the confusion caused by the title ... often brevity is the causality of clarity -- or is it vice versa. Anyway thanks for helping to me to keep it real.
I understood that 'live' was a transient state even if no once else could see that.
What do they say? "Live is what you make of it."