[one-users] Virtual machine IP
Daniel.MOLDOVAN at cs.utcluj.ro
Daniel.MOLDOVAN at cs.utcluj.ro
Mon Dec 6 07:30:54 PST 2010
Hello,
Does anyone now what is the mecanism behind assigning IP addresses to the
virtual machines based on their MAC? Or has someone managed to assign a
static IP to a virtual machine?
I am using KVM. I have a situation in which i atach a virtual machine to a
bridge, but the virtual machine never gets the IP i have assigned.
Opennebula reports that the machine has the IP i have assigned, but that
is not true. A manual check reveals a totally different IP.
I have noticed that libvirt allows only the definition of the MAC and not
of the IP of the virtual machine.
Also, OpenNebula generates the MAC of the virtual machine from the network
IP if provided by performing a hexadecimal translation for the last 4
bytes. For example, 192.168.1.105 = MAC 02:00:0c:a8:01:69 .
So when i specify a 192.168.1.105 IP i always get a :69 mac but i get
another IP address. For example,:
for 192.168.1.105 i get 192.168.1.102,
for 192.168.1.106 i get 192.168.1.10,
for 192.168.1.110 i get 192.168.1.114.
I can't figure out a pattern or find out the source of the IP's. Dnsmasq
seems stopped. I have tried attaching the virtual machines to a custom
defined bridge or to the virbr0 created by opennebula express install. I
have tried defining other networks using virsh and attaching the virtual
machines to them with no luck.
This may be a problem of dhcp IP assignment, but i can't manage to find
the dhcp server used.
Thank,
Daniel
More information about the Users
mailing list