Commit Graph

16 Commits

Author SHA1 Message Date
David Limbeck
c701be3243 fix #1959: add fallback for 'auto' previously set by SLAAC
SLAAC previously set 'auto' which is not supported by nocloud network
config. On an up-to-date Ubuntu this should work as it uses 'dhcp' for
both dhcp and SLAAC. For others it was invalid anyway.

Signed-off-by: David Limbeck <d.limbeck@proxmox.com>
2018-11-13 10:10:29 +01:00
David Limbeck
8d54522b90 fix #1865: CloudInit doesn't add IPv6
Acked-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2018-08-22 12:40:26 +02:00
Wolfgang Bumiller
c3cedb3d9c cloud-init: nocloud v1: use lower case mac address
because cloud-init...

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2018-06-07 12:03:52 +02:00
Wolfgang Bumiller
862807898c cloud-init: nocloud v1: set ip and netmask instead of cidr
because of centos7's broken cloud-init version

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2018-06-07 12:03:52 +02:00
Dominik Csapak
9be87f4eea activate volume for cloudinit disk
because it does not have to be activated (e.g. in case of lvm)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-05-22 10:11:39 +02:00
Alexandre Derumier
f0a762f7ba commit_cloudinit_disk : add -n option to qemu-img dd 2018-03-21 15:35:05 +01:00
Dominik Csapak
4a85391549 cloud-init: make parameter order consistent
we have '$conf, $vmid' elsewhere for cloudinit, this was the only
function which had them in reverse

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-03-14 11:13:27 +01:00
Dominik Csapak
8de34458ea cloud-init: add manage_etc_hosts to cloud init config
so that we get the hostname there
(e.g. sudo complains that it cannot resolve the hostname)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-03-14 11:13:25 +01:00
Dominik Csapak
9a6ccb12ef cloud-init: use default hostname when none is set
use "VM$vmid" like we do in a container

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-03-14 11:13:18 +01:00
Wolfgang Bumiller
67864d1940 cloud-init: fall back to host's resolv.conf
As with containers, if no dns settings are configured, use
the ones from the host.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2018-03-07 15:03:39 +01:00
Wolfgang Bumiller
f62c36cffa cloud-init: don't use /tmp for config files
Leaving files in /tmp was mostly useful for debugging
purposes initially. Also /tmp is a rather insecure option
for this for a final version, so use
/run/pve/cloudinit/$vmid, and move the file writing into
commit_cloudinit_disk() which now takes a hash mapping file
paths to contents, to not duplicate the temp-file logic for
the different citypes.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2018-03-07 09:15:50 +01:00
Wolfgang Bumiller
e8ac21381e cloud-init: remove separate hostname config entry
Use the vm name and set hostname and fqdn in user data
again.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2018-03-07 09:15:42 +01:00
Wolfgang Bumiller
7b42f95142 cloud-init: add ciuser and cipassword config options
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2018-03-07 09:11:32 +01:00
Wolfgang Bumiller
41cd94a01e cloud-init: nocloud image support
With configdrives we end up with the /etc/network/interfaces
file containing the interface names we use on the disk, ie.
eth0/eth1/..., which doesn't work on systems which do not
use this name.

With the 'nocloud' image type we can provide a
network-config in yaml which matches mac addresses. Ideally
we'd use version 2, but debian stretch ships with a too old
cloud-init for this, so for now we're writing version 1.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2018-03-07 09:11:31 +01:00
Wolfgang Bumiller
3db6e4ab70 cloud-init: use qemu-img dd instead of nbd
We now have a patch on top of qemu to allow 'qemu-img dd'
to read from stdin when specifying input and output sizes,
as well as a way to tell it that the size of the source is
not known.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2018-03-07 09:11:31 +01:00
Alexandre Derumier
0c9a7596f6 implement cloudinit
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
Co-developed-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2018-03-07 09:11:31 +01:00