Kasai Takanori
2007-Jul-06 10:50 UTC
[Xen-devel] [PATCH] Allow blktap to be able to be booted as system volume for PV-on-HVM
Hi All, We were testing the PV driver on the HVM domain. When blktap was booting system volume, PV-on-HVM domain was not able to be started. The configuration file is specified as follows. disk = [ ''tap:aio:/xen/test/rhel5ga_full.img,hda,w'' ] The error occurred by the initialization of system volume in qemu-dm. qemu: could not open hard disk image ''aio:/xen/test/rhel5ga_full.img'' It is because "aio:" is added to the head of params in xenstore. However, qemu-dm open device by params. This patch corrected the problem of params on the qemu-dm. Signed-off-by: Takanori Kasai <kasai.takanori@jp.fujitsu.com> Signed-off-by: Tomonari Horikoshi <t.horikoshi@jp.fujitsu.com> Signed-off-by: Tsunehisa Doi <Doi.Tsunehisa@jp.fujitsu.com> The execution result is as follows. # xm create -f rhel5ga_vti.conf Using config file "./rhel5ga_vti.conf". Started domain RHEL5GA-test2 # xm block-list RHEL5GA-test2 Vdev BE handle state evt-ch ring-ref BE-path 768 0 0 1 -1 -1 /local/domain/0/backend/tap/75/768 ... <<= /* Waiting for booting process */ # xm block-list RHEL5GA-test2 Vdev BE handle state evt-ch ring-ref BE-path 768 0 0 4 7 8 /local/domain/0/backend/tap/75/768 Best Regards, -- Takanori Kasai _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Daniel P. Berrange
2007-Jul-06 13:27 UTC
Re: [Xen-devel] [PATCH] Allow blktap to be able to be booted as system volume for PV-on-HVM
On Fri, Jul 06, 2007 at 07:50:06PM +0900, Kasai Takanori wrote:> Hi All, > > We were testing the PV driver on the HVM domain. > When blktap was booting system volume, PV-on-HVM domain was not able to be > started. > > The configuration file is specified as follows. > disk = [ ''tap:aio:/xen/test/rhel5ga_full.img,hda,w'' ] > > The error occurred by the initialization of system volume in qemu-dm. > > qemu: could not open hard disk image ''aio:/xen/test/rhel5ga_full.img'' > > It is because "aio:" is added to the head of params in xenstore. > However, qemu-dm open device by params. > > This patch corrected the problem of params on the qemu-dm.That''s not safe enough since it always looks for a '':'' regardless of whether the driver is ''tap'' or not. It also doesn''t take account of fact that the device may be named ''xvda'' rather than ''hda''. I posted patches to address this more completely here: http://lists.xensource.com/archives/html/xen-devel/2007-06/msg01021.html I''m attaching them again for convenience Regards, Dan. -- |=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=| |=- Perl modules: http://search.cpan.org/~danberr/ -=| |=- Projects: http://freshmeat.net/~danielpb/ -=| |=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=| _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Kasai Takanori
2007-Jul-09 05:09 UTC
Re: [Xen-devel] [PATCH] Allow blktap to be able to be booted assystem volume for PV-on-HVM
Hi Daniel, Thank you for the reply.> That''s not safe enough since it always looks for a '':'' regardless of > whether the driver is ''tap'' or not.Does it mean to have to check the assumed keyword(aio,sync,qcow)? If it is so, I will correct the patch.> It also doesn''t take account of > fact that the device may be named ''xvda'' rather than ''hda''.I saw the presented patches. The xvdN was forcedly looked like the hdN. For example, the hdc is a special device named CDROM in qemu-dm. Therefore, I think that it should not forcedly do it because it cannot take the consistency. I think the HVM domain to be should boot on the hda as it is a specification of qemu-dm. Best Regards, -- Takanori Kasai _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Daniel P. Berrange
2007-Jul-09 13:47 UTC
Re: [Xen-devel] [PATCH] Allow blktap to be able to be booted assystem volume for PV-on-HVM
On Mon, Jul 09, 2007 at 02:09:47PM +0900, Kasai Takanori wrote:> >It also doesn''t take account of > >fact that the device may be named ''xvda'' rather than ''hda''. > > I saw the presented patches. The xvdN was forcedly looked like the hdN. > For example, the hdc is a special device named CDROM in qemu-dm.No that is wrong. Any hdX device can be a CDROM - whether it is a CDROM or not is determined by the :cdrom postfix, not the device name. eg You can happily make hdc a harddisk: tap:aio:/var/lib/xen/images/dom.img,hdc,w Or make hda a CDROM tap:aio:/var/lib/xen/images/dom.img,hda:cdrom,w> Therefore, I think that it should not forcedly do it because it cannot take > the consistency.Being able to use ''xvd*'', as well as ''hd*'' or ''sd*'' as device names is important for consistency with paravirt guests, where xvd* is the recommended default.> I think the HVM domain to be should boot on the hda as it is a > specification of qemu-dm.It can do that. My patch made it possible to use either tap:aio:/var/lib/xen/images/dom.img,hda,w Or tap:aio:/var/lib/xen/images/dom.img,xvda,w At the user''s choice. n/ -- |=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=| |=- Perl modules: http://search.cpan.org/~danberr/ -=| |=- Projects: http://freshmeat.net/~danielpb/ -=| |=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=| _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Kasai Takanori
2007-Jul-10 00:55 UTC
Re: [Xen-devel] [PATCH] Allow blktap to be able to be booted assystemvolume for PV-on-HVM
Hi Daniel, Thank you for the reply. We think about the specification of the device as follows. The hda is initialized of emulator first. It works by the emulator if there is no PV driver in the HVM domain. It is initialized as VBD if there is PV driver in the HVM domain. And, the hda changes to VBD and works as VBD. On the other hand, the xvda doesn''t initialize it as an emulator. It doesn''t work if there is no PV driver in the HVM domain. It works as VBD if there is PV driver in the HVM domain. The hda is used as a device from which the emulator is switched to VBD. And, the xvd* is used as a device only for VBD. Therefore, the system disk is specified for hda as well as a usual HVM domain. Other data disks are specified for xvd*. We boot the HVM domain specifying both hda and xvda. What scenario are you assuming? Do you initialize all ''xvd*'' as an emulator? Best Regards, -- Takanori Kasai _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel