[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] incorrect disk numbering with qemu



On Wed, 2014-01-15 at 18:45 +0100, Olaf Hering wrote:
> On Wed, Jan 15, Ian Campbell wrote:
> 
> > On Wed, 2014-01-15 at 18:12 +0100, Olaf Hering wrote:
> > > It seems qemu does not enumerate the configured disks correctly with a
> > > config like this:
> > > 
> > > disk=[  
> > >         'raw:/some.iso,hda:cdrom,r',
> > >         'raw:/some.raw,xvda,w',
> > > ]
> > > 
> > > With a PV guest it works fine, the guest has a hda and xvda device. 
> > > But a HVM guest fails to start:
> > > qemu-system-i386: -drive 
> > > file=/some.raw,if=ide,index=0,media=disk,format=raw,cache=writeback: 
> > > drive with bus=0, unit=0 (index=0) exists
> > > 
> > > I think that kind of config used to work with xend.
> > 
> > Did it? I thought xvda and hda were effectively considered two faces of
> > the same device, so I'm not so sure. I'd be particularly surprised if
> > this worked by design rather than coincidence.
> 
> Putting a 'device_model_version="qemu-xen-traditional"' into the config
> fixes it for me.
> 
> So the question is how it is supposed to work. My understanding is that
> for HVM some sort of IDE is (or was?) required to let it boot from a
> block device. Thats why I have hd[abcd] as device name. In addition to
> that one could have as many disks named xvd[abc..], which are PV only.

Not quite. Each xvd[a-d] creates both a PV and an emulated IDE device
hd[a-d], which refer to the same underlying volume.

This allows you to boot from hda, do an unplug and then switch to using
xvda.

If you want a pure PV disk you should label it xvde onwards as
docs/misc/vbd-interface.txt suggests. I don't think there is a way to
force xvd[a-d] to be pure PV.

Obviously this precludes you explicitly asking for both xvda and hda,
since there will be a clash. I don't know how/why qemu-trad lets this
work.

> After some testing it seems that today the guest will boot from xvda,
> even with qemu-xen-traditional.

So basically the bogus second definition of hda as a cdrom is ignored?

>  So either that got fixed with libxl, or
> xend from 4.2 got it all wrong.
> 
> So what should be done with such configs, if they really exist in the
> wild?

>  The obvious workaround is device_model_version="qemu-xen-traditional".

Yes, either that or switch the disk stuff around / delete the hda.

General advice would be to stick with qemu-xen-traditional for vms which
were created/installed with it, unless you know the in guest OS to be
fine, I suppose that could extend to this case too.

Ian.


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.