VMware Cloud Community
rub1
Contributor
Contributor

attaching existing virtual disks ( *.vmdk) to a running vm with CLI

Hello

how can I attach with vi-perl existing virtual disk ( *.vmdk) to a running virtual machine ?

with the vSphere GUI it is possible.

I have found only a way to create and attach a NEW virtual disk with the script:

http://www.vmware.com/vmtn/technology/developer/sample-code/exaddvirtualdisk.html

thank you for any hint

S. Rubens

0 Kudos
2 Replies
lamw
Community Manager
Community Manager

Take a look at this script:

=========================================================================

William Lam

VMware vExpert 2009

VMware ESX/ESXi scripts and resources at:

Twitter: @lamw

VMware Code Central - Scripts/Sample code for Developers and Administrators

VMware Developer Comuunity

If you find this information useful, please award points for "correct" or "helpful".

0 Kudos
rub1
Contributor
Contributor

The script I got as a solution was an excellent basis for my needed scripting . thanks a lot

0 Kudos