From: Paolo Bonzini <pbonzini@redhat.com>
To: Mario Giammarco <mgiammarco@gmail.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] hdd and ssd passthrough
Date: Thu, 18 Oct 2012 08:39:18 +0200 [thread overview]
Message-ID: <507FA416.4060104@redhat.com> (raw)
In-Reply-To: <loom.20121017T231832-395@post.gmane.org>
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
prev parent reply other threads:[~2012-10-18 6:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-17 21:20 [Qemu-devel] hdd and ssd passthrough Mario Giammarco
2012-10-18 6:39 ` Paolo Bonzini [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=507FA416.4060104@redhat.com \
--to=pbonzini@redhat.com \
--cc=mgiammarco@gmail.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).