From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Daniel P. Berrange" Subject: Re: [et-mgmt-tools] Re: [libvirt] RE: [Qemu-devel] [ANNOUNCE] virt-mem tools version 0.2.8 released Date: Tue, 12 Aug 2008 11:30:53 +0100 Message-ID: <20080812103053.GH13067@redhat.com> References: <20080807104739.GN32548@redhat.com> <20080807130627.GA28036@amd.home.annexia.org> <90eb1dc70808070730q61ad5054r1796f8ce2ea73490@mail.gmail.com> <20080810012827.GD20183@shareable.org> <20080810100732.GA31209@amd.home.annexia.org> <20080811081819.GA4765@amd.home.annexia.org> <20080811084250.GG10550@redhat.com> Reply-To: "Daniel P. Berrange" Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: "Richard W.M. Jones" , kvm@vger.kernel.org To: james Return-path: Received: from mx1.redhat.com ([66.187.233.31]:57938 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751040AbYHLKbF (ORCPT ); Tue, 12 Aug 2008 06:31:05 -0400 Content-Disposition: inline In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On Tue, Aug 12, 2008 at 10:25:34PM +1200, james wrote: > > On 11/08/2008, at 8:42 PM, Daniel P. Berrange wrote: > >Configuring SCSI disks with VMs in libvirt is no different to > >configuring > >any other kind of block based storage. The general description is > >here: > > > > http://libvirt.org/formatdomain.html#elementsDisks > > > >Specifically though you'd want a disk section looking like > > > > > > > > > > > > > >NB, there is no restriction on mapping to the target bus -ie a SCSI > >disk in > >the host can be mapped to a IDE disk in the guest, and vica-verca. > >Also > >note that the 'dev' attribute on the target isn't a guarenteed > >device name > >in the guest - it is merely used for ordering of devices when > >spawning QEMU. > > > >Now, the main fun you'll have is actually outside of libvirt - > >namely that > >on Linux SCSI disk names are not guarenteed stable across reboots. So > >rather than using /dev/sdf1 you may want to consider one of the udev > >created > >stable paths under the directories /dev/disk/by-{id,path,uuid}, or > >if you are > >using a multipath enabled SAN, then a name under /dev/multipath/XXXX > > > >Regards, > >Daniel > > To be clear I have not tried to use block devices but 5 image files as > I am experimenting. I have tried to create VMs using raw image files > under libvirt via the nice Virtual Machine Manager 0.5.3 and through > hand crafted xml files. Neither method will register the images as > scsi disks, it fails with an error. Getting the same disk images to be > regarded as scsi disks via the kvm command line is fine or if I fall > back to ide and limit. The ide test proves that the rest of the xml > file is correct. > > Trying to define a domain using virsh using a disk section defined as: > > > > > > > fails with this error: > libvir: QEMU error : Invalid harddisk device name: sda Oh, that means the version of libvirt you are using is too old - it predates us adding support for the -drive argument, which is required in order to use SCSI disks. THis was added in libvirt 0.4.3 Regards, Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|