On a running VM I would like to add some new harddisks. Those disks should be spread out on new virtual ScsiControllers.
This is done very easily in GUI. But PowerCLI seeams unable to do this on a PoweredON VM.
- New-Harddisk can take Controller as a parameter, but since the controller does not exist yet....
- New-Scsicontroller can take disks as a parameter, but can not change when VM is poweredOn. And I cannot create a SCSI-controller without any disks.
Moment-22
So I have to resort to GUI. Or? Ideas are welcome!
/ChZ
Moment 22 is translated to Catch 22 in english... :smileysilly:
Hmmmm did you try this
----- Example 1 --------------
$vm = Get-VM VM | New-HardDisk -CapacityKB 10485760 | New-ScsiController
http://www.vmware.com/support/developer/PowerCLI/PowerCLI41U1/html/New-ScsiController.html
Yes. No luck.
Yeah it looks like it must be power off if you use those cmdlets. have you tried using "VirtualMachineConfigSpec" ?
http://www.vmware.com/support/developer/vc-sdk/visdk400pubs/ReferenceGuide/vim.vm.ConfigSpec.html
See LucD example
http://www.lucd.info/2009/12/08/switching-to-the-paravirtual-scsi-controller/
That isnt working either...