I will be as quick as possible, since the question tends to be specific to one option of the command. As the titles states, in an effort to pass through a usb-hdd to a VM I did the following from cli
First identified the usb disk Id with
ls -n /dev/disk/by-id/
Afterwards, passed that disk to the VM (Vm shut down) with the command
qm set [VM-ID] -virtio2 /dev/disk/by-id/[DISK-ID]
Even though, after started the VM noticed the disk in disk management only, had the probably well known problem of the disk being offline
<<Disk Is Offline Because of Policy Set by an Administrator>>. There are 3 ways to fix this with the first way being simple the simplest of the all
(ok left click and make it online) nothing seemed to work and each action stuck/froze the VM. I couldn't shut it down (only with cli qm stop and it took 5 mins to give the termsig signal) and I couldn t start it up as well (stuck at loading). When I was detaching the disk in 5 sec WinServ was at the login screen.
I decided to pass the disk with -scsi1 option instead of -virtio1 and the results were the same. Froze Vm at each action.
As a last attempt, I passed the disk with the option -sata1 like
qm set [VM-ID] -sata /dev/disk/by-id/[DISK-ID]
Well it worked like a charm. Booted, seen the disk, assigned it a letter all automatically and I could continue with my work.
So my question is...... what physical characteristic of the disk is that, that has an impact of the option someone has to use in order to pass it ot a VM?
Are sata drives meant to be used with -sata only option (for qm set)? Do sas drives play with both -iscsi and -virtio option? Was my problem irrelevant to all of the above and a sata disk could be passed with all the options? (sata/iscsi/virtio)?
PS I know that this has to do with the driver that the user dictates the VM to see the disk, so I tent to believe the type of disk to be passed is irrelevant to the option used but I want to be sure. Any thoughts?
First identified the usb disk Id with
ls -n /dev/disk/by-id/
Afterwards, passed that disk to the VM (Vm shut down) with the command
qm set [VM-ID] -virtio2 /dev/disk/by-id/[DISK-ID]
Even though, after started the VM noticed the disk in disk management only, had the probably well known problem of the disk being offline
<<Disk Is Offline Because of Policy Set by an Administrator>>. There are 3 ways to fix this with the first way being simple the simplest of the all
(ok left click and make it online) nothing seemed to work and each action stuck/froze the VM. I couldn't shut it down (only with cli qm stop and it took 5 mins to give the termsig signal) and I couldn t start it up as well (stuck at loading). When I was detaching the disk in 5 sec WinServ was at the login screen.
I decided to pass the disk with -scsi1 option instead of -virtio1 and the results were the same. Froze Vm at each action.
As a last attempt, I passed the disk with the option -sata1 like
qm set [VM-ID] -sata /dev/disk/by-id/[DISK-ID]
Well it worked like a charm. Booted, seen the disk, assigned it a letter all automatically and I could continue with my work.
So my question is...... what physical characteristic of the disk is that, that has an impact of the option someone has to use in order to pass it ot a VM?
Are sata drives meant to be used with -sata only option (for qm set)? Do sas drives play with both -iscsi and -virtio option? Was my problem irrelevant to all of the above and a sata disk could be passed with all the options? (sata/iscsi/virtio)?
PS I know that this has to do with the driver that the user dictates the VM to see the disk, so I tent to believe the type of disk to be passed is irrelevant to the option used but I want to be sure. Any thoughts?