VMware {code} Community
nileshjais
Enthusiast
Enthusiast

How to add vmdisk to VM using vsphere SDK

Dear All,

We want add a disk to a newly deployed VM from template. From this forum we found  vmdkManagement.pl script which seems to the one we want. But this script does not takes the size of ...

Thanks,

Nilesh

5 Replies
nileshjais
Enthusiast
Enthusiast

Do we have any script which will help me add vmdsk? Any enhaced version of vmdkManagement.pl would surely help me a lot.

Thank you advance.

Reply
0 Kudos
MR-Z
VMware Employee
VMware Employee

If you have installed the SDK/vcli, then under /usr/lib/vmware-vcli/apps/vm, there is a vdiskcreate.pl script:

./vdiskcreate.pl -vmname ora-test-r2 -server vc-dev-1 -filename "testing2.vmdk" -disksize 1024

Adding Virtual Disk on Virtual machine ora-test-r2 in the host XXX.

Virtual Disk created.

nileshjais
Enthusiast
Enthusiast

Yes indeed we were able to create a disk, But in case of linux we need to create volume group to a created disk then mount that volume group to some /scratch directory. In case of windows disk created is not usable state hence requires to format the disk ..etc how we can achieve this using Perl SDK.

Reply
0 Kudos
wenxin1234114
Contributor
Contributor

good answer .do you know how to extend disk size on original disk ?

Reply
0 Kudos
wenxin1234114
Contributor
Contributor

as far as i know ,it can not do that .If you know ,please tell me .

Reply
0 Kudos