From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:51348) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RVj9N-0006Jc-5D for qemu-devel@nongnu.org; Wed, 30 Nov 2011 07:20:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RVj9L-0006qB-Ci for qemu-devel@nongnu.org; Wed, 30 Nov 2011 07:20:33 -0500 Received: from mx1.redhat.com ([209.132.183.28]:59546) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RVj9L-0006p5-4K for qemu-devel@nongnu.org; Wed, 30 Nov 2011 07:20:31 -0500 Date: Wed, 30 Nov 2011 12:20:30 +0000 From: "Daniel P. Berrange" Message-ID: <20111130122030.GW28621@redhat.com> References: <20111130121142.GA14986@arachsys.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20111130121142.GA14986@arachsys.com> Subject: Re: [Qemu-devel] Using AHCI drives in qemu Reply-To: "Daniel P. Berrange" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Chris Webb Cc: qemu-devel@nongnu.org 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 :|