Allow blktap to be able to be booted as system volume for PV-on-HVM(TAKE 2)
PATCH 1/1 Allow blktap to be able to be booted as system volume for PV-on-HVM(TAKE 2)
Hi All,
I sent the patch to make blktap work with PV-on-HVM. For system volume to boot hda or xvda,
I corrected the patch.
This patch made it possible to use either.
disk = [ 'tap:aio:/xen/test/rhel5ga_full.img,hda,w' ] or
disk = [ 'tap:aio:/xen/test/rhel5ga_full.img,xvda,w' ]
It is assumed that hda is a volume of the system
if both xvda and hda are specified.
disk = [ 'file:/xen/test/rhel5ga_full.img,hda,w',
'tap:aio:/xen/test/drive2.img,xvda,w' ]
Best Regards,
--
Takanori Kasai
----- Original Message ----- From: "Kasai Takanori" <[email protected]>
To: "xen-devel" <[email protected]>
Sent: Friday, July 06, 2007 7:50 PM
Subject: [Xen-devel] [PATCH] Allow blktap to be able to be booted as systemvolume for PV-on-HVM
Quoted 35 lines
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 <[email protected]>Signed-off-by Tomonari Horikoshi <[email protected]>Signed-off-by Tsunehisa Doi <[email protected]>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
Quoted 1 line
Best Regards,
# HG changeset patch
# User [email protected]
# Date 1184197224 -32400
# Node ID 5f7c008e093beb4a5b6d098e19658b442e1298bd
# Parent 1f348e70a5affdea9b44c1e39cd5ef094ad4a0bf
Allow blktap to be able to be booted as system volume for PV-on-HVM. The system volume can be booted with hda or xvda.
tools/ioemu/xenstore.c +38 -1
@@ -83,7 +83,7 @@ void xenstore_parse_domain_config(int dochar *buf =NULL , *path;char *fpath =NULL , *bpath =NULL , *dev =NULL , *params =NULL , *type =NULL ; -int i, is_scsi; +int i, is_scsi, is_hda =0 ;unsigned int len, num, hd_index;for (i =0 ; i <MAX_DISKS +MAX_SCSI_DISKS ; i++)
@@ -123,6 +123,34 @@ void xenstore_parse_domain_config(int do dev =xs_read (xsh,XBT_NULL , buf, &len);if (dev ==NULL )continue ; +if (!strncmp (dev,"hda" ,3 )) { + is_hda =1 ; +break ; + } + } + +for (i =0 ; i < num; i++) { +/* read the backend path */ +if (pasprintf (&buf,"%s/device/vbd/%s/backend" , path, e[i]) ==-1 ) +continue ; +free (bpath); + bpath =xs_read (xsh,XBT_NULL , buf, &len); +if (bpath ==NULL ) +continue ; +/* read the name of the device */ +if (pasprintf (&buf,"%s/dev" , bpath) ==-1 ) +continue ; +free (dev); + dev =xs_read (xsh,XBT_NULL , buf, &len); +if (dev ==NULL ) +continue ; +/* Change xvda to look like hda */ +if ( !is_hda && !strncmp (dev,"xvda" ,4 )) { +memmove (dev, dev+1 ,strlen (dev)); + dev[0 ] ='h' ; + dev[1 ] ='d' ; +fprintf (stderr,"Change xvda to lock like '%s'\n" , dev); + } is_scsi = !strncmp (dev,"sd" ,2 );if ((strncmp (dev,"hd" ,2 ) && !is_scsi) ||strlen (dev) !=3 )continue ;
@@ -173,6 +201,15 @@ void xenstore_parse_domain_config(int do }/* open device now if media present */ if (params[0 ]) { +/* Strip off blktap sub-type prefix aio: etc for hda */ +if (hd_index ==0 ) { +char *p =NULL ; +if ((p =strchr (params,':' ))) { +memmove (params, p+1 ,strlen (p+1 )+1 ); +fprintf (stderr,"Strip off blktap sub-type prefix aio: etc " ); +fprintf (stderr,"for hda\n : params='%s'\n" , params); + } + }if (bdrv_open (bs_table[hd_index + (is_scsi ?MAX_DISKS :0 )], params,0 /* snapshot */ ) <0 ) fprintf(stderr, "qemu: could not open hard disk image '%s'\n",
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Re: [PATCH] Allow blktap to be able to be booted as systemvolume for PV-on-HVM(TAKE 2)
Hi All,
I sent the patch to make blktap work with PV-on-HVM. For system volume to boot hda or xvda, I corrected the patch. However, the patch has not been applied yet.
Could you apply this patch? Or, please give the comment to me.
Best Regards,
---
Takanori Kasai
----- Original Message ----- From: "Kasai Takanori" <[email protected]>
To: "xen-devel" <[email protected]>
Sent: Thursday, July 12, 2007 9:13 AM
Subject: [Xen-devel] [PATCH] Allow blktap to be able to be booted as systemvolume for PV-on-HVM(TAKE 2)
Quoted 26 lines
Hi All,
I sent the patch to make blktap work with PV-on-HVM. For system volume to boot hda or xvda,
I corrected the patch.Signed-off-by Takanori Kasai <[email protected]>This patch made it possible to use either.
disk = [ 'tap:aio:/xen/test/rhel5ga_full.img,hda,w' ] or
disk = [ 'tap:aio:/xen/test/rhel5ga_full.img,xvda,w' ]It is assumed that hda is a volume of the system
if both xvda and hda are specified.disk = [ 'file:/xen/test/rhel5ga_full.img,hda,w',
'tap:aio:/xen/test/drive2.img,xvda,w' ]Best Regards,
--
Takanori Kasai
Quoted 45 lines
----- Original Message -----
From: "Kasai Takanori" <[email protected]>
To: "xen-devel" <[email protected]>
Sent: Friday, July 06, 2007 7:50 PM
Subject: [Xen-devel] [PATCH] Allow blktap to be able to be booted as systemvolume for PV-on-HVMQuoted 36 lines
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 <[email protected]>Signed-off-by Tomonari Horikoshi <[email protected]>Signed-off-by Tsunehisa Doi <[email protected]>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/768Best Regards,
--------------------------------------------------------------------------------
Quoted 5 lines
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
# HG changeset patch
# User [email protected]
# Date 1184197224 -32400
# Node ID 5f7c008e093beb4a5b6d098e19658b442e1298bd
# Parent 1f348e70a5affdea9b44c1e39cd5ef094ad4a0bf
Allow blktap to be able to be booted as system volume for PV-on-HVM. The system volume can be booted with hda or xvda.
tools/ioemu/xenstore.c +38 -1
@@ -83,7 +83,7 @@ void xenstore_parse_domain_config(int dochar *buf =NULL , *path;char *fpath =NULL , *bpath =NULL , *dev =NULL , *params =NULL , *type =NULL ; -int i, is_scsi; +int i, is_scsi, is_hda =0 ;unsigned int len, num, hd_index;for (i =0 ; i <MAX_DISKS +MAX_SCSI_DISKS ; i++)
@@ -123,6 +123,34 @@ void xenstore_parse_domain_config(int do dev =xs_read (xsh,XBT_NULL , buf, &len);if (dev ==NULL )continue ; +if (!strncmp (dev,"hda" ,3 )) { + is_hda =1 ; +break ; + } + } + +for (i =0 ; i < num; i++) { +/* read the backend path */ +if (pasprintf (&buf,"%s/device/vbd/%s/backend" , path, e[i]) ==-1 ) +continue ; +free (bpath); + bpath =xs_read (xsh,XBT_NULL , buf, &len); +if (bpath ==NULL ) +continue ; +/* read the name of the device */ +if (pasprintf (&buf,"%s/dev" , bpath) ==-1 ) +continue ; +free (dev); + dev =xs_read (xsh,XBT_NULL , buf, &len); +if (dev ==NULL ) +continue ; +/* Change xvda to look like hda */ +if ( !is_hda && !strncmp (dev,"xvda" ,4 )) { +memmove (dev, dev+1 ,strlen (dev)); + dev[0 ] ='h' ; + dev[1 ] ='d' ; +fprintf (stderr,"Change xvda to lock like '%s'\n" , dev); + } is_scsi = !strncmp (dev,"sd" ,2 );if ((strncmp (dev,"hd" ,2 ) && !is_scsi) ||strlen (dev) !=3 )continue ;
@@ -173,6 +201,15 @@ void xenstore_parse_domain_config(int do }/* open device now if media present */ if (params[0 ]) { +/* Strip off blktap sub-type prefix aio: etc for hda */ +if (hd_index ==0 ) { +char *p =NULL ; +if ((p =strchr (params,':' ))) { +memmove (params, p+1 ,strlen (p+1 )+1 ); +fprintf (stderr,"Strip off blktap sub-type prefix aio: etc " ); +fprintf (stderr,"for hda\n : params='%s'\n" , params); + } + }if (bdrv_open (bs_table[hd_index + (is_scsi ?MAX_DISKS :0 )], params,0 /* snapshot */ ) <0 ) fprintf(stderr, "qemu: could not open hard disk image '%s'\n",
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Re: [PATCH] Allow blktap to be able to be booted assystemvolume for PV-on-HVM(TAKE 2)
Kasai-san,
Why did you make a patch only for boot disk?
I have a patch for all disks on SLES10SP1 (3.0.4). (Not yet in SLES10SP1 tree)
Windows can boot up in HVM domain with our PV drivers for blktap disks.
For your reference, it is attached in this mail.
I know this is for 3.0.4, not applicable for latest.
Regards,
Takekazu Okamoto
Novell Japan
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
"Kasai Takanori" <[email protected]> 2007/07/19 13:41
Hi All,
I sent the patch to make blktap work with PV-on-HVM. For system volume to boot hda or xvda, I corrected the patch. However, the patch has not been applied yet.
Could you apply this patch? Or, please give the comment to me.
Best Regards,
---
Takanori Kasai
----- Original Message -----
From: "Kasai Takanori" <[email protected]>
To: "xen-devel" <[email protected]>
Sent: Thursday, July 12, 2007 9:13 AM
Subject: [Xen-devel] [PATCH] Allow blktap to be able to be booted as systemvolume for PV-on-HVM(TAKE 2)
Quoted 26 lines
Hi All,
I sent the patch to make blktap work with PV-on-HVM. For system volume to boot hda or xvda,
I corrected the patch.Signed-off-by Takanori Kasai <[email protected]>This patch made it possible to use either.
disk = [ 'tap:aio:/xen/test/rhel5ga_full.img,hda,w' ] or
disk = [ 'tap:aio:/xen/test/rhel5ga_full.img,xvda,w' ]It is assumed that hda is a volume of the system
if both xvda and hda are specified.disk = [ 'file:/xen/test/rhel5ga_full.img,hda,w',
'tap:aio:/xen/test/drive2.img,xvda,w' ]Best Regards,
--
Takanori Kasai
Quoted 12 lines
----- Original Message -----
From: "Kasai Takanori" <[email protected]>
To: "xen-devel" <[email protected]>
Sent: Friday, July 06, 2007 7:50 PM
Subject: [Xen-devel] [PATCH] Allow blktap to be able to be booted as systemvolume for PV-on-HVMQuoted 4 lines
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
Quoted 6 lines
Quoted 6 lines
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.
Quoted 2 lines
Quoted 2 lines
qemu: could not open hard disk image
'aio:/xen/test/rhel5ga_full.img'
Quoted 10 lines
Quoted 10 lines
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 <[email protected]>Signed-off-by Tomonari Horikoshi <[email protected]>Signed-off-by Tsunehisa Doi <[email protected]>
Quoted 8 lines
Quoted 8 lines
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
Quoted 4 lines
Quoted 4 lines
... <<= /* 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
Quoted 2 lines
Quoted 2 lines
Best Regards,
tools/ioemu/xenstore.c +25 -2
@@ -56,8 +56,8 @@ {char **e =NULL ;char *buf =NULL , *path; -char *bpath =NULL , *dev =NULL , *params =NULL , *type =NULL ; -int i; +char *bpath =NULL , *btype =NULL , *dev =NULL , *params =NULL , *type =NULL ; +int i, is_tap;unsigned int len, num, hd_index;for (i =0 ; i <MAX_DISKS ; i++)
@@ -90,6 +90,14 @@ bpath =xs_read (xsh,XBT_NULL , buf, &len);if (bpath ==NULL )continue ; +/* check to see if type is tap or not */ +if (pasprintf (&buf,"%s/type" , bpath) ==-1 ) +continue ; +free (btype); + btype =xs_read (xsh,XBT_NULL , buf, &len); +if (btype ==NULL ) +continue ; + is_tap = !strncmp (btype,"tap" ,3 );/* read the name of the device */ if (pasprintf (&buf,"%s/dev" , bpath) ==-1 )continue ;
@@ -97,6 +105,13 @@ dev =xs_read (xsh,XBT_NULL , buf, &len);if (dev ==NULL )continue ; +/* Force xvdN to look like hdN */ +if (is_tap && !strncmp (dev,"xvd" ,3 )) { +memmove (dev, dev+1 ,strlen (dev)); + dev[0 ] ='h' ; + dev[1 ] ='d' ; +fprintf (stderr,"Got blktap '%s'\n" , dev); + }if (strncmp (dev,"hd" ,2 ) ||strlen (dev) !=3 )continue ; hd_index = dev[2 ] -'a' ;
@@ -116,6 +131,14 @@ params =xs_read (xsh,XBT_NULL , buf, &len);if (params ==NULL )continue ; +/* Strip off blktap sub-type prefix aio: etc */ +if (is_tap) { +char *offset =strchr (params,':' ); +if (!offset) +continue ; +memmove (params, offset+1 ,strlen (offset+1 )+1 ); +fprintf (stderr,"Got params '%s'\n" , params); + }if (params[0 ]) { hd_filename[hd_index] = params;/* strdup() */ params =NULL ;/* don't free params on re-use */
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Hi Okamoto-san,
Thank you for reply.
Quoted 1 line
Why did you make a patch only for boot disk?
Because it is not necessary to start with the emulator excluding the system disk.
The system disk cannot be booted if it doesn't work by the emulator first. But the data disk will work as blktap if PV driver works after booting.
There is a reason why all xvd* is not replaced with hd* either.
We are working the system disk as hda and CDROM device as hdc. Moreover, we are working the data disk as xvd *.
disk = [ 'tap:aio:/image/systemdisk.img,hda,w',
'phy:/dev/cdrom,hdc:cdrom,r',
'tap:aio:/image/data1.img,xvda,w',
'tap:aio:/image/data2.img,xvdb,w',
'tap:aio:/image/data3.img,xvdc,w',
'tap:aio:/image/data4.img,xvdd,w',
.... ]Therefore, when xvd * is replaced to hd*, hd* usually used by the HVM domain cannot be used.
Best Regards,
--
Takanori Kasai
----- Original Message ----- From: "Takekazu Okamoto" <[email protected]>
To: "xen-devel" <[email protected]>
Sent: Thursday, July 19, 2007 2:46 PM
Subject: Re: [Xen-devel] [PATCH] Allow blktap to be able to be bootedassystemvolume for PV-on-HVM(TAKE 2)
Quoted 104 lines
Kasai-san,
Why did you make a patch only for boot disk?
I have a patch for all disks on SLES10SP1 (3.0.4). (Not yet in SLES10SP1 tree)
Windows can boot up in HVM domain with our PV drivers for blktap disks.
For your reference, it is attached in this mail.
I know this is for 3.0.4, not applicable for latest.Regards,
Takekazu Okamoto
Novell JapanQuoted 2 lines
Quoted 2 lines
Quoted 2 lines
"Kasai Takanori" <[email protected]> 2007/07/19 13:41
Hi All,
I sent the patch to make blktap work with PV-on-HVM. For system volume to boot hda or xvda, I corrected the patch. However, the patch has not been applied yet.
Could you apply this patch? Or, please give the comment to me.Best Regards,
---
Takanori Kasai----- Original Message -----
From: "Kasai Takanori" <[email protected]>
To: "xen-devel" <[email protected]>
Sent: Thursday, July 12, 2007 9:13 AM
Subject: [Xen-devel] [PATCH] Allow blktap to be able to be booted as systemvolume for PV-on-HVM(TAKE 2)Quoted 26 lines
Hi All,
I sent the patch to make blktap work with PV-on-HVM. For system volume to boot hda or xvda,
I corrected the patch.Signed-off-by Takanori Kasai <[email protected]>This patch made it possible to use either.
disk = [ 'tap:aio:/xen/test/rhel5ga_full.img,hda,w' ] or
disk = [ 'tap:aio:/xen/test/rhel5ga_full.img,xvda,w' ]It is assumed that hda is a volume of the system
if both xvda and hda are specified.disk = [ 'file:/xen/test/rhel5ga_full.img,hda,w',
'tap:aio:/xen/test/drive2.img,xvda,w' ]Best Regards,
--
Takanori KasaiQuoted 12 lines
----- Original Message -----
From: "Kasai Takanori" <[email protected]>
To: "xen-devel" <[email protected]>
Sent: Friday, July 06, 2007 7:50 PM
Subject: [Xen-devel] [PATCH] Allow blktap to be able to be booted as systemvolume for PV-on-HVMQuoted 4 lines
Hi All,
We were testing the PV driver on the HVM domain.
When blktap was booting system volume, PV-on-HVM domain was not ableto be
Quoted 6 lines
Quoted 6 lines
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.
Quoted 2 lines
Quoted 2 lines
qemu: could not open hard disk image
'aio:/xen/test/rhel5ga_full.img'
Quoted 10 lines
Quoted 10 lines
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 <[email protected]>Signed-off-by Tomonari Horikoshi <[email protected]>Signed-off-by Tsunehisa Doi <[email protected]>Quoted 8 lines
Quoted 8 lines
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
Quoted 10 lines
/local/domain/0/backend/tap/75/768
Quoted 4 lines
Quoted 4 lines
... <<= /* 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
Quoted 2 lines
Quoted 2 lines
Best Regards,
--------------------------------------------------------------------------------
Quoted 5 lines
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Kasai-san,
I understand why you did.
But I think it's better to work with all disks regardless of PV drivers.
Because some users would like to run OSs without PV drivers. There are also benefits for such users with "tap:vmdk:", "tap:qcow:" or "tap:sync:", I think.
Regards,
Takekazu Okamoto
Novell Japan
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
"Kasai Takanori" <[email protected]> 2007/07/19 15:49
Hi Okamoto-san,
Thank you for reply.
Quoted 1 line
Why did you make a patch only for boot disk?
Because it is not necessary to start with the emulator excluding the system
disk.
The system disk cannot be booted if it doesn't work by the emulator first.
But the data disk will work as blktap if PV driver works after booting.
There is a reason why all xvd* is not replaced with hd* either.
We are working the system disk as hda and CDROM device as hdc. Moreover, we are working the data disk as xvd *.
disk = [ 'tap:aio:/image/systemdisk.img,hda,w',
'phy:/dev/cdrom,hdc:cdrom,r',
'tap:aio:/image/data1.img,xvda,w',
'tap:aio:/image/data2.img,xvdb,w',
'tap:aio:/image/data3.img,xvdc,w',
'tap:aio:/image/data4.img,xvdd,w',
.... ]Therefore, when xvd * is replaced to hd*, hd* usually used by the HVM domain cannot be used.
Best Regards,
--
Takanori Kasai
----- Original Message -----
From: "Takekazu Okamoto" <[email protected]>
To: "xen-devel" <[email protected]>
Sent: Thursday, July 19, 2007 2:46 PM
Subject: Re: [Xen-devel] [PATCH] Allow blktap to be able to be bootedassystemvolume for PV-on-HVM(TAKE 2)
Quoted 29 lines
Kasai-san,
Why did you make a patch only for boot disk?
I have a patch for all disks on SLES10SP1 (3.0.4). (Not yet in SLES10SP1 tree)
Windows can boot up in HVM domain with our PV drivers for blktap disks.
For your reference, it is attached in this mail.
I know this is for 3.0.4, not applicable for latest.Regards,
Takekazu Okamoto
Novell JapanQuoted 2 lines
Quoted 2 lines
Quoted 2 lines
"Kasai Takanori" <[email protected]> 2007/07/19 13:41
Hi All,
I sent the patch to make blktap work with PV-on-HVM. For system volume to boot hda or xvda, I corrected the patch. However, the patch has not been applied yet.
Could you apply this patch? Or, please give the comment to me.Best Regards,
---
Takanori Kasai
Quoted 39 lines
----- Original Message -----
From: "Kasai Takanori" <[email protected]>
To: "xen-devel" <[email protected]>
Sent: Thursday, July 12, 2007 9:13 AM
Subject: [Xen-devel] [PATCH] Allow blktap to be able to be booted as systemvolume for PV-on-HVM(TAKE 2)Quoted 31 lines
Hi All,
I sent the patch to make blktap work with PV-on-HVM. For system volume to boot hda or xvda,
I corrected the patch.Signed-off-by Takanori Kasai <[email protected]>This patch made it possible to use either.
disk = [ 'tap:aio:/xen/test/rhel5ga_full.img,hda,w' ] or
disk = [ 'tap:aio:/xen/test/rhel5ga_full.img,xvda,w' ]It is assumed that hda is a volume of the system
if both xvda and hda are specified.disk = [ 'file:/xen/test/rhel5ga_full.img,hda,w',
'tap:aio:/xen/test/drive2.img,xvda,w' ]Best Regards,
--
Takanori Kasai----- Original Message -----
From: "Kasai Takanori" <[email protected]>
To: "xen-devel" <[email protected]>
Sent: Friday, July 06, 2007 7:50 PM
Subject: [Xen-devel] [PATCH] Allow blktap to be able to be booted
as
Quoted 7 lines
Quoted 7 lines
systemvolume for PV-on-HVM
Quoted 4 lines
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
Quoted 29 lines
to be
Quoted 6 lines
Quoted 6 lines
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.
Quoted 2 lines
Quoted 2 lines
qemu: could not open hard disk image
'aio:/xen/test/rhel5ga_full.img'
Quoted 10 lines
Quoted 10 lines
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 <[email protected]>Signed-off-by Tomonari Horikoshi <[email protected]>Signed-off-by Tsunehisa Doi <[email protected]>Quoted 8 lines
Quoted 8 lines
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
Quoted 10 lines
/local/domain/0/backend/tap/75/768
Quoted 4 lines
Quoted 4 lines
... <<= /* 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
Quoted 2 lines
Quoted 2 lines
Best Regards,
--------------------------------------------------------------------------------
Quoted 5 lines
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Okamoto-san,
Thank you for reply.
Quoted 3 lines
But I think it's better to work with all disks regardless of PV drivers.
Because some users would like to run OSs without PV drivers.
I think that it only has to use hd* because it is a usual HVM domain without PV drivers. Should you specify xvd* so that only the emulator may use it?
Best Regards,
--
Takanori Kasai
----- Original Message ----- From: "Takekazu Okamoto" <[email protected]>
To: "xen-devel" <[email protected]>
Sent: Friday, July 20, 2007 1:45 AM
Subject: Re: [Xen-devel] [PATCH] Allow blktap to be able to be bootedas system volume for PV-on-HVM(TAKE 2)
Quoted 194 lines
Kasai-san,
I understand why you did.
But I think it's better to work with all disks regardless of PV drivers.
Because some users would like to run OSs without PV drivers. There are also benefits for such users with "tap:vmdk:", "tap:qcow:" or "tap:sync:", I think.Regards,
Takekazu Okamoto
Novell JapanQuoted 2 lines
Quoted 2 lines
Quoted 2 lines
"Kasai Takanori" <[email protected]> 2007/07/19 15:49
Hi Okamoto-san,
Thank you for reply.
Quoted 1 line
Why did you make a patch only for boot disk?
Because it is not necessary to start with the emulator excluding the system
disk.The system disk cannot be booted if it doesn't work by the emulator first.
But the data disk will work as blktap if PV driver works after booting.There is a reason why all xvd* is not replaced with hd* either.
We are working the system disk as hda and CDROM device as hdc. Moreover, we are working the data disk as xvd *.
disk = [ 'tap:aio:/image/systemdisk.img,hda,w',
'phy:/dev/cdrom,hdc:cdrom,r', 'tap:aio:/image/data1.img,xvda,w', 'tap:aio:/image/data2.img,xvdb,w', 'tap:aio:/image/data3.img,xvdc,w', 'tap:aio:/image/data4.img,xvdd,w', .... ]Therefore, when xvd * is replaced to hd*, hd* usually used by the HVM domain cannot be used.
Best Regards,
--
Takanori Kasai----- Original Message -----
From: "Takekazu Okamoto" <[email protected]>
To: "xen-devel" <[email protected]>
Sent: Thursday, July 19, 2007 2:46 PM
Subject: Re: [Xen-devel] [PATCH] Allow blktap to be able to be bootedassystemvolume for PV-on-HVM(TAKE 2)Quoted 29 lines
Kasai-san,
Why did you make a patch only for boot disk?
I have a patch for all disks on SLES10SP1 (3.0.4). (Not yet in SLES10SP1 tree)
Windows can boot up in HVM domain with our PV drivers for blktap disks.
For your reference, it is attached in this mail.
I know this is for 3.0.4, not applicable for latest.Regards,
Takekazu Okamoto
Novell JapanQuoted 2 lines
Quoted 2 lines
Quoted 2 lines
"Kasai Takanori" <[email protected]> 2007/07/19 13:41
Hi All,
I sent the patch to make blktap work with PV-on-HVM. For system volume to boot hda or xvda, I corrected the patch. However, the patch has not been applied yet.
Could you apply this patch? Or, please give the comment to me.Best Regards,
---
Takanori KasaiQuoted 39 lines
----- Original Message -----
From: "Kasai Takanori" <[email protected]>
To: "xen-devel" <[email protected]>
Sent: Thursday, July 12, 2007 9:13 AM
Subject: [Xen-devel] [PATCH] Allow blktap to be able to be booted as systemvolume for PV-on-HVM(TAKE 2)Quoted 31 lines
Hi All,
I sent the patch to make blktap work with PV-on-HVM. For system volume to boot hda or xvda,
I corrected the patch.Signed-off-by Takanori Kasai <[email protected]>This patch made it possible to use either.
disk = [ 'tap:aio:/xen/test/rhel5ga_full.img,hda,w' ] or
disk = [ 'tap:aio:/xen/test/rhel5ga_full.img,xvda,w' ]It is assumed that hda is a volume of the system
if both xvda and hda are specified.disk = [ 'file:/xen/test/rhel5ga_full.img,hda,w',
'tap:aio:/xen/test/drive2.img,xvda,w' ]Best Regards,
--
Takanori Kasai----- Original Message -----
From: "Kasai Takanori" <[email protected]>
To: "xen-devel" <[email protected]>
Sent: Friday, July 06, 2007 7:50 PM
Subject: [Xen-devel] [PATCH] Allow blktap to be able to be bootedas
Quoted 7 lines
Quoted 7 lines
systemvolume for PV-on-HVM
Quoted 4 lines
Hi All,
We were testing the PV driver on the HVM domain.
When blktap was booting system volume, PV-on-HVM domain was notable
Quoted 29 lines
to be
Quoted 6 lines
Quoted 6 lines
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.
Quoted 2 lines
Quoted 2 lines
qemu: could not open hard disk image
'aio:/xen/test/rhel5ga_full.img'
Quoted 10 lines
Quoted 10 lines
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 <[email protected]>Signed-off-by Tomonari Horikoshi <[email protected]>Signed-off-by Tsunehisa Doi <[email protected]>Quoted 8 lines
Quoted 8 lines
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 -1Quoted 10 lines
/local/domain/0/backend/tap/75/768
Quoted 4 lines
Quoted 4 lines
... <<= /* 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
Quoted 2 lines
Quoted 2 lines
Best Regards,
--------------------------------------------------------------------------------
Quoted 5 lines
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Kasai-san,
It seems your code works only for hda. (hd_index == 0)
+ /* Strip off blktap sub-type prefix aio: etc for hda */
+ if (hd_index == 0) {
+ char *p = NULL;
+ if((p = strchr(params, ':'))) {
+ memmove(params, p+1, strlen(p+1)+1);
+ fprintf(stderr, "Strip off blktap sub-type prefix
aio: etc ");
+ fprintf(stderr, "for hda\n : params='%s'\n",
params);
+ }
+ }
Daniel's and my code do not care the index.
Quote from Daniel's code:
+ /* Strip off blktap sub-type prefix aio: - QEMU can autodetect
this */
+ if (!strcmp(drv, "tap") && params[0]) {
+ char *offset = strchr(params, ':');
+ if (!offset)
+ continue;
+ fprintf(logfile, "Stripping blktap sub-type prefix from
%s\n", params);
+ memmove(params, offset+1, strlen(offset+1)+1);
+ }
+ fprintf(logfile, "Creating disk '%s' with driver '%s'\n", dev,
drv);
Regards,
Takekazu Okamoto
Novell Japan
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
"Kasai Takanori" <[email protected]> 2007/07/20 12:55
Okamoto-san,
Thank you for reply.
Quoted 3 lines
But I think it's better to work with all disks regardless of PV drivers.
Because some users would like to run OSs without PV drivers.
I think that it only has to use hd* because it is a usual HVM domain without PV
drivers.
Should you specify xvd* so that only the emulator may use it?
Best Regards,
--
Takanori Kasai
----- Original Message -----
From: "Takekazu Okamoto" <[email protected]>
To: "xen-devel" <[email protected]>
Sent: Friday, July 20, 2007 1:45 AM
Subject: Re: [Xen-devel] [PATCH] Allow blktap to be able to be bootedas system
volume for PV-on-HVM(TAKE 2)
Quoted 7 lines
Kasai-san,
I understand why you did.
But I think it's better to work with all disks regardless of PV drivers.
Because some users would like to run OSs without PV drivers. There are also benefits for such users with "tap:vmdk:", "tap:qcow:"
or
Quoted 45 lines
"tap:sync:", I think.
Regards,
Takekazu Okamoto
Novell JapanQuoted 2 lines
Quoted 2 lines
Quoted 2 lines
"Kasai Takanori" <[email protected]> 2007/07/19 15:49
Hi Okamoto-san,
Thank you for reply.
Quoted 1 line
Why did you make a patch only for boot disk?
Because it is not necessary to start with the emulator excluding the system
disk.The system disk cannot be booted if it doesn't work by the emulator first.
But the data disk will work as blktap if PV driver works after booting.There is a reason why all xvd* is not replaced with hd* either.
We are working the system disk as hda and CDROM device as hdc. Moreover, we are working the data disk as xvd *.
disk = [ 'tap:aio:/image/systemdisk.img,hda,w',
'phy:/dev/cdrom,hdc:cdrom,r', 'tap:aio:/image/data1.img,xvda,w', 'tap:aio:/image/data2.img,xvdb,w', 'tap:aio:/image/data3.img,xvdc,w', 'tap:aio:/image/data4.img,xvdd,w', .... ]Therefore, when xvd * is replaced to hd*, hd* usually used by the HVM domain cannot be used.
Best Regards,
--
Takanori Kasai
Quoted 23 lines
----- Original Message -----
From: "Takekazu Okamoto" <[email protected]>
To: "xen-devel" <[email protected]>
Sent: Thursday, July 19, 2007 2:46 PM
Subject: Re: [Xen-devel] [PATCH] Allow blktap to be able to be bootedassystemvolume for PV-on-HVM(TAKE 2)Quoted 15 lines
Kasai-san,
Why did you make a patch only for boot disk?
I have a patch for all disks on SLES10SP1 (3.0.4). (Not yet in SLES10SP1 tree)
Windows can boot up in HVM domain with our PV drivers for blktap disks.
For your reference, it is attached in this mail.
I know this is for 3.0.4, not applicable for latest.Regards,
Takekazu Okamoto
Novell JapanQuoted 1 line
Quoted 1 line
Quoted 1 line
"Kasai Takanori" <[email protected]> 2007/07/19
13:41
Quoted 14 lines
Quoted 14 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Hi All,
I sent the patch to make blktap work with PV-on-HVM. For system volume to boot hda or xvda, I corrected the patch. However, the patch has not been applied yet.
Could you apply this patch? Or, please give the comment to me.Best Regards,
---
Takanori Kasai
Quoted 5 lines
Quoted 5 lines
----- Original Message -----
From: "Kasai Takanori" <[email protected]>
To: "xen-devel" <[email protected]>
Sent: Thursday, July 12, 2007 9:13 AM
Subject: [Xen-devel] [PATCH] Allow blktap to be able to be booted
as
Quoted 80 lines
Quoted 34 lines
systemvolume for PV-on-HVM(TAKE 2)
Quoted 31 lines
Hi All,
I sent the patch to make blktap work with PV-on-HVM. For system volume to boot hda or xvda,
I corrected the patch.Signed-off-by Takanori Kasai <[email protected]>This patch made it possible to use either.
disk = [ 'tap:aio:/xen/test/rhel5ga_full.img,hda,w' ] or
disk = [ 'tap:aio:/xen/test/rhel5ga_full.img,xvda,w' ]It is assumed that hda is a volume of the system
if both xvda and hda are specified.disk = [ 'file:/xen/test/rhel5ga_full.img,hda,w',
'tap:aio:/xen/test/drive2.img,xvda,w' ]Best Regards,
--
Takanori Kasai----- Original Message -----
From: "Kasai Takanori" <[email protected]>
To: "xen-devel" <[email protected]>
Sent: Friday, July 06, 2007 7:50 PM
Subject: [Xen-devel] [PATCH] Allow blktap to be able to be bootedas
Quoted 7 lines
Quoted 7 lines
systemvolume for PV-on-HVM
Quoted 4 lines
Hi All,
We were testing the PV driver on the HVM domain.
When blktap was booting system volume, PV-on-HVM domain was notable
Quoted 37 lines
to be
Quoted 6 lines
Quoted 6 lines
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.
Quoted 2 lines
Quoted 2 lines
qemu: could not open hard disk image
'aio:/xen/test/rhel5ga_full.img'
Quoted 10 lines
Quoted 10 lines
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 <[email protected]>Signed-off-by Tomonari Horikoshi <[email protected]>Signed-off-by Tsunehisa Doi <[email protected]>Quoted 8 lines
Quoted 8 lines
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
Quoted 4 lines
Quoted 4 lines
... <<= /* 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
Quoted 2 lines
Quoted 2 lines
Best Regards,