VMware {code} Community
srimini
Contributor
Contributor

Doubt regarding the removal of CD drive from a VM using VMReconfig.java

Hi,

i am trying to use VMReconfig.java (VISDK)attached below to remove the CD drive of a VM.

in that there are certain mandatory parameters as follow

vmname : Name of the virtual machine

*device : cpu|memory|disk|cd|nic

*operation : add|remove

*value : high|low|normal|numeric value

here what does the value parameter correponds to...how can i set that?

please help me.....

for the refernce , i have attached the VMReconfig.java

0 Kudos
3 Replies
njain
Expert
Expert

Hi Padmini,

The "value" parameter in case of removal is the device name as it is visible in Virtual Machine properties. Thus, for e.g., for CD drive it may be "CD/DVD Drive 1", "CD/DVD Drive 2" etc. For floppy drive "Floppy Drive 1" etc.

run.bat com.vmware.samples.vm.VMReconfig --url https://<VC/ESX URL>/sdk/vimService --username <username> --password <password> --vmname <vmname> --device cd --operation remove --value "CD/DVD Drive 2"

Hope this will resolve your issues.

Neha

0 Kudos
srimini
Contributor
Contributor

Hi,

thanks...am trying ......

Regards,

Padmini

0 Kudos
Steve_Jin
Expert
Expert

The VMConfig.java sample is simplified using VI Java API at:

Steve JIN, VMware Engineering

Creator of VI Java API:

Steve JIN Author of VMware VI and vSphere SDK; Creator of open source VI Java API (http://vijava.sf.net); Blogger at http://www.doublecloud.org
0 Kudos