qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] hdd and ssd passthrough
@ 2012-10-17 21:20 Mario Giammarco
  2012-10-18  6:39 ` Paolo Bonzini
  0 siblings, 1 reply; 2+ messages in thread
From: Mario Giammarco @ 2012-10-17 21:20 UTC (permalink / raw)
  To: qemu-devel

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.

How can I do it?
I have configured the guest with virt-manager.

Thanks you very much in advance.

Mario

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] hdd and ssd passthrough
  2012-10-17 21:20 [Qemu-devel] hdd and ssd passthrough Mario Giammarco
@ 2012-10-18  6:39 ` Paolo Bonzini
  0 siblings, 0 replies; 2+ messages in thread
From: Paolo Bonzini @ 2012-10-18  6:39 UTC (permalink / raw)
  To: Mario Giammarco; +Cc: qemu-devel

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-10-18  6:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-17 21:20 [Qemu-devel] hdd and ssd passthrough Mario Giammarco
2012-10-18  6:39 ` Paolo Bonzini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).