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