Hey,
I'm following the docs on creating a cloud-init template via cli, and ran into some errors. Maybe it's me, maybe others can check as well.
USER@HOST: user with root privs on current pve
(OK)
(OK)
Change local-lvm to local
Remove this VM with gui, rerun command that removes the error.
So here the local-lvm works does not work for me, local does
First change does not work.
What works is to only use the id:
Note that then also
fails, you need local in there as well.
Again: it might be me, but maybe it helps others.
I'm following the docs on creating a cloud-init template via cli, and ran into some errors. Maybe it's me, maybe others can check as well.
USER@HOST: user with root privs on current pve
Code:
/var/lib/vz/template/iso # wget https://cloud-images.ubuntu.com/bionic/current/bionic-server-cloudimg-amd64.img
Code:
/var/lib/vz/template/iso # qm create 9000 --memory 2048 --net0 virtio,bridge=vmbr0
Code:
/var/lib/vz/template/iso # qm importdisk 9000 bionic-server-cloudimg-amd64.img local-lvm
storage 'local-lvm' does not exists
Code:
/var/lib/vz/template/iso # qm importdisk 9000 bionic-server-cloudimg-amd64.img local-lvm
Configuration file 'nodes/controller/qemu-server/9000.conf' does not exist
Code:
/var/lib/vz/template/iso # qm set 9000 --scsihw virtio-scsi-pci --scsi0 local-lvm:vm-9000-disk-1
storage 'local-lvm' does not exists
/var/lib/vz/template/iso # qm importdisk 9000 bionic-server-cloudimg-amd64.img local
Formatting '/var/lib/vz/images/9000/vm-9000-disk-1.raw', fmt=raw size=2361393152
(100.00/100%)
Code:
/var/lib/vz/template/iso # qm set 9000 --scsihw virtio-scsi-pci --scsi0 local:vm-9000-disk-1
unable to parse directory volume name 'vm-9000-disk-1'
/var/lib/vz/template/iso # qm set 9000 --scsihw virtio-scsi-pci --scsi0 local:9000/vm-9000-disk-1
unable to parse volume filename 'vm-9000-disk-1'
What works is to only use the id:
Code:
/var/lib/vz/images/9000 # qm set 9000 --scsihw virtio-scsi-pci --scsi0 local:9000
update VM 9000: -scsi0 local:9000 -scsihw virtio-scsi-pci
Formatting '/var/lib/vz/images/9000/vm-9000-disk-2.raw', fmt=raw size=9663676416000
Code:
qm set 9000 --ide2 local-lvm:cloudinit
Again: it might be me, but maybe it helps others.
Last edited: