Cloud-Init Docs

XN-Matt

Well-Known Member
Aug 21, 2017
90
7
48
42
The docs for cloud-init are a little thin on the ground being such a new feature.

What is the expected behaviour for this in proxmox? Should the cloud-init drive remain always connected? if so, after the machine is shut down and then started again, it fails with the error:

Code:
qemu-img: Could not open '/dev/vg-1/vm-xxx-cloudinit': Could not open '/dev/vg-1/vm-xxx-cloudinit': No such file or directory
TASK ERROR: command 'set -o pipefail && genisoimage -R -V cidata /run/pve/cloudinit/xxx/ | qemu-img dd -n -f raw -O raw 'isize=0' 'osize=0' 'of=/dev/vg-1/vm-xxx-cloudinit'' failed: exit code 1

If not, as proxmox knows the VM has stopped, can it not remove that automatically instead of leaving in a half broken state?

Either way, if we know we need to delete it on a shutdown, that's OK too but would rather work with the expected process than one that we're getting right now.
 
this should not happen, can you post the vm config and the storage config?
 
Where do you want the storage config from?

VM:

Code:
agent: 1
boot: dcn
bootdisk: virtio0
cipassword: [removed]
ciuser: [removed]
cores: 3
hotplug: disk,network,usb,memory,cpu
ide0: storage-1:vm-106-cloudinit,media=cdrom
ipconfig0: ip=x.x.x.x/24,gw=x.x.x.x
memory: 2048
name: xxxxxx
net0: virtio=xx:xx:xx:xx:xx:xx,bridge=vmbr0
numa: 1
onboot: 1
ostype: l26
scsihw: virtio-scsi-pci
searchdomain: xxxxx
smbios1: uuid=34b69428-f82e-4e3f-8a1f-f868d2b6769c
sockets: 1
sshkeys: [removed]
tablet: 0
virtio0: storage-1:vm-xxx-disk-1,cache=writeback,size=30G
 
For where it is stored.

Code:
iscsi: c1-sp1
    portal x.x.x.x
    target c1-sp1
    content images

lvm: storage-1
    vgname vg-1
    base c1-sp1:0.0.0.scsi-xxxxxx
    content rootdir,images
    shared 1
 
For that cloud-init:

Code:
  vm-106-cloudinit vg-1 -wi-ao----   8.00m

It has been running since it was used. If I was to stop the VM and then start again, it would fail.

Would you like the output from the command after doing that?
 
ok i could reproduce it and find the error, i sent a patch to the pve-devel list
 
  • Like
Reactions: XN-Matt

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!