com.vmware.vim25.mo.samples.network
Class AddVirtualNic
java.lang.Object
com.vmware.vim25.mo.samples.network.AddVirtualNic
public class AddVirtualNic
- extends Object
This sample is used to add a Virtual Nic
To run this samples following parameters are used:
vsiwtchid [required]: Name of the switch
portgroupname [required]: Name of the port group
ipaddress [required]: ipaddress for the nic
host [optional]: Name of the host
datacenter [optional]: Name of the datacenter
Command Line:To add a Host VirtualNic to a PortGroup on a Virtual Switch as: -
run.bat com.vmware.samples.host.AddVirtualNic --url [webserviceurl] --username [username] --password [password]
--vsiwtchid [mySwitch] --host [hostname] --datacenter [mydatacenter] --portgroupname [myportgroup] --ipaddress[AAA.AAA.AAA.AAA]
Command Line:To add a Host VirtualNic to a PortGroup on a Virtual Switch as
without specifying the host name
run.bat com.vmware.samples.host.AddVirtualNic --url [webserviceurl] --username [username] --password [password]
--vsiwtchid [mySwitch] --datacenter [mydatacenter] --portgroupname [myportgroup] --ipaddress[AAA.AAA.AAA.AAA]
Command Line:To add a Host VirtualNic to a PortGroup on a Virtual Switch as
without specifying the datacenter name
run.bat com.vmware.samples.host.AddVirtualNic --url [webserviceurl] --username [username] --password [password]
--vsiwtchid [mySwitch] --portgroupname[myportgroup] --ipaddress[AAA.AAA.AAA.AAA]
- Author:
- sjin
THis is a sample converted from VI SDK samples
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AddVirtualNic
public AddVirtualNic()
main
public static void main(String[] args)
throws Exception
- Throws:
Exception
Copyright © 2011-2012. All Rights Reserved.