[one-users] Setting up VMs to use existing DHCP server

Beng Heng Ng bengheng at gmail.com
Sat Jun 30 06:40:45 PDT 2012


Solved the original question by creating a virtual network of range
type as suggested by Olivier, and specifying the network address and
network mask. Simply specifying the MAC address in the VM template is
a bad idea.

Beng Heng

On Fri, Jun 29, 2012 at 7:33 PM, Beng Heng Ng <bengheng at gmail.com> wrote:
> Thanks Olivier, for your suggestion.
>
> For experimentation, I simply added the following line into the VM template:
>
> NIC=[ MAC="00:02:01:23:45:67" ]
>
> But I have been getting permission denied errors.
>
> [DiM][I]: New VM state is ACTIVE.
> [LCM][I]: New VM state is PROLOG.
> [VM][I]: Virtual Machine has no context
> [TM][I]: clone: Cloning ../../100/e5a9999ab1f71f0e5c11fbf47e3f9c47 in
> london:/srv/cloud/one/var//datastores/0/84/disk.0
> [TM][I]: ExitCode: 0
> [LCM][I]: New VM state is BOOT
> [VMM][I]: Generating deployment file: /srv/cloud/one/var/84/deployment.0
> [VMM][I]: ExitCode: 0
> [VMM][I]: Successfully execute network driver operation: pre.
> [VMM][I]: Command execution fail: cat << EOT |
> /var/tmp/one/vmm/kvm/deploy
> /srv/cloud/one/var//datastores/0/84/deployment.0 vmserver 84 vmserver
> [VMM][I]: error: Failed to create domain from
> /srv/cloud/one/var//datastores/0/84/deployment.0
> [VMM][I]: error: internal error process exited while connecting to
> monitor: kvm: -netdev tap,id=hostnet0: could not configure
> /dev/net/tun: Operation not permitted
> [VMM][I]: kvm: -netdev tap,id=hostnet0: Device 'tap' could not be initialized
> [VMM][I]:
> [VMM][E]: Could not create domain from
> /srv/cloud/one/var//datastores/0/84/deployment.0
> [VMM][I]: ExitCode: 255
> [VMM][I]: Failed to execute virtualization driver operation: deploy.
> [VMM][E]: Error deploying virtual machine: Could not create domain
> from /srv/cloud/one/var//datastores/0/84/deployment.0
> [DiM][I]: New VM state is FAILED
>
> I have tried changing the group for /dev/net/tun to "cloud", which
> corresponds to the group value in /etc/libvirt/qemu.conf. I've also
> tried modifying /etc/libvirt/qemu.conf for the cgroup_device_acl field
> as follows.
>
> cgroup_device_acl = [
>    "/dev/null", "/dev/full", "/dev/zero",
>    "/dev/random", "/dev/urandom",
>    "/dev/ptmx", "/dev/kvm", "/dev/kqemu",
>    "/dev/rtc", "/dev/hpet",
>    "/dev/net/tun",
> ]
>
> What else could be wrong? Thanks.
>
> Cheers,
> Beng Heng
>
>
> On Thu, Jun 28, 2012 at 4:34 AM, Olivier Sallou <olivier.sallou at irisa.fr> wrote:
>>
>> Le 6/28/12 6:13 AM, Beng Heng Ng a écrit :
>>> Hi,
>>>
>>> I am trying to setup OpenNebula for our research work.
>>>
>>> For now, we have one machine with a single NIC to experiment with. How
>>> can one configure a guest to use DHCP for getting an IP address? I
>>> know one can specify leases (as described here
>>> http://opennebula.org/documentation:archives:rel3.0:vgg) in the
>>> virtual network template file. However, we do not have access to the
>>> DHCP server, thus it is not possible for us to specify the IPs.
>>>
>>> The solutions suggested here
>>> (http://lists.opennebula.org/pipermail/users-opennebula.org/2010-November/003349.html)
>>> involves setting up a virtual DHCP server or knowing in advance the IP
>>> ranges. But are there any ways to request IPs from the existing DHCP
>>> server directly?
>> You can configure a network in OpenNebula that defines only MAC
>> addresses (range of virtual ones).
>> Then, all you need is to have images with network config configured for
>> DHCP. Your DHCP will answer to the request.
>> This is not a requirement that OpenNebula manage the IPs, this is only a
>> feature.
>>
>> Olivier
>>>
>>> Thanks in advance.
>>> Beng Heng
>>> _______________________________________________
>>> Users mailing list
>>> Users at lists.opennebula.org
>>> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>>>
>>>
>>
>> --
>> Olivier Sallou
>> IRISA / University of Rennes 1
>> Campus de Beaulieu, 35000 RENNES - FRANCE
>> Tel: 02.99.84.71.95
>>
>> gpg key id: 4096R/326D8438  (keyring.debian.org)
>> Key fingerprint = 5FB4 6F83 D3B9 5204 6335  D26D 78DC 68DB 326D 8438
>>
>>
>>
>> _______________________________________________
>> Users mailing list
>> Users at lists.opennebula.org
>> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org



More information about the Users mailing list