On Mon, Aug 11, 2008 at 09:18:19AM +0100, Richard W.M. Jones wrote: > On Mon, Aug 11, 2008 at 07:39:34PM +1200, james wrote: > >> This is what libvirt gives you (and lots more, eg. secure remote > >> access to hypervisors, bindings to Perl & many other languages, etc.). > >> Can you be more specfic about what you couldn't do with libvirt? > > > > I can give you such an example although I confess it could be due to my > > lack of understanding of the libvirt config. I have tried and tried to > > use libvirt to configure VMs within KVM using scsi disk images. Usually > > when tinkering/experimenting with RAID setups. It just will not take it. > > Starting a KVM based VM from the command line with the appropriate > > settings and I have no problems. This inability to use scsi within > > libvirt has been extremely frustrating until I took the plunge and went > > to to kvm command line. > > > > However if you can point out an example xml config for a VM using scsi > > disk images that works then that would be very cool
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 <disk type='block'> <source file='/dev/sdf1'/> <target dev='sda' bus='scsi'/> </disk> 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 -- |: 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 :| -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
