[one-users] VM networking configuration CentOS

Jaime Melis jmelis at opennebula.org
Wed Nov 6 07:50:33 PST 2013


Hi Mark,

I think the problem is that you are not using the CONTEXT = [ NETWORK = YES
] option. If you don't, the VM will infer its IP from the MAC, converting
the last 4 bytes of the MAC to decimal:

MAC="54:52:00:c0:de:0a", => 00 . c0 . de . 0a => 0.192.222.10

If you add the CONTEXT bit from before to your template everything should
work OK.

cheers,
Jaime




On Mon, Oct 21, 2013 at 4:14 PM, Mark Kusch <mark.kusch at silpion.de> wrote:

> Hi list!
>
> Problem solved... Still it FEELS like NetworkManager broke networking
> in the VMs, still not confirmed.
>
> Solution:
> $ sudo su -
> # modprobe nbd max_part=63
> # qemu-nbd -c /dev/nbd0 /tmp/qcowimag
> # install -d /mnt/centos
> # mount /dev/nbd0p1 /mnt/centos
> # chattr +i /mnt/centos/etc/sysconfig/network-scripts/ifcfg-eth0
> # umount /mnt/centos
> # ...
>
> No, that's not nice!, but setting NM_CONTROLLED="no" didn't help.
> Hope this may help someone sometime.
>
> # kraM
>
> On 15:24 Mon 21 Oct, Mark Kusch wrote:
> > Hi list,
> >
> > feels like an issue with NetworkManager in CentOS (not confirmed yet).
> > ifcfg-eth0 has configured eth0 to be managed by
> > `NetworkManager' (NM_CONTROLLED="yes").
> >
> > Current approach is to mount and modify the qcow image
> > and configure NM_CONTROLLED="no".
> >
> > Currently no success.
> >
> > # kraM
> >
> >
> > On 14:49 Mon 21 Oct, Mark Kusch wrote:
> > > Hi list,
> > >
> > > I've a vnet defining IP and MAC address fields (required).
> > > I've a working bridge configuration which should grant accecss to a
> > > corporate DHCP server configured for exactly these IP/MAC pairs.
> > > I've a CentOS qcow2 image with eth0 configuration set to DHCP.
> > >
> > > When instantiating a VM it comes up with eth0 configured with IP
> > > 0.192.222.10/24. MAC address is configured correctly from the vnet.
> > >
> > > onevm show $ID lists expected networking configuration.
> > >
> > > Any hint why the VMs come up with such an IP address? Could that be
> > > OpenNebula related? Or does this feel to you like CentOS related?
> > >
> > > In HOPE anyone has seen such an issue and can point me somewhere
> > > which explains it to me and hopefully results in a solution ;)
> > >
> > > Thanks!
> > >
> > > # kraM
> > >
> > >
> > > Some details:
> > > $ onevnet show $ID # perfectly fine
> > > USED LEASES
> > > LEASE=[ MAC="54:52:00:c0:de:0a", IP="192.168.198.10",
> IP6_LINK="fe80::5652:ff:fec0:de0a", USED="1", VID="19" ]
> > >
> > > $onevm show $ID # perfectly fine
> > > VM NICS
> > > ID NETWORK              VLAN BRIDGE       IP              MAC
> > > 0  VNet                 yes br1           192.168.198.10
>  54:52:00:c0:de:0a
> > >                                           fe80::5652:ff:fec0:de0a
> > >
> > > ifcfg-eth0 from qcow2 image:
> > > DEVICE="eth0"
> > > BOOTPROTO="dhcp"
> > > IPV6INIT="yes"
> > > MTU="1500"
> > > NM_CONTROLLED="yes"
> > > ONBOOT="yes"
> > > TYPE="Ethernet"
> > > UUID="708d6105-c3fe-44e9-8572-f6738042f930"
> > >
> > > ifcfg-eth0 on VM:
> > > DEVICE=eth0
> > > BOOTPROTO=none
> > > ONBOOT=yes
> > > TYPE=Ethernet
> > > NETMASK=255.255.255.0
> > > IPADDR=0.192.222.10
> > > GATEWAY=0.192.222.1
> > >
> > > qcow2 image source:
> > > - http://cloud.centos.org/i/one/c6-x86_64-20121130-1.qcow2.gz
> > > - http://wiki.centos.org/Cloud/OpenNebula/QuickStart (found in this
> guide)
> > >
> > > --
> > > Mark Kusch
> > > Silpion IT-Solutions GmbH: Systems Engineer
> > >
> > > Tel.: +49 (40) 399976-51
> > > Fax.: +49 (40) 399976-40
> > > Mail: mark.kusch at silpion.de
> > >
> > > Firmensitz: Brandshofer Deich 48, 20539 Hamburg
> > > Geschäftsführer: Dipl.-Ing. (FH) Patrick Postel
> > > Registergericht: Amtsgericht Hamburg HRB 78585
> > > Finanzbehörde: Hamburg
> > > USt.-Ident.-Nr.: DE213610768
> >
> >
> >
> > > _______________________________________________
> > > Users mailing list
> > > Users at lists.opennebula.org
> > > http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
> >
> >
> > --
> > Mark Kusch
> > Silpion IT-Solutions GmbH: Systems Engineer
> >
> > Tel.: +49 (40) 399976-51
> > Fax.: +49 (40) 399976-40
> > Mail: mark.kusch at silpion.de
> >
> > Firmensitz: Brandshofer Deich 48, 20539 Hamburg
> > Geschäftsführer: Dipl.-Ing. (FH) Patrick Postel
> > Registergericht: Amtsgericht Hamburg HRB 78585
> > Finanzbehörde: Hamburg
> > USt.-Ident.-Nr.: DE213610768
>
>
>
> > _______________________________________________
> > Users mailing list
> > Users at lists.opennebula.org
> > http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>
>
> --
> Mark Kusch
> Silpion IT-Solutions GmbH: Systems Engineer
>
> Tel.: +49 (40) 399976-51
> Fax.: +49 (40) 399976-40
> Mail: mark.kusch at silpion.de
>
> Firmensitz: Brandshofer Deich 48, 20539 Hamburg
> Geschäftsführer: Dipl.-Ing. (FH) Patrick Postel
> Registergericht: Amtsgericht Hamburg HRB 78585
> Finanzbehörde: Hamburg
> USt.-Ident.-Nr.: DE213610768
>
> _______________________________________________
> Users mailing list
> Users at lists.opennebula.org
> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>
>


-- 
Jaime Melis
Project Engineer
OpenNebula - Flexible Enterprise Cloud Made Simple
www.OpenNebula.org | jmelis at opennebula.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20131106/33252ee2/attachment.htm>


More information about the Users mailing list