All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrange" <berrange@redhat.com>
To: Chris Webb <chris@arachsys.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Using AHCI drives in qemu
Date: Wed, 30 Nov 2011 12:20:30 +0000	[thread overview]
Message-ID: <20111130122030.GW28621@redhat.com> (raw)
In-Reply-To: <20111130121142.GA14986@arachsys.com>

On Wed, Nov 30, 2011 at 12:11:45PM +0000, Chris Webb wrote:
> Possible a stupid question, but noting the new AHCI support in qemu, how do
> I specify an AHCI drive to attach to a qemu VM?
> 
> I can create IDE, SCSI and virtio drives with
> 
>   -drive if=ide,bus=M,unit=N,...
>   -drive if=scsi,bus=M,unit=N,...
>   -drive if=virtio,index=N,...
> 
> but when I attempted to test AHCI, a variety of plausible things I tried
> like
> 
>   -drive if=ahci,...
>   -drive if=ide-ahci,...
>   -drive if=ide,bus=ahci.0,...
> 
> all failed. There's no mention of AHCI in qemu-options.hx or qemu-doc.texi,
> nor anything in the git commit log history about using this new drive type.

Using  -drive with an if=XXX which is anything other than 'none' is the
deprecated / legacy syntax. The way libvirt does AHCI is to use the more
verbose/modern syntax:

    -device ahci,id=ahci0
    -drive  if=none,file=/var/lib/libvirt/images/test/disk0.raw,format=raw,id=drive-sata0-0-0
    -device ide-drive,bus=ahci0.0,drive=drive-sata0-0-0,id=sata0-0-0

The first -device there creates the AHCI controller. The -drive specifies
the disk backing store that will be used. The last -device there connects
the drive to the ACHI controller as an ide-drive.

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

  reply	other threads:[~2011-11-30 12:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-30 12:11 [Qemu-devel] Using AHCI drives in qemu Chris Webb
2011-11-30 12:20 ` Daniel P. Berrange [this message]
2011-11-30 12:42   ` Chris Webb
2011-11-30 12:51     ` Daniel P. Berrange
2011-11-30 12:55   ` Andreas Färber

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=20111130122030.GW28621@redhat.com \
    --to=berrange@redhat.com \
    --cc=chris@arachsys.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.