yuri1987

New Member
May 12, 2018
2
0
1
37
hey guys, I'm working on extending current salt cloud module to support cloud-init (for qemu new vm's/clones)

from a first look, looks quite simple, just add ide[n] config with the following for example:
"ide0" : "local:101/vm-101-cloudinit.qcow2,media=cdrom" (this varies based on the next available id for VM)
and this is indeed working, also I can populate the cloud-init args such as IP and DNS...

my problem is that I can't start the VM after creation, I'm getting the following error:
TASK ERROR: volume 'local:101/vm-101-cloudinit.qcow2' does not exist

I've tried changing to raw instead of qcow2 or adding size argument, nothing helps
the only solution I found is to go to the cloud-init section in gui and press regenerate image, I've tried to inspect what it does, and I saw it sends a put request to the /config endpoint, my current problem is that i don't know exactly what to send to this endpoint so it will regenerate the cloud-init image

any suggestions?
 
Hi dietmar, thank you for your fast response, it seems that I have tried to overcomplicate it, as the qm example says, it is sufficient just to pass the storage name + :cloudinit, without specifying vmid or image file type in this way:
local:cloudinit
local-lvm:cloudinit

I was able to proceed with my use case
 

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!