Yu, Ke
2006-Sep-12 04:50 UTC
[Xen-devel] How HVM domain distingush ioemu disk and VBD disk
Hi, From cset 10921, ioemu: prefix is removed from disk config in /etc/xen/xmexample.hvm. Now HVM VBD driver is available, this thus raises a question: how would HVM domain know if one disk is a qemu-dm disk or a VBD disk? From current implementation, qemu-dm will recognize disk had, hdb, hdc, hdd, and VBD drive can recognize all disk (had~hdd, hde, hdf ...) . So the result is: qemu-dm will mount /dev/hda-hdd, and VBD driver will mount the rest (/dev/hde,...). Actually, VBD will also try to mount /dev/hda..., but failed with error message "register_blkdev: cannot get major 3 for ide", since the /hda is already mounted as qemu-dm disk. This looks a litt bit confusing. So I just wonder: is this the expected behavor? Do we intend having some explicit mechanism to indentify ioemu disk and VBD disk? Best Regards Ke _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Anthony Liguori
2006-Sep-12 14:05 UTC
[Xen-devel] Re: How HVM domain distingush ioemu disk and VBD disk
On Tue, 12 Sep 2006 12:50:18 +0800, Yu, Ke wrote:> Hi, > > From cset 10921, ioemu: prefix is removed from disk config in > /etc/xen/xmexample.hvm. Now HVM VBD driver is available, this thus raises > a question: how would HVM domain know if one disk is a qemu-dm disk or a > VBD disk? > > From current implementation, qemu-dm will recognize disk had, hdb, hdc, > hdd, and VBD drive can recognize all disk (had~hdd, hde, hdf ...) .Huh. I didn''t know we did that.> So the > result is: qemu-dm will mount /dev/hda-hdd, and VBD driver will mount the > rest (/dev/hde,...).I assume that VBD means the paravirtual driver. If so, we really shouldn''t even give the option of exposing as hdX or sdX but rather only expose as xvdX (or whatever our assigned prefix it). Might as well make it a policy for HVM before people start using something else. Upstream will never allow us to hijack other major/minor numbers so we should stop doing it as soon as possible. Of course, using our assigned names also solves your problem so it makes everyone happy :-) Regards, Anthony Liguori> Actually, VBD will also try to mount /dev/hda..., but > failed with error message "register_blkdev: cannot get major 3 for ide", > since the /hda is already mounted as qemu-dm disk. > > This looks a litt bit confusing. So I just wonder: is this the expected > behavor? Do we intend having some explicit mechanism to indentify ioemu > disk and VBD disk? > > Best Regards > Ke_______________________________________________ Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Yu, Ke
2006-Sep-12 15:05 UTC
RE: [Xen-devel] Re: How HVM domain distingush ioemu disk and VBD disk
Anthony Liguori wrote:> > I assume that VBD means the paravirtual driver. If so, we really > shouldn''t even give the option of exposing as hdX or sdX but rather > only expose as xvdX (or whatever our assigned prefix it). > > Might as well make it a policy for HVM before people start using > something else. Upstream will never allow us to hijack other > major/minor numbers so we should stop doing it as soon as possible. > > Of course, using our assigned names also solves your problem so it > makes everyone happy :-) > > Regards, > > Anthony LiguoriThanks for the info. Yes. xvdX works. I tried the following config. disk = [ ''file:/var/images/min-el3-i386.img,hda,w'', ''file:/var/images/data.img,xvda,w'' ] and I can mount /dev/xvda in HVM domain using PV driver. One remaining issue is that: PV driver still complains "register_blkdev: cannot get major 3 for ide", since it will try to connect /dev/hda. This error message is confusing to user, althouhg it actually do no harm. Best Regards Ke _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel