public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrange" <berrange@redhat.com>
To: "Richard W.M. Jones" <rjones@redhat.com>
Cc: james <jameswalker@clear.net.nz>, kvm@vger.kernel.org
Subject: Re: [et-mgmt-tools] Re: [libvirt] RE: [Qemu-devel] [ANNOUNCE] virt-mem tools version 0.2.8 released
Date: Mon, 11 Aug 2008 09:42:50 +0100	[thread overview]
Message-ID: <20080811084250.GG10550@redhat.com> (raw)
In-Reply-To: <20080811081819.GA4765@amd.home.annexia.org>

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 :|

  reply	other threads:[~2008-08-11  8:42 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-06 20:00 [libvirt] [ANNOUNCE] virt-mem tools version 0.2.8 released Richard W.M. Jones
2008-08-07 10:20 ` [libvirt] RE: [Qemu-devel] " Alexey Eremenko
2008-08-07 10:40   ` Jun Koi
2008-08-07 10:47     ` Daniel P. Berrange
2008-08-07 12:55       ` Alexey Eremenko
2008-08-07 12:59         ` Richard W.M. Jones
2008-08-07 13:03         ` Samuel Thibault
     [not found]       ` <20080807104739.GN32548-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2008-08-07 13:06         ` Richard W.M. Jones
2008-08-07 14:30           ` [et-mgmt-tools] " Javier Guerra
2008-08-10  1:28             ` Jamie Lokier
     [not found]               ` <20080810012827.GD20183-yetKDKU6eevNLxjTenLetw@public.gmane.org>
2008-08-10 10:07                 ` Richard W.M. Jones
     [not found]                   ` <20080810100732.GA31209-GiBsMFaMFPh8g4K506y4zWD2FQJk+8+b@public.gmane.org>
2008-08-10 14:04                     ` Richard W.M. Jones
     [not found]                   ` <ADA730F4-2A75-4DFC-851F-B907526D3745@clear.net.nz>
2008-08-11  8:18                     ` [et-mgmt-tools] " Richard W.M. Jones
2008-08-11  8:42                       ` Daniel P. Berrange [this message]
2008-08-12 10:25                         ` james
2008-08-12 10:30                           ` Daniel P. Berrange
2008-08-12 10:45                             ` James Walker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080811084250.GG10550@redhat.com \
    --to=berrange@redhat.com \
    --cc=jameswalker@clear.net.nz \
    --cc=kvm@vger.kernel.org \
    --cc=rjones@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox