lvm cloud-init devices not avaiable after stop

pushakk

New Member
May 24, 2019
2
0
1
40
Hello everyone,

I have configured a new proxmox server, I have attached an lvm storage and I have configured a template with a cloud-init device support.
Whenever I stop a KVM guest, the lvm devices go to not avaiable state, I know this is normal because proxmox manage lvm devices on demand, but when I want to start it again, it fails with

qemu-img: Could not open '/dev/vps/vm-1000-cloudinit': Could not open '/dev/vps/vm-1000-cloudinit': No such file or directory
TASK ERROR: lvcreate 'vps/pve-vm-1000' error: Logical Volume "vm-1000-cloudinit" already exists in volume group "vps"

the lvm cloud-init device is not avaiable and it can't be created because it exists already. Is it a bug in the new proxmox versions? I'm using 5.4-5.

Thank you.
 

pushakk

New Member
May 24, 2019
2
0
1
40
Hello starnetwork and thank you.

If I change the storage for cloud-init device it works fine, but whenever I clone the template the device for cloud-init in the new cloned guest is in the same target storage that the disk for the guest not the same storage for the template cloud-init device.

I mean, my lvm storage is named vps

template -> lvm vps
cloud-init device -> local-vm

When I clone the template (full clone) I get

cloned kvm -> lvm vps (I select it in the clone options)
cloud-init device -> lvm vps (despite of the template was in local-lvm)

And then the cloned kvm fails with the error in my first question. It is for a autoprovisioning system so I can't change it manually each time.
 
Last edited:

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE 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 your own in 60 seconds.

Buy now!