I just started playing with pysphere today, very cool! I'd like to possibly use it to automate our server builds. Currently we use cobbler for that which does a PXE boot. One piece of basic information that I would need to be able to pass along to cobbler is the MAC address of the machine that was just created. I quickly noticed that doing something basic from the GettingStarted guide like this was not working:
vm1 = server.get_vm_by_path("[na03_linux (1)] imgxfer/imgxfer.vmx")
print vm1.get_property('mac_address')
The output that is returned from that is "None". However if I do a:
print vm1.get_properties()
I can clearly see that the mac_address field is there and is populated correctly with a valid MAC so I'm not sure why get_property(mac_address) isn't returning it.
I'm on VMware vCenter Server 5.5.
Any insight would be helpful.
Also, if anyone already has a setup like this working where they build the VM with pysphere and then hand the info off to cobbler, I'd love to hear about that too. No need to rewrite the wheel.