qm create does not create disk

Nov 14, 2018
1
0
1
123
Hi,

we have a proxmox 5.2.1 cluster with ceph and i would like to create new vm's with the following command:

qm create 8110 -name vm8110 -bootdisk scsi0 -scsi0 NVME:vm-8110-disk-0,size=60G -scsihw virtio-scsi-pci -memory 8192 -ostype l26 -sockets 2 -cores 2 -cpu host -numa 1 -net0 virtio,bridge=<VLAN>

unfortunately this command doesn't seem to create the mentioned disk scsi0:

qm start 8110
iothread is only valid with virtio disk or virtio-scsi-single controller, ignoring
kvm: -drive file=rbd:NVME/vm-8110-disk-0:conf=/etc/pve/ceph.conf:id=admin:keyring=/etc/pve/priv/ceph/NVME.keyring,if=none,id=drive-scsi0,format=raw,cache=none,aio=native,detect-zeroes=on: error reading header from vm-8110-disk-0: No such file or directory

Why is the disk not created and how can i get qm to create the disk when creating the vm ?

Regards
Frank
 
there is a special syntax for creating disks with the api:
Code:
-scsi0 NVME:60
instead of using the full name (vm-x-disk-y)
 
Hi! so, how is the full command to create VM and disk at same time?
Code:
qm create 107 --name preseed --ostype l26 --cdrom Instaladores:iso/preseed-debian10_v2.iso --cores 1 --memory 1024 --net0 virtio,bridge=vmbr0,firewall=1,tag=11 --scsi0 local-lvm:vm-107-disk-0,size=20G
It´s not working

Code:
kvm: -drive file=/dev/pve/vm-107-disk-0,if=none,id=drive-scsi0,format=raw,cache=none,aio=native,detect-zeroes=on: Could not open '/dev/pve/vm-107-disk-0': No such file or directory
TASK ERROR: start failed: QEMU exited with code 1

Thanks in advance!!!
 
Hi,
as @dcsapak said, you have to use the special syntax --scsi0 local-lvm:20 instead of using a full volume ID --scsi0 local-lvm:vm-107-disk-0,size=20G. When you use the full volume ID, the qm create command thinks that you already have a volume. The full command is
Code:
qm create 107 --name preseed --ostype l26 --cdrom Instaladores:iso/preseed-debian10_v2.iso --cores 1 --memory 1024 --net0 virtio,bridge=vmbr0,firewall=1,tag=11 --scsi0 local-lvm:20
in your 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!