Package com.vmware.host

Class Summary
AcquireSessionInfo AcquireSessionInfo This sample will acquire a session with VC or ESX and print a cim service ticket and related session information to a file Parameters: url [required] : url of the web service username [required] : username for the authentication password [required] : password for the authentication host [required] : Name of the host info [optional] : Type of info required only [cimticket] for now file [optional] : Full path of the file to save data to Command Line: run.bat com.vmware.general.Browser --url [webserviceurl] --username [username] --password [password] --host [hostname] --info [password] --file [path_to_file]
AddVirtualNic AddVirtualNic This sample is used to add a Virtual Nic to a PortGroup Parameters: url [required] : url of the web service username [required] : username for the authentication password [required] : password for the authentication portgroupname [required] : Name of the port group ipaddress [optional] : ipaddress for the nic, if not set DHCP will be in affect for the nic hostname [optional] : Name of the host datacentername [optional] : Name of the datacenter Command Line: Add VirtualNic to a PortGroup on a Virtual Switch run.bat com.vmware.host.AddVirtualNic --url [webserviceurl] --username [username] --password [password] --hostname [hostname] --datacentername [mydatacenter] --portgroupname [myportgroup] --ipaddress [AAA.AAA.AAA.AAA] Add VirtualNic to a PortGroup on a Virtual Switch without hostname run.bat com.vmware.host.AddVirtualNic --url [webserviceurl] --username [username] --password [password] --datacentername [mydatacenter] --portgroupname [myportgroup] --ipaddress [AAA.AAA.AAA.AAA] Add VirtualNic to a PortGroup on a Virtual Switch without datacentername run.bat com.vmware.host.AddVirtualNic --url [webserviceurl] --username [username] --password [password] --portgroupname [myportgroup] --ipaddress [AAA.AAA.AAA.AAA]
AddVirtualSwitch AddVirtualSwitch This sample is used to add a virtual switch Parameters: url [required] : url of the web service username [required] : username for the authentication password [required] : password for the authentication vswitchid [required]: Name of the switch to be added hostname [required]: Name of the host Command Line: Add a Virtual Switch run.bat com.vmware.host.AddVirtualSwitch --url [webserviceurl] --username [username] --password [password] --hostname [hostname] --vswitchid [mySwitch]
AddVirtualSwitchPortGroup AddVirtualSwitchPortGroup This sample is used to add a Virtual Machine Port Group to a vSwitch Parameters: url [required] : url of the web service username [required] : username for the authentication password [required] : password for the authentication vswitchid [required] : Name of the vSwitch to add portgroup to portgroupname [required] : Name of the port group hostname [optional] : Name of the host Command Line: Add Virtual switch Port Group: run.bat com.vmware.host.AddVirtualSwitchPortGroup --url [webserviceurl] --username [username] --password [password] --vswitchid [mySwitch] --portgroupname [myportgroup] --hostname [hostname]
DVSCreate This sample demonstrates how to create/update Distributed Virtual Switch Parameters: url [required]: url of the web service.
HostProfileManager This sample demonstrates HostProfileManager and ProfileComplainceManager Parameters: url [required] : url of the web service username [required] : username for the authentication password [required] : password for the authentication sourcehostname [required] : Name of the host entityname [required] : Attached Entity Name entitytype [required] : Attached Entity Type Command Line: Create hostprofile given profileSourceHost (host system) profileAttachEntity (host system), profileAttachEntityType (host system) Applies config after attaching hostprofile to host system and check for compliance"); run.bat com.vmware.host.HostProfileManager --url [webserviceurl]"); --username [username] --password [password] --sourcehostname [host name] --entityname [host name] --entitytype HostSystem Create hostprofile given profileSourceHost (host system), profileAttachEntity (cluster computer resource), profileAttachEntityType (cluster compute resource) Attaches hostprofile to all hosts in cluster and checks for compliance run.bat com.vmware.host.HostProfileManager --url [webserviceurl] --username [username] --password [password] --sourcehostname [host name] --entityname [Cluster] --entitytype ClusterComputeResource
NIOCForDVS This sample demonstrates how to add/modify NetworkResourcePool to Distributed Virtual Switch: Parameters: url [required]: url of the web service.
RemoveVirtualNic RemoveVirtualNic This sample removes a Virtual Nic from a PortGroup on a vSwitch Parameters: url [required] : url of the web service username [required] : username for the authentication password [required] : password for the authentication portgroupname [required] : Name of port group to remove Virtual Nic from hostname [required] : Name of host datacentername [optional] : Name of datacenter Command Line: Remove a VirtualNic from a PortGroup run.bat com.vmware.host.RemoveVirtualNic --url [webserviceurl] --username [username] --password [password] --datacentername [mydatacenter] --portgroupname [myportgroup] --hostname [hostname] Remove a VirtualNic from a PortGroup without hostname run.bat com.vmware.host.RemoveVirtualNic --url [webserviceurl] --username [username] --password [password] --datacentername [mydatacenter] --portgroupname [myportgroup] Remove a VirtualNic from a PortGroup without datacentername run.bat com.vmware.host.RemoveVirtualNic --url [webserviceurl] --username [username] --password [password] --portgroupname [myportgroup] --hostname [name of the host]
RemoveVirtualSwitch RemoveVirtualSwitch This sample removes a virtual switch Parameters: url [required] : url of the web service username [required] : username for the authentication password [required] : password for the authentication vswitchid [required] : Name of the switch to be added hostname [required] : Name of the host Command Line: Remove a Virtual Switch run.bat com.vmware.host.RemoveVirtualSwitch --url [webserviceurl] --username [username] --password [password] --vswitchid [mySwitch] --hostname [hostname]
RemoveVirtualSwitchPortGroup RemoveVirtualSwitchPortGroup This sample removes a Virtual Switch PortGroup Parameters: url [required] : url of the web service username [required] : username for the authentication password [required] : password for the authentication portgroupname [required] : Name of the port group to be removed hostname [required] : Name of the host Command Line: Remove Virtual Switch Port Group run.bat com.vmware.host.RemoveVirtualSwitchPortGroup --url [webserviceurl] --username [username] --password [password] --portgroupname[myportgroup] --hostname [hostname]