qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] Using AHCI drives in qemu
@ 2011-11-30 12:11 Chris Webb
  2011-11-30 12:20 ` Daniel P. Berrange
  0 siblings, 1 reply; 5+ messages in thread
From: Chris Webb @ 2011-11-30 12:11 UTC (permalink / raw)
  To: qemu-devel

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.

Best wishes,

Chris.

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

* Re: [Qemu-devel] Using AHCI drives in qemu
  2011-11-30 12:11 [Qemu-devel] Using AHCI drives in qemu Chris Webb
@ 2011-11-30 12:20 ` Daniel P. Berrange
  2011-11-30 12:42   ` Chris Webb
  2011-11-30 12:55   ` Andreas Färber
  0 siblings, 2 replies; 5+ messages in thread
From: Daniel P. Berrange @ 2011-11-30 12:20 UTC (permalink / raw)
  To: Chris Webb; +Cc: qemu-devel

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 :|

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

* Re: [Qemu-devel] Using AHCI drives in qemu
  2011-11-30 12:20 ` Daniel P. Berrange
@ 2011-11-30 12:42   ` Chris Webb
  2011-11-30 12:51     ` Daniel P. Berrange
  2011-11-30 12:55   ` Andreas Färber
  1 sibling, 1 reply; 5+ messages in thread
From: Chris Webb @ 2011-11-30 12:42 UTC (permalink / raw)
  To: Daniel P. Berrange; +Cc: qemu-devel

Thanks for the swift reply!

"Daniel P. Berrange" <berrange@redhat.com> writes:

> 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

Gosh, this is incredibly verbose for normal command line use. Whilst I can
see it's nice to have fine control over the detail (and bus/device ids) when
you need it, having to write out a command line of that length just to
attach a drive is a real pity.

I could cook up a patch to do something sane with -drive if=ahci as a more
manageable command-line alternative, but is there any chance of this being
accepted if that you're describing the compact syntax as deprecated?

Cheers,

Chris.

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

* Re: [Qemu-devel] Using AHCI drives in qemu
  2011-11-30 12:42   ` Chris Webb
@ 2011-11-30 12:51     ` Daniel P. Berrange
  0 siblings, 0 replies; 5+ messages in thread
From: Daniel P. Berrange @ 2011-11-30 12:51 UTC (permalink / raw)
  To: Chris Webb; +Cc: qemu-devel

On Wed, Nov 30, 2011 at 12:42:56PM +0000, Chris Webb wrote:
> Thanks for the swift reply!
> 
> "Daniel P. Berrange" <berrange@redhat.com> writes:
> 
> > 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
> 
> Gosh, this is incredibly verbose for normal command line use. Whilst I can
> see it's nice to have fine control over the detail (and bus/device ids) when
> you need it, having to write out a command line of that length just to
> attach a drive is a real pity.
> 
> I could cook up a patch to do something sane with -drive if=ahci as a more
> manageable command-line alternative, but is there any chance of this being
> accepted if that you're describing the compact syntax as deprecated?

I'm fairly sure such a patch would still be accepted.

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 :|

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

* Re: [Qemu-devel] Using AHCI drives in qemu
  2011-11-30 12:20 ` Daniel P. Berrange
  2011-11-30 12:42   ` Chris Webb
@ 2011-11-30 12:55   ` Andreas Färber
  1 sibling, 0 replies; 5+ messages in thread
From: Andreas Färber @ 2011-11-30 12:55 UTC (permalink / raw)
  To: Chris Webb; +Cc: qemu-devel

Am 30.11.2011 13:20, schrieb Daniel P. Berrange:
> 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.

Also note that -device ide-cd on ahci bus is known broken, and ahci is
not yet migratable (working on it).

Andreas

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg

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

end of thread, other threads:[~2011-11-30 12:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-30 12:11 [Qemu-devel] Using AHCI drives in qemu Chris Webb
2011-11-30 12:20 ` Daniel P. Berrange
2011-11-30 12:42   ` Chris Webb
2011-11-30 12:51     ` Daniel P. Berrange
2011-11-30 12:55   ` Andreas Färber

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).