com.vmware.vim25.mo.samples.vm
Class VMReconfig
java.lang.Object
com.vmware.vim25.mo.samples.vm.VMReconfig
public class VMReconfig
- extends Object
This sample reconfigures a virtual machine which includes reconfiguring
the disk size,disk mode etc.
Parameters:
vmname [required]: Name of the virtual machine
device [required]: cpu|memory|disk|cd|nic
operation [optional]: add|remove
value [required]: high|low|normal|numeric value
disksize [optional]: Size of virtual disk
diskmode [optional]: persistent|independent_persistent,independent_nonpersistent
Command: To configure virtual machine. i.e.changing the CPU shares to 100
run.bat com.vmware.samples.vm.VMReconfig --url [webserviceurl]
--username [username] --password [password] --vmname [vmname] --device [device]
--operation [operation] --value [value] --disksize [disksize] --diskmode [diskmode]
Command: To configure a virtual machine to add a hard disk with name HardDiskA and
Disksize = 100
run.bat com.vmware.samples.vm.VMReconfig --url [webserviceurl]
--username [username] --password [password] --vmname [vmname] --device [disk]
--operation [add] --value [A] --disksize [100]
Command: To configure a virtual machine to delete a NIC
run.bat com.vmware.samples.vm.VMReconfig --url [webserviceurl]
--username [username] --password [password] --vmname [vmname] --device [nic]
--operation [remove] --value [name of the nic]
This is a sample converted from the equivalent from VI SDK
- Author:
- sjin
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
VMReconfig
public VMReconfig()
main
public static void main(String[] args)
throws Exception
- Throws:
Exception
Copyright © 2011-2012. All Rights Reserved.