[SOLVED] unable to create vm with qm

lessfoobar

New Member
Feb 13, 2022
15
1
1
124
So I'm unable to create a vm with qm or pvesh. I can create them with the webui no problem. The commands I use are bellow plus their output.
Bash:
root@proxmox:~# pvesm alloc VM-OS-Drives 106 vm-106-disk-0 1M --format raw
successfully created 'VM-OS-Drives:vm-106-disk-0'
root@proxmox:~# pvesm alloc VM-OS-Drives 106 vm-106-disk-1 4M --format raw
successfully created 'VM-OS-Drives:vm-106-disk-1'
root@proxmox:~# pvesm alloc VM-OS-Drives 106 vm-106-disk-2 32G --format raw
successfully created 'VM-OS-Drives:vm-106-disk-2'
root@proxmox:~# qm create 106 -acpi "1" -agent "enabled=1,fstrim_cloned_disks=1,type=virtio," -bios "ovmf" -boot "order=virtio0;sata0;sata1" -cores 4 -cpu "IvyBridge" -description "Test VM" -efidisk0 "VM-OS-Drives:vm-106-disk-0,efitype=4m,pre-enrolled-keys=1,size=1M" -hotplug "disk,network,usb" -sata0 "ISOs:iso/rhel-baseos-9.1-x86_64-dvd.iso,media=cdrom,size=8641M" -sata1 "ISOs:iso/rhel_9_general_32_ks.iso,media=cdrom,size=354K" -kvm true -localtime true -machine "q35" -memory 16384 -name "test" -net0 "model=virtio,macaddr=52:54:00:00:00:ee,mtu=1500,bridge=vmbr4,firewall=1" -numa 0 -onboot true -ostype "l26" -protection false -rng0 "source=/dev/urandom,max_bytes=1024" -scsihw "virtio-scsi-single" -sockets 1 -startdate now -startup "order=3" -tablet true -tags "test_system" -tpmstate0 "VM-OS-Drives:vm-106-disk-1,size=4M,version=v2.0" -vga "type=std,memory=16" -virtio0 "VM-OS-Drives:vm-106-disk-2,discard=on,iothread=1,size=32G" -vmgenid 1 -vmstatestorage "VM-OS-Drives"
root@proxmox:~# qm start 106
swtpm: Formatting 'file:///dev/zvol/rpool/vm-drives/vm-106-disk-1' as new linear NVRAM store
swtpm_setup: Starting vTPM manufacturing as root:root @ Sun 30 Apr 2023 06:37:02 PM CEST
swtpm_setup: TPM is listening on Unix socket.
swtpm_setup: Successfully created RSA 2048 EK with handle 0x81010001.
swtpm_setup:   Invoking /usr/bin/swtpm_localca --type ek --ek a1b192716998e73604050cef2de2e7a87f691e7241c569ed53c40a647d70b33ef99fcf1d117024d40da52dd443a12c5b8140cbffac6a6b5a140ba1589632accdc9c8676b7f8041cf40bdc3aa0bea275186c9d4eebb0a656e57e3538c2c6fbdc25628b8e727bfa3541b5bc6c6c757448ac6abbd286a97357fd60065b96e6fa83a79d94b72621485e5a7b5f419ad3818691953a546adc65978e97e73eaeb2c3d36c169252ff3c74a8ff14ca1b2f8419c771b983f9b659ec3d7c5d42267bf9c8ed0ea99b9fcf33cfbf187db942709421953f8c7eb0f395a400d1ec56a92c5bda98dd1135c50864058b09a487c1bc87915ec88ae4df779e0772b8d3714afd613052b --dir /tmp/swtpm_setup.certs.0W0Y31 --tpm-spec-family 2.0 --tpm-spec-level 0 --tpm-spec-revision 164 --tpm-manufacturer id:00001014 --tpm-model swtpm --tpm-version id:20191023 --tpm2 --configfile /etc/swtpm-localca.conf --optsfile /etc/swtpm-localca.options
swtpm_setup: swtpm_localca: Successfully created EK certificate locally.
swtpm_setup:   Invoking /usr/bin/swtpm_localca --type platform --ek a1b192716998e73604050cef2de2e7a87f691e7241c569ed53c40a647d70b33ef99fcf1d117024d40da52dd443a12c5b8140cbffac6a6b5a140ba1589632accdc9c8676b7f8041cf40bdc3aa0bea275186c9d4eebb0a656e57e3538c2c6fbdc25628b8e727bfa3541b5bc6c6c757448ac6abbd286a97357fd60065b96e6fa83a79d94b72621485e5a7b5f419ad3818691953a546adc65978e97e73eaeb2c3d36c169252ff3c74a8ff14ca1b2f8419c771b983f9b659ec3d7c5d42267bf9c8ed0ea99b9fcf33cfbf187db942709421953f8c7eb0f395a400d1ec56a92c5bda98dd1135c50864058b09a487c1bc87915ec88ae4df779e0772b8d3714afd613052b --dir /tmp/swtpm_setup.certs.0W0Y31 --tpm-spec-family 2.0 --tpm-spec-level 0 --tpm-spec-revision 164 --tpm-manufacturer id:00001014 --tpm-model swtpm --tpm-version id:20191023 --tpm2 --configfile /etc/swtpm-localca.conf --optsfile /etc/swtpm-localca.options
swtpm_setup: swtpm_localca: Successfully created platform certificate locally.
swtpm_setup: Successfully created NVRAM area 0x1c00002 for RSA 2048 EK certificate.
swtpm_setup: Successfully created NVRAM area 0x1c08000 for platform certificate.
swtpm_setup: Successfully created ECC EK with handle 0x81010016.
swtpm_setup:   Invoking /usr/bin/swtpm_localca --type ek --ek x=df5fa65c50712d156b0389bbd88a8e1b6c4c05d7c84f0b79e2d68a2f14ea1e3b0439998968aa5945774f98d5daa85497,y=8c4a127d7605219306954ed38ea55268512db9fc95c0da399aa2ce6047172aa45532b796415ce8a3fff10f2ebac2aa20,id=secp384r1 --dir /tmp/swtpm_setup.certs.0W0Y31 --tpm-spec-family 2.0 --tpm-spec-level 0 --tpm-spec-revision 164 --tpm-manufacturer id:00001014 --tpm-model swtpm --tpm-version id:20191023 --tpm2 --configfile /etc/swtpm-localca.conf --optsfile /etc/swtpm-localca.options
swtpm_setup: swtpm_localca: Successfully created EK certificate locally.
swtpm_setup: Successfully created NVRAM area 0x1c00016 for ECC EK certificate.
swtpm_setup: Successfully activated PCR banks sha256 among sha1,sha256,sha384,sha512.
swtpm_setup: Successfully authored TPM state.
swtpm_setup: Ending vTPM manufacturing @ Sun 30 Apr 2023 06:37:03 PM CEST
root@proxmox:~#
the problem that I'm facing is when I create it from the cli and my console is showing: "Guest is not initialized the display (yet).
1682873280306.png
Here is the hardware window:
1682940108384.png
And the Options window:
1682873428635.png
I'm 99% sure that I'm missing something but I don't know what. I'd be more than happy for some second pair of eyes.
 
Last edited:
Hi,
Bash:
root@proxmox:~# pvesm alloc VM-OS-Drives 106 vm-106-disk-1 4M --format raw
successfully created 'VM-OS-Drives:vm-106-disk-1'
I think the issue is that you allocate an empty disk and then tell Proxmox VE to use that as the EFI disk for the VM. When you do it in the web UI, the EFI disk will be created by copying over the default EFI variables to the disk. You can also allocate a new EFI disk with those default variables via CLI by using the special syntax
Code:
-efidisk0 "VM-OS-Drives:0,efitype=4m,pre-enrolled-keys=1"
 
Hi thanks for the feedback. My error was that for the storage I've misunderstood the docu. I assumed the size will be put in place after the $STORAGE:$SIZE which was not the case, I had to use $STORAGE:0
but yeah it works in the end
 
Hi thanks for the feedback. My error was that for the storage I've misunderstood the docu. I assumed the size will be put in place after the $STORAGE:$SIZE which was not the case, I had to use $STORAGE:0
but yeah it works in the end
You can put the size there and for other disks that makes a difference. For EFI disks, the size is determined automatically, so you can just use 0, but it also should work with other values.
 

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!