Ubuntu cloud image issue

akv

Member
Nov 15, 2019
11
0
21
41
Hello,

I followed the instructions from this article Cloud-Init Support
Code:
wget https://cloud-images.ubuntu.com/bionic/current/bionic-server-cloudimg-amd64.img
qm create 9000 --memory 2048 --net0 virtio,bridge=vmbr0
qm importdisk 9000 bionic-server-cloudimg-amd64.img local-lvm
qm set 9000 --scsihw virtio-scsi-pci --scsi0 local-lvm:vm-9000-disk-1
qm set 9000 --ide2 local-lvm:cloudinit
qm set 9000 --boot c --bootdisk scsi0
qm set 9000 --serial0 socket --vga serial0
qm template 9000

As a result, after cloning, the virtual machine does not boot.
SCREEN SHOT 2019-11-30 AT 19.12.44.jpeg

Package versions:

Code:
proxmox-ve: 6.0-2 (running kernel: 5.0.21-5-pve)
pve-manager: 6.0-15 (running version: 6.0-15/52b91481)
pve-kernel-helper: 6.0-12
pve-kernel-5.0: 6.0-11
pve-kernel-5.0.21-5-pve: 5.0.21-10
pve-kernel-5.0.15-1-pve: 5.0.15-1
ceph-fuse: 12.2.11+dfsg1-2.1+b1
corosync: 3.0.2-pve4
criu: 3.11-3
glusterfs-client: 5.5-3
ksm-control-daemon: 1.3-1
libjs-extjs: 6.0.1-10
libknet1: 1.13-pve1
libpve-access-control: 6.0-5
libpve-apiclient-perl: 3.0-2
libpve-common-perl: 6.0-9
libpve-guest-common-perl: 3.0-3
libpve-http-server-perl: 3.0-3
libpve-storage-perl: 6.0-12
libqb0: 1.0.5-1
libspice-server1: 0.14.2-4~pve6+1
lvm2: 2.03.02-pve3
lxc-pve: 3.2.1-1
lxcfs: 3.0.3-pve60
novnc-pve: 1.1.0-1
proxmox-mini-journalreader: 1.1-1
proxmox-widget-toolkit: 2.1-1
pve-cluster: 6.0-9
pve-container: 3.0-14
pve-docs: 6.0-9
pve-edk2-firmware: 2.20190614-1
pve-firewall: 4.0-8
pve-firmware: 3.0-4
pve-ha-manager: 3.0-5
pve-i18n: 2.0-3
pve-qemu-kvm: 4.1.1-1
pve-xtermjs: 3.13.2-1
qemu-server: 6.1-1
smartmontools: 7.0-pve2
spiceterm: 3.1-1
vncterm: 1.6-1
zfsutils-linux: 0.8.2-pve2
 
Look through the output of pvesm list local-lvm, does it contain local-lvm:vm-9000-disk-1? Could be the importdisk command create a disk with the name vm-900-disk-0 instead. If so you will have to set it to the correct one: qm set 9000 --scsi0 local-lvm:vm-9000-disk-0
 
  • Like
Reactions: rnmkr
Look through the output of pvesm list local-lvm, does it contain local-lvm:vm-9000-disk-1? Could be the importdisk command create a disk with the name vm-900-disk-0 instead. If so you will have to set it to the correct one: qm set 9000 --scsi0 local-lvm:vm-9000-disk-0
My config:

Code:
root@pve:/tmp# pvesm list local-lvm
Volid                       Format  Type              Size VMID
local-lvm:base-9000-disk-0  raw     images      2361393152 9000
local-lvm:vm-101-cloudinit  raw     images         4194304 101
local-lvm:vm-101-disk-0     raw     images      2361393152 101
local-lvm:vm-9000-cloudinit raw     images         4194304 9000

root@pve:/tmp# cat /etc/pve/qemu-server/9000.conf
boot: c
bootdisk: scsi0
ide2: local-lvm:vm-9000-cloudinit,media=cdrom
memory: 2048
net0: virtio=AA:28:FC:43:EE:04,bridge=vmbr0
scsi0: local-lvm:base-9000-disk-0,size=2252M
scsihw: virtio-scsi-pci
serial0: socket
smbios1: uuid=a83bb482-3704-4706-8197-cb328cb5fe8c
template: 1
vga: serial0
vmgenid: 1337fa9b-361d-4a97-9ada-5d612d07d4b9
 
Look through the output of pvesm list local-lvm, does it contain local-lvm:vm-9000-disk-1? Could be the importdisk command create a disk with the name vm-900-disk-0 instead. If so you will have to set it to the correct one: qm set 9000 --scsi0 local-lvm:vm-9000-disk-0

I saw that same post, but I confirmed that was not the issue. I did not have any errors on the "set" command either. i confirmed that in the GUI, it showed "unused disk" and once I ran the "set" command, it made it the hard disk.

Code:
root@virthost01:~# pvesm list local-lvm
Volid                      Format  Type            Size VMID
local-lvm:vm-100-cloudinit raw     images       4194304 100
local-lvm:vm-100-disk-1    raw     images    2361393152 100
local-lvm:vm-101-cloudinit raw     images       4194304 101
local-lvm:vm-101-disk-0    raw     images    2361393152 101


root@virthost01:~# cat /etc/pve/qemu-server/100.conf
boot: c
bootdisk: scsi0
cores: 8
ide2: local-lvm:vm-100-cloudinit,media=cdrom
memory: 16396
name: ubuntu-xenial-16.04
net0: virtio=72:D4:1B:98:1F:BA,bridge=vmbr0
numa: 0
ostype: l26
scsi0: local-lvm:vm-100-disk-1,size=2252M
scsihw: virtio-scsi-pci
serial0: socket
smbios1: uuid=172f195a-8564-4d67-8b1a-39e13fab1b90
sockets: 1
template: 1
vga: serial0
vmgenid: 85474c28-2717-4998-8e86-02e256ebe08f

And the command I run (I didn't use the 9000 id - but I tried that ID before)...

Code:
qm set 100 --scsihw virtio-scsi-pci --scsi0 local-lvm:vm-100-disk-1

I also tried Xenial (16.04 Ubuntu) with the same type of results.

Any thoughts?
 
Last edited:
I haven't yet tried it, will do so as soon as possible. But we had a problem months ago where the cloudimg did not use any of the settings passed in. So perhaps there's something wrong with the cloudimg itself. Does 19.04 or a newer one work? Could you try a normal Ubuntu installation?

Could be that the default cloud-init configuration needs to be changed if you're using the Server one, here are some experiences from other users: https://forum.proxmox.com/threads/cloud-init-on-ubuntu-not-using-ubuntu-cloud-images.45107/
 
I haven't yet tried it, will do so as soon as possible. But we had a problem months ago where the cloudimg did not use any of the settings passed in. So perhaps there's something wrong with the cloudimg itself. Does 19.04 or a newer one work? Could you try a normal Ubuntu installation?

Could be that the default cloud-init configuration needs to be changed if you're using the Server one, here are some experiences from other users: https://forum.proxmox.com/threads/cloud-init-on-ubuntu-not-using-ubuntu-cloud-images.45107/


I tried the ubuntu cloud image 19.04 and 20.04, without success. Normal installation works.
 
The error message is:

Total translation table size: 0
Total rockridge attributes bytes: 417
Total directory bytes: 0
Path table size(bytes): 10
Max brk space used 0
178 extents written (0 MB)
kvm: -drive file=/var/lib/vz/images/102/vm-102-disk-0.qcow2,if=none,id=drive-scsi0,format=qcow2,cache=none,aio=native,detect-zeroes=on: file system may not support O_DIRECT
kvm: -drive file=/var/lib/vz/images/102/vm-102-disk-0.qcow2,if=none,id=drive-scsi0,format=qcow2,cache=none,aio=native,detect-zeroes=on: Could not open '/var/lib/vz/images/102/vm-102-disk-0.qcow2': Invalid argument
TASK ERROR: start failed: command '/usr/bin/kvm -id 102 -name stu-test-name -chardev 'socket,id=qmp,path=/var/run/qemu-server/102.qmp,server,nowait' -mon 'chardev=qmp,mode=control' -chardev 'socket,id=qmp-event,path=/var/run/qmeventd.sock,reconnect=5' -mon 'chardev=qmp-event,mode=control' -pidfile /var/run/qemu-server/102.pid -daemonize -smbios 'type=1,uuid=a526fc67-3d0a-4ef3-a337-2be5c4e95f42' -smp '4,sockets=2,cores=2,maxcpus=4' -nodefaults -boot 'menu=on,strict=on,reboot-timeout=1000,splash=/usr/share/qemu-server/bootsplash.jpg' -vnc unix:/var/run/qemu-server/102.vnc,x509,password -cpu host,+kvm_pv_unhalt,+kvm_pv_eoi -m 1024 -device 'pci-bridge,id=pci.2,chassis_nr=2,bus=pci.0,addr=0x1f' -device 'pci-bridge,id=pci.1,chassis_nr=1,bus=pci.0,addr=0x1e' -device 'piix3-usb-uhci,id=uhci,bus=pci.0,addr=0x1.0x2' -device 'usb-tablet,id=tablet,bus=uhci.0,port=1' -device 'VGA,id=vga,bus=pci.0,addr=0x2' -chardev 'socket,path=/var/run/qemu-server/102.qga,server,nowait,id=qga0' -device 'virtio-serial,id=qga0,bus=pci.0,addr=0x8' -device 'virtserialport,chardev=qga0,name=org.qemu.guest_agent.0' -device 'virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3' -iscsi 'initiator-name=iqn.1993-08.org.debian:01:c2864ecd62e9' -drive 'file=/var/lib/vz/images/102/vm-102-cloudinit.qcow2,if=none,id=drive-ide2,media=cdrom,aio=threads' -device 'ide-cd,bus=ide.1,unit=0,drive=drive-ide2,id=ide2,bootindex=200' -device 'virtio-scsi-pci,id=scsihw0,bus=pci.0,addr=0x5' -drive 'file=/var/lib/vz/images/102/vm-102-disk-0.qcow2,if=none,id=drive-scsi0,format=qcow2,cache=none,aio=native,detect-zeroes=on' -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0,id=scsi0,bootindex=100' -netdev 'type=tap,id=net0,ifname=tap102i0,script=/var/lib/qemu-server/pve-bridge,downscript=/var/lib/qemu-server/pve-bridgedown,vhost=on' -device 'virtio-net-pci,mac=2E:A0:6B:DD:A9:F5,netdev=net0,bus=pci.0,addr=0x12,id=net0,bootindex=300' -machine 'type=pc'' failed: exit code 1
 
And it is bizarre that kvm gets an error in the above on opening vm-102-disk-0.qcow2 given this:

Code:
$ ls -l
total 37
-rw-r----- 1 root root 5570560 Dec  6 21:25 vm-102-cloudinit.qcow2
-rw-r--r-- 1 root root  196864 Dec  5 21:48 vm-102-disk-0.qcow2
$ pwd
/var/lib/vz/images/102
$

Thoughts?
 
Same issue here.

I am using the instructions from here: https://pve.proxmox.com/wiki/Cloud-Init_Support

I am using proxmox 6.1-3

When it boots, it says "No bootable device"

My exact commands are as follows:

Code:
wget https://cloud-images.ubuntu.com/bionic/current/bionic-server-cloudimg-amd64.img

qm create 9000 --memory 2048 --net0 virtio,bridge=vmbr0

qm importdisk 9000 bionic-server-cloudimg-amd64.img vmstorage

qm set 9000 --scsihw virtio-scsi-pci --scsi0 vmstorage:vm-9000-disk-0

qm set 9000 --ide2 vmstorage:cloudinit

qm set 9000 --boot c --bootdisk scsi0

qm set 9000 --serial0 socket --vga serial0

All of those commands complete successfully.

Then, I click Start on the GUI and open the Console, and it loops over and over with no bootable disk.
 
Same issue here.

I am using the instructions from here: https://pve.proxmox.com/wiki/Cloud-Init_Support

I am using proxmox 6.1-3

When it boots, it says "No bootable device"

My exact commands are as follows:

Code:
wget https://cloud-images.ubuntu.com/bionic/current/bionic-server-cloudimg-amd64.img

qm create 9000 --memory 2048 --net0 virtio,bridge=vmbr0

qm importdisk 9000 bionic-server-cloudimg-amd64.img vmstorage

qm set 9000 --scsihw virtio-scsi-pci --scsi0 vmstorage:vm-9000-disk-0

qm set 9000 --ide2 vmstorage:cloudinit

qm set 9000 --boot c --bootdisk scsi0

qm set 9000 --serial0 socket --vga serial0

All of those commands complete successfully.

Then, I click Start on the GUI and open the Console, and it loops over and over with no bootable disk.

see https://bugzilla.proxmox.com/show_bug.cgi?id=2469
 

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!