[one-users] Using CloudInit for contextualization

Wilma Hermann wilma.hermann at gmail.com
Mon Feb 3 08:54:16 PST 2014


Hi,

Well, the core of the problem sounds logical to me. Nevertheless, I have to
wait 2 minutes for the network initialization to time-out until I can
reboot the machine using the CtrlAltDel-Button in VNC... That's not
comfortable, but bearable.

However, I cannot get that USER_DATA variable to work. Whatever I enter
there, it is obviously ignored. I tried it with the exact code from the
documentation you mentioned, but also with something like

CONTEXT=[NETWORK="YES",SSH_PUBLIC_KEY="$USER[SSH_PUBLIC_KEY]",
  USER_DATA="#cloud-configbootcmd:
 - echo HelloWorld > /etc/issue
" ]

just to get a visual feedback that the USER_DATA is being used by
cloud-init. None of it worked out.

Is there a special trick with USER_DATA?

Just in case that's important: I'm using OpenNebula 4.4 with libvirt/KVM.

Thanks in advance
Wilma

2014-01-30 Javier Fontan <jfontan at opennebula.org>:

> Unfortunately the current version of cloud-init does not load new
> network parameters after they are configured in some distributions.
> There is a ticket to track that problem [1]
>
> The documentation gives some ideas on how to overcome this [2]:
>
> --8<------
> The current version of cloud-init configures the network before
> running cloud-init configuration. This makes the network configuration
> not reliable. Until a new version that fixes this is released you can
> add OpenNebula context packages or this user data to reboot the
> machine so the network is properly configured.
> ------>8--
>
> [1] https://bugs.launchpad.net/cloud-init/+bug/1225922
> [2]
> http://docs.opennebula.org/stable/user/virtual_machine_setup/cloud-init.html
>
> On Tue, Jan 28, 2014 at 1:56 PM, Wilma Hermann <wilma.hermann at gmail.com>
> wrote:
> > Hi,
> >
> > I'm trying to get a Ubuntu 13.10 guest to work, which uses a official
> > Cloud-image (http://cloud-images.ubuntu.com/saucy/) as disk. However,
> the VM
> > is not integrating into the virtual network. I've double checked the
> virtual
> > network settings with CentOS-VMs, the network works correctly.
> >
> > I've found out that CloudInit writes a correct /etc/network/interfaces
> file
> > with a static address, however, the machine somehow ignores this file and
> > keeps sending DHCP requests without getting an answer (which is intended
> > since we don't use DHCP in the VM's network).
> >
> > # virt-cat one-42 /etc/network/interfaces
> > auto lo
> > iface lo inet loopback
> >
> > auto eth0
> > iface eth0 inet static
> >   address 192.168.129.4
> >   network 192.168.128.0
> >   netmask 255.255.254.0
> >   gateway 192.168.128.1
> >
> > # virt-cat one-42 /var/log/syslog | tail -6
> > Jan 28 12:42:44 ubuntu dhclient: DHCPDISCOVER on eth0 to 255.255.255.255
> > port 67 interval 21 (xid=0x1080a577)
> > Jan 28 12:43:05 ubuntu dhclient: DHCPDISCOVER on eth0 to 255.255.255.255
> > port 67 interval 13 (xid=0x1080a577)
> > Jan 28 12:43:18 ubuntu dhclient: DHCPDISCOVER on eth0 to 255.255.255.255
> > port 67 interval 20 (xid=0x1080a577)
> > Jan 28 12:43:38 ubuntu dhclient: DHCPDISCOVER on eth0 to 255.255.255.255
> > port 67 interval 1 (xid=0x1080a577)
> > Jan 28 12:43:39 ubuntu dhclient: No DHCPOFFERS received.
> > Jan 28 12:43:39 ubuntu dhclient: No working leases in persistent
> database -
> > sleeping.
> >
> > Does anybody know how the VM template needs to be configured in order to
> get
> > it working?
> >
> > Thanks in advance
> > Wilma
> >
> >
> > _______________________________________________
> > Users mailing list
> > Users at lists.opennebula.org
> > http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
> >
>
>
>
> --
> Javier Fontán Muiños
> Developer
> OpenNebula - The Open Source Toolkit for Data Center Virtualization
> www.OpenNebula.org | @OpenNebula | github.com/jfontan
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20140203/0f9afff3/attachment.htm>


More information about the Users mailing list