com.vmware.vim25.mo.samples.network
Class AddVirtualNic

java.lang.Object
  extended by 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

Constructor Summary
AddVirtualNic()
           
 
Method Summary
static void main(String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AddVirtualNic

public AddVirtualNic()
Method Detail

main

public static void main(String[] args)
                 throws Exception
Throws:
Exception


Copyright © 2011-2012. All Rights Reserved.