[one-users] Virtual machine IP
Steven Timm
timm at fnal.gov
Mon Dec 6 08:10:34 PST 2010
On Mon, 6 Dec 2010, Olivier Sallou wrote:
> Hi,
> as far as I know, if you use opennebula ip assignment, there is no MAC to IP
> automatic setup.
> If you want such assignment you should use your own DHCP server.
>
> I think IP is taken from a pool, that's all.
>
> Olivier
>
> Le 12/6/10 4:30 PM, Daniel.MOLDOVAN at cs.utcluj.ro a écrit :
>> 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?
The core mechanism if you don't use contextualization is
just to take the last 4 bytes of the MAC and make that the IP.
But it is possible in the "FIXED" type of network to specify
MAC-IP pairs.
It is also possible via the contextualization to assign a given
static IP to a virtual machine regardless of the MAC address it might
have, I do that all the time.
>>
>> 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.
Do you have the one-context script installed inside your VM?
Are you using the contextualization part of the template?
Steve
>>
>> 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
>>
>> _______________________________________________
>> Users mailing list
>> Users at lists.opennebula.org
>> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>>
> _______________________________________________
> Users mailing list
> Users at lists.opennebula.org
> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>
--
------------------------------------------------------------------
Steven C. Timm, Ph.D (630) 840-8525
timm at fnal.gov http://home.fnal.gov/~timm/
Fermilab Computing Division, Scientific Computing Facilities,
Grid Facilities Department, FermiGrid Services Group, Assistant Group Leader.
More information about the Users
mailing list