@Sample(name="remove-virtual-nic",
description="removes a Virtual Nic from a PortGroup on a vSwitch")
public class RemoveVirtualNic
extends ConnectedVimServiceBase
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]
ConnectedVimServiceBase.ConnectionExceptionPROP_ME_NAME, SVC_INST_NAME| Constructor and Description |
|---|
RemoveVirtualNic() |
| Modifier and Type | Method and Description |
|---|---|
void |
run() |
void |
setDatacenter(java.lang.String datacenter) |
void |
setHost(java.lang.String host) |
void |
setPortgroupname(java.lang.String portgroupname) |
basicConnectionFromConnection, connect, disconnect, getServiceInstanceReference, setConnection, setHostConnection@Option(name="datacentername",
required=false,
description="Name of datacenter")
public void setDatacenter(java.lang.String datacenter)
@Option(name="hostname",
description="name of host")
public void setHost(java.lang.String host)
@Option(name="portgroupname",
description="Name of port group to remove Virtual Nic from")
public void setPortgroupname(java.lang.String portgroupname)
@Action public void run()