[PVE-User] With cloud-init some bug?

Wolfgang Bumiller w.bumiller at proxmox.com
Fri Mar 23 08:21:22 CET 2018


On Fri, Mar 23, 2018 at 02:28:12PM +0800, lyt_yudi wrote:
> 1. Use --sshkey  issue:
> # qm set 111 --sshkey ~/.ssh/id_rsa.pub 
> 400 Parameter verification failed.
> sshkeys: invalid format - invalid urlencoded string: /root/.ssh/id_rsa.pub
> 
> qm set 111 --sshkey /root/.ssh/id_rsa.pub <vmid> [OPTIONS]

The hook reading the file is in pve-common, so you need to update that.

> 2. Can't setup static ip address for vm's by cloud-init
> Test not passed:
> CentOS-6(CentOS-6-x86_64-GenericCloud.qcow2)
> CentOS-7(CentOS-7-x86_64-GenericCloud.qcow2)
> 
> Debian-9(debian-9-openstack-amd64.qcow2)
> only dhcp? configuration static mode is still used in DHCP!
> 
> Test passed:
> Ubuntu-16.04(xenial-server-cloudimg-amd64-disk1.img)
> Ubuntu-18.04(bionic-server-cloudimg-amd64.img)
> 
> Can’t use the static ip for some Linux OS, is it the reason why the cloud-init version is too low?

Possible. It also depends on how cloud-init is configured in these
images. They may not have the nocloud data sources enabled.
Try setting `citype: configdrive2`, that one should have existed longer.

> must be with cloudinit >= 17.1?

0.7.9 from debian stretch should also work, older ones _may_ work with
the configdrive2 type. I haven't tested older versions lately, but given
that configdrive2 was the first one we had back when Alexandre started
the original implementation it sure is worth a try.




More information about the pve-user mailing list