pve 3 fails to add 2nd disk to vm using ext4 storage

totalimpact

Renowned Member
Dec 12, 2010
133
19
83
Running pveversion pve-manager/3.0/0428106c

I have a 4tb USB3 drive attached to my server, and I wish to add the 2nd partition to a windows vm, but get errors when using qm set, or assigning it in the vm config, I have tried both ide0, and sata0, the entire dev, or just the partition, setting media=disk, but the vm fails to boot

Code:
root@pve1:/etc/pve/qemu-server# parted /dev/sdc print
Model: Seagate Backup+ Desk (scsi)
Disk /dev/sdc: 4001GB
Sector size (logical/physical): 4096B/4096B
Partition Table: gpt


Number  Start   End     Size    File system  Name     Flags
 1      1049kB  3400GB  3400GB               primary
 2      3400GB  4001GB  601GB                primary


root@pve1:/etc/pve/qemu-server# qm set 132 -sata0 /dev/sdc
root@pve1:/etc/pve/qemu-server# qm start 132
kvm: -drive file=/dev/sdc,if=none,id=drive-ide0,aio=native,cache=none: could not open disk image /dev/sdc: Invalid argument

after the set command, my vm conf looks like this:
Code:
boot: dcn
bootdisk: virtio0
cores: 6
ide2: local:iso/virtio-win-0.1-59.iso,media=cdrom,size=60572K
memory: 16000
name: SBS2011
net0: virtio=52:B8:01:98:56:DF,bridge=vmbr0
onboot: 1
ostype: win7
parent: CurrentServerState
sata0: /dev/sdc,size=3907018580K
#also tried: ide0: /dev/sdc2,size=572954M
sockets: 1
virtio0: RAID10:132/vm-132-disk-1.qcow2,format=qcow2,size=121G
virtio1: RAID10:132/vm-132-disk-3.qcow2,format=qcow2,size=300G

[CurrentServerState]...
...snapshot info ommitted
 
Last edited:
Re: pve 3 fails qm VMID set ide0 dev to add complete disk to vm

Actually this appears to be an issue with adding any drive type, including qcows, adding virtio2 in the config below causes the vm to error on starting:

Code:
boot: ccn
bootdisk: virtio1
cores: 6
ide2: local:iso/virtio-win-0.1-59.iso,media=cdrom,size=60572K
memory: 16000
name: SBS2011
net0: virtio=52:B8:01:98:56:DF,bridge=vmbr0
onboot: 1
ostype: win7
sockets: 1
virtio0: RAID10:132/vm-132-disk-1.qcow2,format=qcow2,size=121G
virtio1: RAID10:132/vm-132-disk-3.qcow2,format=qcow2,size=300G
virtio2: USBBackup:132/vm-132-disk-1.qcow2,format=qcow2,backup=no,size=200G

Code:
kvm: -drive file=/mnt/4000/images/132/vm-132-disk-1.qcow2,if=none,id=drive-virtio2,format=qcow2,aio=native,cache=none: could not open disk image /mnt/4000/images/132/vm-132-disk-1.qcow2: Invalid argument
 
Re: pve 3 fails qm VMID set ide0 dev to add complete disk to vm

updated to pve-manager/3.0/957f0862, still same issue.
 
Re: pve 3 fails qm VMID set ide0 dev to add complete disk to vm

replying to myself, it appears that I have narrowed this down to not being stored on ext3, although I am not sure how this matters if the it is being presented as a passthrough device. My USB drive is partitioned as:

sdc1: ext4
sdc2: ntfs

Using another storage media that is ext3 allows me to add any number of qcow drives.
 
Re: pve 3 fails qm VMID set ide0 dev to add complete disk to vm

Thanks Dietmar - that worked, one last question, since i was able to mount a usb to my VM, is there a way to make it hotpluggable to the VM and send mount/unmount commands to it so that it can be cleanly removed without a VM shutdown? I know there is also "qm set VMID -usb0"... but I dont think this allows hotplugging??

for others encountering this strange behavior-

I first ran this on ssh:
Code:
qm set VMID# -virtio1 /dev/sdc2

Then I edit the VM conf to enable the cache at: /etc/pve/qemu-server/VMID#.conf
Code:
virtio1: /dev/sdc2,size=572954M,cache=writeback,backup=no,snapshot=off,media=disk
 

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!