[SOLVED] Can't get working ubuntu cloud images.

rnmkr

Member
Mar 10, 2019
13
2
8
30
Hi, I wanted to try out ubuntu cloud images by following this documentation. https://pve.proxmox.com/wiki/Cloud-Init_Support
However 4th command is not working.

```
# download the image
wget https://cloud-images.ubuntu.com/bionic/current/bionic-server-cloudimg-amd64.img

# create a new VM
qm create 9000 --memory 2048 --net0 virtio,bridge=vmbr0

# import the downloaded disk to local-lvm storage
qm importdisk 9000 bionic-server-cloudimg-amd64.img local-lvm

# finally attach the new disk to the VM as scsi drive
qm set 9000 --scsihw virtio-scsi-pci --scsi0 local-lvm:vm-9000-disk-1
```

When I run this command qm set 9000 --scsihw virtio-scsi-pci --scsi0 local-lvm:vm-9000-disk-1 it gives error: can't get size of '/dev/pve/vm-9000-disk-1': Failed to find logical volume "pve/vm-9000-disk-1"

How can I make it work? Thank you. Actually someone reported this issue earlier here. But looks like no one solved it.
 
Got it working by luck. If I run this command 2 times, it works.

Found the reason of it.

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

should be

qm set 9000 --scsihw virtio-scsi-pci --scsi0 local-lvm:vm-9000-disk-0. Reason why this worked when I ran the command 2 times, it creates disk-0 at first run and disk-1 at second run thus resulting success.

So creating disk-0 would be correct command.
 

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!