public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrange" <berrange@redhat.com>
To: james <jameswalker@clear.net.nz>
Cc: "Richard W.M. Jones" <rjones@redhat.com>, kvm@vger.kernel.org
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	[thread overview]
Message-ID: <20080812103053.GH13067@redhat.com> (raw)
In-Reply-To: <B0559C6B-D632-45B1-9ED5-0D0A6CAD1573@clear.net.nz>

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
> >
> >         <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
> 
> 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:
> 
>     <disk type='file' device='disk'>
>       <source file='/home/someuser/scsi-test/scsi-disk1.img'/>
>       <target dev='sda' bus='scsi'/>
>     </disk>
> 
> 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 :|

  reply	other threads:[~2008-08-12 10:31 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
2008-08-12 10:25                         ` james
2008-08-12 10:30                           ` Daniel P. Berrange [this message]
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=20080812103053.GH13067@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