Direct drive access and related questions

josetann

New Member
May 23, 2010
4
0
1
I need to give a particular vm direct access to multiple drives. The more "raw" the access, the better. IDE mode isn't an option due to the 4-drive limitation.

In particular, I'm trying to run an instance of unRAID. A native install allows it to view drive status (temperature, power status) as well as spin up/down individual drives. These are "nice to have" items, not "must-haves". Under "must-have" is the ability to see more than four drives plus the ability to assign specific serial numbers to these drives.

Here's the main questions:

I tried but was unable to get unRAID to work with anything other than ide drives. What modules are needed for it to recognize scsi and virtio?

How do I pass the drive's serial number to the vm?

unRAID is designed to boot from a usb drive. Can I easily export a usb device to a vm? In particular, I would need the GUID to show up correctly (license is based off that). Note that I can specify the kernel and initrd in the startup file, it's ok if kvm cannot boot a vm from a usb drive.
 
Last edited:
the serial number of the physical disk or of the virtual disk?

take a look on:
Code:
man kvm
 
I have tried setting the serial number for scsi like so:

args: -drive file=/dev/disk/by-id/scsi-SATA_WDC_WD10EACS-00_WD-WCASJ0107162,serial=WD-WCASJ0107162,if=scsi,index=1

The drive shows up, I'm able to access it, however the serial number is not being used. The id I'm given is: 0QEMU_QEMU_HARDDISK_scsi0-hd1 (as seen via /dev/disk/by-id, plus unraid's management screen). Note that I did not add the drive using qm (no way to get it to accept the serial parameter). It's only specified on the args: line, so that line is definitely being used (else the drive would not show up in the guest OS).
 
Last edited: