Retreiving the IP of a running machine using pyOne

Hi everybody!

I am trying to retreive the IP of one of my virtual machines. I have a 6.0.0.1 instance of Opennebula running. I am using pyOne to talk to OpenNebula using Python 2.

I’ve read the XML-RPC API documentation(XML-RPC API — OpenNebula 5.2.1 documentation), but I am unable to find how to retreive the IP. I succesfully can find attributes such as NAME like this:

vmInfo=one.vm.info(24)
print vmInfo.NAME

but there don’t seem to be any class attributes that contain the IP of the machine I requested. Next, I tried to obtain the network leases that where given out by my virtual network, but

one.vm.info(x)

doesn’t seem to have the IP stored either.

I feel like this should be pretty straightforward, but I’m missing something. Can somebody help me out?

1 Like

Hi @anoesheartje,

did you succeed in solving the problem of retrieving IP of VM?