[one-users] Find the VM IP in the DHCP setup

Shi Jin jinzishuai at yahoo.com
Wed Jun 3 09:14:09 PDT 2009


Hi there,

I am trying to deploy multiple Windows VM using Open Nebula and am successful with it. However, I am troubled at finding out the IP address the Windows VM is using. Of course, I can use virt-mananager or VNC to directly login to the box from the physical node and find out manually. However, I want something more automatic. 

I know there are two ways to setup network in Open Nebula, DHCP and OneVNET. The OneVNET approach requires running a script on the Linux VM, which is not possible for my Windows box and I wouldn't want to impose the user any restrictions in terms of setup their box. So I prefer the DHCP approach.  With control of the DHCP server, in principal I should be able to tell the IP address for any VM given its MAC address. My understanding is that the MAC address is generated randomly in the creation of a VM. It would be nice if command of "onevm show <id>" is able show the MAC address of the NIC.  This is true in the OneVNET scenario but the IP shown is not relevant for me.

For example, I can setup a VNET with 
NAME            = "LAN"
TYPE            = RANGED
BRIDGE          = br0
NETWORK_SIZE    = 32
NETWORK_ADDRESS = 192.168.1.210
And use the template of
NIC = [bridge ="br0", 
       network = "LAN"
       ]
This one onevm show will yield something like
    NAME            : winxp               
    NIC             : BRIDGE=br0,IP=192.168.1.193,MAC=00:03:c0:a8:01:c1,NETWORK=LAN,VNID=7

However, the IP does not make sense at all. Instead the dhcp client on WinXp gets an IP of 192.168.1.130.  But I can discard this IP information and check the DHCP server with the MAC address since it is indeed the same MAC address found inside the WinXP VM.

So my question is that without creating OneVNET (since it is not used at all here), is there a way to show the MAC address of the VM? This should be possible since from the physical node either virt-manager or virsh can tell me that (for example, in the dumped xml file).

Thank you very much.

--
Shi Jin, PhD


      



More information about the Users mailing list