[one-users] Assigning fixed IP's to VM's

cmasmas cmasmas cmasmas10 at gmail.com
Wed Oct 7 16:37:55 PDT 2009


Again, thanks for your answer. It seems the key to my problem. One last
thing:
It ask ONE for the correct IP, but it seems to be overriden with the IP from
DHCP server. Any clues?

*DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 7
DHCPOFFER from 192.168.51.1
DHCPREQUEST on eth0 to 255.255.255.255 port 67
DHCPACK from 192.168.51.1
bound to 192.168.51.91 -- renewal in 1506 seconds.
done.*


2009/10/7 Jaime Melis <j.melis at fdi.ucm.es>

> Hi cmasmas
>
> bridge name     bridge id               STP enabled     interfaces
>> eth0            8000.001e373597bc       no              peth0
>>
>
> you should have in your network template then:
> BRIDGE = eth0
>
> I think I do need to specity a MAC-IP pair. Each VM must have the same IP,
>> always, even if they are restarted.
>>
>
> Follow these steps:
>
>    - enable saving: "SAVE = yes" in the vm template file.
>    - contextualize the VM with the vmcontext scripts (follow the guide
>    Tino showed you)
>    - stop the vm with onevm stop <vmid>
>    - resume the vm whenever you want with onevm resume <vmid>
>
> As you can see you don't need DHCP. OpenNebula will generate the MAC, the
> vmcontext script running in your vms will grab the MAC and configure the IP
> accordingly. Since the MAC address won't change, the IP won't change either,
> even if you reboot the vm. By doing 'stop', you create a checkpoint and you
> can resume it later.
>
> regards,
> Jaime
>
> On Wed, Oct 7, 2009 at 11:39 AM, cmasmas cmasmas <cmasmas10 at gmail.com>wrote:
>
>>
>>
>> 2009/10/5 Jaime Melis <j.melis at fdi.ucm.es>
>>
>>> Hi cmasmas,
>>
>>
>> First of all, thanks for your answer.
>>
>>
>>
>>
>>
>>
>>
>>> This parameter is actually very important. The way hypervisors work is to
>>> create a tun/tap device and to attach to it a bridge. The whole point of
>>> this is to permit your vm to be in the same network as the the selected
>>> device of the host. Execute 'brctl show' to see what bridges you have.
>>>
>>
>> bridge name     bridge id               STP enabled     interfaces
>> eth0            8000.001e373597bc       no              peth0
>>
>>
>>
>>> Regarding the network template, I would suggest that you didn't specify
>>> the MAC for each IP, like this:
>>>
>>> *LEASES = [IP=192.168.2.2]
>>> LEASES = [IP=192.168.2.3]*
>>>
>>
>> I think I do need to specity a MAC-IP pair. Each VM must have the same IP,
>> always, even if they are restarted.
>>
>> Maybe what I'm trying to do is not possible. I wanted to create a small
>> network of 5-6 VM's to do some testing. I don't need access to Internet, but
>> only the communication between the VM's. In a previous mail, I said about
>> the problem with the DHCP server @ University.
>> So, is it possible what I need without a DHCP server?
>>
>> Thanks again, and sorry if I'm not clear.
>>
>>
>> _______________________________________________
>> Users mailing list
>> Users at lists.opennebula.org
>> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20091008/aff774f1/attachment-0003.htm>


More information about the Users mailing list