qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] hdd and ssd passthrough


From: Paolo Bonzini
Subject: Re: [Qemu-devel] hdd and ssd passthrough
Date: Thu, 18 Oct 2012 08:39:18 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121009 Thunderbird/16.0

Il 17/10/2012 23:20, Mario Giammarco ha scritto:
> Hello,
> I hope I am in the right list.
> I would like to pass a real disk to a guest (freenas) in kvm/qemu without
> iommu/vt-d.
> 
> I need guest to be able to:
> 
> - use hdd smart;
> - configure hdd params like power saving;
> - understand real make and model of hdd;
> - understand when the hdd is an ssd.

This is really a libvirt question more than QEMU... anyway if your guest
is new enough (Linux 3.4 or RHEL/CentOS 6.3) you can probably use
virtio-scsi with XML that looks like this (using "virsh edit"):

<controller type='scsi' model='virtio-scsi'/>
<disk type='block' device='lun'>
      <driver name='qemu' type='raw' cache='none'/>
      <source dev='/dev/sdb'/>
      <target dev='sda' bus='scsi'/>
</disk>

For passthrough you need the "device='lun'" setting.

You can also use virsh from the command line to achieve the same.
Write the <controller> and <disk> elements to a new file, like hba.xml
and sdb.xml.  Then:

# virsh attach-device --persistent Guest1 ~/hba.xml
# virsh attach-device --persistent Guest1 ~/sdb.xml

virt-manager and virt-install don't yet fully support virtio-scsi.

Paolo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]