qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] Using AHCI drives in qemu


From: Daniel P. Berrange
Subject: Re: [Qemu-devel] Using AHCI drives in qemu
Date: Wed, 30 Nov 2011 12:20:30 +0000
User-agent: Mutt/1.5.21 (2010-09-15)

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 via email to

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