Install latest cloudInit version on Debian Stretch?

Vengance

Renowned Member
May 21, 2016
271
12
83
34
Hi,

I have prepared a custom template based on Debian Stretch with CloudInit but unfortunately it doesn't seem to work.
If I remember correctly someone mentioned that the version in the Debian Stretch mirrors is too old.

Is this true? However I couldn't find a way to install the latest stable version of cloudinit.


Regards
v3ng
 
Hi,

the cloud-init package of Debian stretch is working only the password setting does not work.
The workaround is to use a user cert and after the installation, you can set the password with a script.

I just see that there is a newer version in buster you can try to use this.
 
Hi,

Yes, I also noticed the bug with setting the password, but unfortunately it still exists in version 0.7.9-5 from the sid/ buster repo.
Has anyone ever tried installing it from source?
 
I've just installed the latest cloud-init version from their website on a debian stretch VM, but unfortunately it's still not possible to set the users password. Is this a Proxmox or CloudInit bug? @wolfgang
 
A Cloud-init bug.
AFIK the use a wrong encoding for the password.
So the password is set but you can't use it.
 
Ah I see, so I can use the cloud-init version included in the stretch repo, if the password settings is a genreral bug?
But if I remember correctly, setting user passwords worked with ubuntu cloud images, is there something different?
 
I do not use Ubuntu so I don't know.
 
Hello,

I dont know If I'm giving a late reply, but I had been creating the images, and the same happen with debian and centos with old versions of cloud-init. To solve the problem in Debian, run this commands:


## Install cloud-init from source
git clone github.com/cloud-init/cloud-init.git #(add the https)
cd cloud-init
sudo pip3 install -r requirements.txt
sudo python3 setup.py build
sudo python3 setup.py install --init-system systemd
sudo cloud-init init --local
sudo cloud-init status


be sure to edit the /etc/cloud/cloud.cfg there the default user will be ubuntu, change it to debian. also change the repositories to the ones for debian.

Let me know if its works for you.
 
Hello,

I dont know If I'm giving a late reply, but I had been creating the images, and the same happen with debian and centos with old versions of cloud-init. To solve the problem in Debian, run this commands:


## Install cloud-init from source
git clone github.com/cloud-init/cloud-init.git #(add the https)
cd cloud-init
sudo pip3 install -r requirements.txt
sudo python3 setup.py build
sudo python3 setup.py install --init-system systemd
sudo cloud-init init --local
sudo cloud-init status


be sure to edit the /etc/cloud/cloud.cfg there the default user will be ubuntu, change it to debian. also change the repositories to the ones for debian.

Let me know if its works for you.


Hello,

Cloud-init working fine. But I can not get it to configure the network interface. The information is in the Cloud-init, it gets through the API. But the network interface already has a configuration. Because if I remove this configuration it says that it can not read the file / etc / network / interfaces.

If I put dhcp, it takes an internal ip. With CentOS I can make it work very well. But Debian 8, no.

What do you think is missing? Can you help me?
 
Oh I remember now I had a problem with the networking I did a few things and fixed it

In /etc/network/interfaces
I removed Eth0 eth1 eth3 etc

So then it only looks like this

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface

auto loiface lo inet loopback

source /etc/network/interfaces.d/*


There is a also a resolve config problem
Install resolvconf

apt-get install resolvconf
systemctl enable resolvconf

Hopefully this fixes it for you
 
Oh I remember now I had a problem with the networking I did a few things and fixed it

In /etc/network/interfaces
I removed Eth0 eth1 eth3 etc

So then it only looks like this

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface

auto loiface lo inet loopback

source /etc/network/interfaces.d/*


There is a also a resolve config problem
Install resolvconf

apt-get install resolvconf
systemctl enable resolvconf

Hopefully this fixes it for you

Hello,

I did exactly as you suggested. But it can not read the interfaces file. And cloud-init does not go up.

see the print.

http://prntscr.com/ni3oaj
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!