Hi
I didn't found how to attached a existing disk on a vm already in use with Powercli
My disk is in the datastore Vol7_Cl3 folder Vm3 and I want to attach it to the vm Vm3
thanks a lot
Nicolas
Looks like there is a typo in the datastore name. Actual name is VD-VM1_v002 whereas, you have used VD-VM1-v002.
Cheers,
Supreet
Use the New-Harddisk cmdlet with the DiskPath parameter.
See Example 3
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Hi, i see the example 4, but i didn't arrive, here what i have done
Capture where my disk is:
Here what i have done:
PS C:\Users\NT.OCAP> New-HardDisk -VM $vm -DiskPath "[VD-VM1-v002] TEMP/IPEARS_1.vmdk"
New-HardDisk : 12/09/2018 09:30:27 New-HardDisk No matching datastore found.
Au caractère Ligne:1 : 1
+ New-HardDisk -VM $vm -DiskPath "[VD-VM1-v002] TEMP/IPEARS_1.vmdk"
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (:) [New-HardDisk], VimException
+ FullyQualifiedErrorId : Client20_VirtualDeviceServiceImpl_NewVirtualHardDisk_DatastoreNotFound,VMware.VimAutomation.ViCore.Cmdlets.Commands.VirtualDevice
.NewHardDisk
Looks like there is a typo in the datastore name. Actual name is VD-VM1_v002 whereas, you have used VD-VM1-v002.
Cheers,
Supreet
The error message seems to state that your datastorename is not correct.
Can you check?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Sorry that what a typo error,
I have check it ....
Thanks a lot, it work
Nicolas
thanks for you command
Have a nice day
Nicolas