You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to pysp...@googlegroups.com
Hello Seba,
How do I add the network configuration to a NIC, for example make a NIC to be added to a VM, be Natted, bridged, host only etc?
Thank you
Seba
unread,
Apr 27, 2012, 8:57:54 AM4/27/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to pysp...@googlegroups.com, maumercado
Hi!
AFAIK, those NIC connection settings (natted, bridged, host only) are available for VMWare workstation VMs, not ESX/vCenter. In ESX you configure separetely different network objects, and then associate VMs to those networks.
I've written two very similar code snippets, the first reconfigures an existing NIC to use a different networw, the second add a new NIC to the VM
Cheers,
Seba.
##
## SWITCH EXISTING NIC TO A DIFFERENT NETWORK
## (THE ONE IN THE 'label' VARIABLE)
##
from pysphere import *
from pysphere.resources import VimService_services as VI
server = VIServer()
server.connect("server", "user", "pwd")
vm = "Windows XP Home Edition - SP3"
#THE NAME OF THE NWTWORK TO SWITCH THIS VM TO.
#You can get them with the VI Client, from the VM Settings window