diff mbox

[4/4] block: vhdx - set .bdrv_has_zero_init to bdrv_has_zero_init_1

Message ID 5e582703e36450b9ca939e2e5c9fa3930030f7fe.1418018421.git.jcody@redhat.com
State New
Headers show

Commit Message

Jeff Cody Dec. 8, 2014, 6:07 a.m. UTC
Now that new VHDX images will default to BAT block states of
PAYLOAD_BLOCK_ZERO, we can indicate that VHDX has zero init.

Signed-off-by: Jeff Cody <jcody@redhat.com>
---
 block/vhdx.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Max Reitz Dec. 8, 2014, 8:50 a.m. UTC | #1
On 2014-12-08 at 07:07, Jeff Cody wrote:
> Now that new VHDX images will default to BAT block states of
> PAYLOAD_BLOCK_ZERO, we can indicate that VHDX has zero init.
>
> Signed-off-by: Jeff Cody <jcody@redhat.com>
> ---
>   block/vhdx.c | 1 +
>   1 file changed, 1 insertion(+)

Reviewed-by: Max Reitz <mreitz@redhat.com>
Lokesha, Amulya Dec. 11, 2014, 4:21 a.m. UTC | #2
Hi,

I raised a bug https://bugs.launchpad.net/qemu/+bug/1399191 in the qemu bugzilla and immediately started getting these patch mails. But, I am not seeing any update in the bugzilla site.
Till now I have got 4 patch mails regarding the issue. Please let me know which patch I should apply. Also let me know where can I get the patch files individually to be downloaded.

We are waiting for the patch to provide to our customers.

Thanks,
Amulya


-----Original Message-----
From: Max Reitz [mailto:mreitz@redhat.com] 
Sent: Monday, December 08, 2014 2:20 PM
To: Jeff Cody; qemu-devel@nongnu.org
Cc: kwolf@redhat.com; Lokesha, Amulya; stefanha@redhat.com
Subject: Re: [PATCH 4/4] block: vhdx - set .bdrv_has_zero_init to bdrv_has_zero_init_1

On 2014-12-08 at 07:07, Jeff Cody wrote:
> Now that new VHDX images will default to BAT block states of 
> PAYLOAD_BLOCK_ZERO, we can indicate that VHDX has zero init.
>
> Signed-off-by: Jeff Cody <jcody@redhat.com>
> ---
>   block/vhdx.c | 1 +
>   1 file changed, 1 insertion(+)

Reviewed-by: Max Reitz <mreitz@redhat.com>
Max Reitz Dec. 11, 2014, 9:06 a.m. UTC | #3
On 2014-12-11 at 05:21, Lokesha, Amulya wrote:
> Hi,
>
> I raised a bug https://bugs.launchpad.net/qemu/+bug/1399191 in the qemu bugzilla and immediately started getting these patch mails. But, I am not seeing any update in the bugzilla site.
> Till now I have got 4 patch mails regarding the issue. Please let me know which patch I should apply. Also let me know where can I get the patch files individually to be downloaded.
>
> We are waiting for the patch to provide to our customers.
>
> Thanks,
> Amulya

Hi Amulya,

Patches 3 and 4 are absolutely necessary for this issue; however, I 
would recommend to simply apply all patches of the series.

In order to download the patches you can simply save the patch emails 
and apply them with git am. If for some reason you don't want to use 
git, patch -p1 works as well.

Max
Lokesha, Amulya Dec. 12, 2014, 2:43 p.m. UTC | #4
Hi Max,



We applied all the 5 patches from the mail chain I got since the last week. Please find attached the patches used by us.

We were unable to apply the patch3 as it failed with the following error



# patch -p1 < patch3

patching file block/vhdx.c

patch: **** malformed patch at line 17:          error_setg_errno(errp, EINVAL, "Image size too large; max of 64TB"); @@ -1936,7 +1936,9 @@ static QemuOptsList vhdx_create_opts = {





Hence, we manually added the patch3 changes and recompiled the qemu. We then used the patched qemu-img to convert  our vmdk image to dynamic VHDX format. We found that the image created this time had a considerable decrease in its size from 50GB to 12GB.

However, when we deployed it into our SCVMM 2012, the import of the VHDX image failed with a "syntax error" as below



Information (10804)

Unable to import \\Test.com\Library\VHDs\Test-disk1.vhdx because of a syntax error in the file.



Please let us know if we missed anything.



Thanks,

Amulya



-----Original Message-----
From: Max Reitz [mailto:mreitz@redhat.com]
Sent: Thursday, December 11, 2014 2:36 PM
To: Lokesha, Amulya; Jeff Cody; qemu-devel@nongnu.org
Cc: kwolf@redhat.com; stefanha@redhat.com
Subject: Re: [PATCH 4/4] block: vhdx - set .bdrv_has_zero_init to bdrv_has_zero_init_1



On 2014-12-11 at 05:21, Lokesha, Amulya wrote:

> Hi,

>

> I raised a bug https://bugs.launchpad.net/qemu/+bug/1399191 in the qemu bugzilla and immediately started getting these patch mails. But, I am not seeing any update in the bugzilla site.

> Till now I have got 4 patch mails regarding the issue. Please let me know which patch I should apply. Also let me know where can I get the patch files individually to be downloaded.

>

> We are waiting for the patch to provide to our customers.

>

> Thanks,

> Amulya



Hi Amulya,



Patches 3 and 4 are absolutely necessary for this issue; however, I would recommend to simply apply all patches of the series.



In order to download the patches you can simply save the patch emails and apply them with git am. If for some reason you don't want to use git, patch -p1 works as well.



Max
Jeff Cody Dec. 12, 2014, 3:17 p.m. UTC | #5
On Fri, Dec 12, 2014 at 09:43:16AM -0500, Lokesha, Amulya wrote:
>    Hi Max,
> 
>     

Please reply in-line, it makes it easier to follow technical
discussions - thanks :)

> 
>    We applied all the 5 patches from the mail chain I got since the last
>    week. Please find attached the patches used by us.
> 
>    We were unable to apply the patch3 as it failed with the following error
> 
>     
> 
>    # patch -p1 < patch3
> 
>    patching file block/vhdx.c
> 
>    patch: **** malformed patch at line 17:          error_setg_errno(errp,
>    EINVAL, "Image size too large; max of 64TB"); @@ -1936,7 +1936,9 @@ static
>    QemuOptsList vhdx_create_opts = {
> 
>

It looks like however you saved the patch file, it was corrupted.
Looking at your attached patch 3, it split line 9 across 2 lines.
Your patch also has whitespace differences from the patch I sent.

You also attached 5 patches - Why are you using patch 0?  You should
only be applying patches 1-4.  This should not be causing any actual
issues, however.

Are you using git for your qemu version?  If so, 'git am' is the
preferred method of applying the patches - just save each of the patch
emails (the whole email should be fine), and run 'git am' on each
file.


> 
>     
> 
>    Hence, we manually added the patch3 changes and recompiled the qemu. We
>    then used the patched qemu-img to convert  our vmdk image to dynamic VHDX
>    format. We found that the image created this time had a considerable
>    decrease in its size from 50GB to 12GB.
> 

Could you tell me the file size of the VMDK image you were converting?
Is it roughly 12GB as well?

>    However, when we deployed it into our SCVMM 2012, the import of the VHDX
>    image failed with a "syntax error" as below
> 
>     
> 
>    Information (10804)
> 
>    Unable to import \\Test.com\Library\VHDs\Test-disk1.vhdx because of a
>    syntax error in the file.
> 
>     

If you run qemu-img info on Test-disk1.vhdx, what does it say?

> 
>    Please let us know if we missed anything.
> 
>     
> 
>    Thanks,
> 
>    Amulya
> 
>     
>

[...]

Jeff
Lokesha, Amulya Dec. 12, 2014, 3:59 p.m. UTC | #6
Please find my comments inline

Thanks,
Amulya

-----Original Message-----
From: Jeff Cody [mailto:jcody@redhat.com] 
Sent: Friday, December 12, 2014 8:48 PM
To: Lokesha, Amulya
Cc: Max Reitz; qemu-devel@nongnu.org; kwolf@redhat.com; stefanha@redhat.com
Subject: Re: [PATCH 4/4] block: vhdx - set .bdrv_has_zero_init to bdrv_has_zero_init_1

On Fri, Dec 12, 2014 at 09:43:16AM -0500, Lokesha, Amulya wrote:
>    Hi Max,
> 
>     

Please reply in-line, it makes it easier to follow technical discussions - thanks :)

> 
>    We applied all the 5 patches from the mail chain I got since the last
>    week. Please find attached the patches used by us.
> 
>    We were unable to apply the patch3 as it failed with the following 
> error
> 
>     
> 
>    # patch -p1 < patch3
> 
>    patching file block/vhdx.c
> 
>    patch: **** malformed patch at line 17:          error_setg_errno(errp,
>    EINVAL, "Image size too large; max of 64TB"); @@ -1936,7 +1936,9 @@ static
>    QemuOptsList vhdx_create_opts = {
> 
>

It looks like however you saved the patch file, it was corrupted.
Looking at your attached patch 3, it split line 9 across 2 lines.
Your patch also has whitespace differences from the patch I sent.

You also attached 5 patches - Why are you using patch 0?  You should only be applying patches 1-4.  This should not be causing any actual issues, however.
First time we applied patches 1 to 4, created VHDX image and deployed to HyperV Server, but we got the same error. Then we took a fresh qemu source and applied patches 0 to 4 and deployed to HyperV and again got the same syntax error.


Are you using git for your qemu version?  If so, 'git am' is the preferred method of applying the patches - just save each of the patch emails (the whole email should be fine), and run 'git am' on each file.

[Amulya] : No. We don't have a git repository for our team. Could you please let us know how to apply these patches without git. What is the difference in applying the patch directly and modifying the code directly? Does it have any impact?

> 
>     
> 
>    Hence, we manually added the patch3 changes and recompiled the qemu. We
>    then used the patched qemu-img to convert  our vmdk image to dynamic VHDX
>    format. We found that the image created this time had a considerable
>    decrease in its size from 50GB to 12GB.
> 

Could you tell me the file size of the VMDK image you were converting?
Is it roughly 12GB as well?
[Amulya] :  No, the vmdk image which we used for conversion is just 1.4GB


>    However, when we deployed it into our SCVMM 2012, the import of the VHDX
>    image failed with a "syntax error" as below
> 
>     
> 
>    Information (10804)
> 
>    Unable to import \\Test.com\Library\VHDs\Test-disk1.vhdx because of a
>    syntax error in the file.
> 
>     

If you run qemu-img info on Test-disk1.vhdx, what does it say?

[Amulya] :   The following is seen with qemu-img info
# qemu-img info Test-disk1.vhdx
image: Test-disk1.vhdx
file format: vhdx
virtual size: 50G (53687091200 bytes)
disk size: 3.4G
cluster_size: 16777216

The size of our images
# ls -ltrh
total 4.8G
-rw-r--r-- 1 root root 1.4G Dec  9 10:48 Test-disk1.vmdk
-rw-r--r-- 1 root root  12G Dec 12 04:49 Test-disk1.vhdx

> 
>    Please let us know if we missed anything.
> 
>     
> 
>    Thanks,
> 
>    Amulya
> 
>     
>

[...]

Jeff
Lokesha, Amulya Dec. 17, 2014, 10:46 a.m. UTC | #7
Hi Max, Jeff,

We were able to get the qemu patch files downloaded from the qemu patch site -  https://patchwork.ozlabs.org and were able to apply the patches successfully without any errors. With the patches applied, we recompiled the qemu and converted the VDK vmdk to vhdx format and uploaded to the SCVMM Server. But it failed again with the syntax error as below:

Information (10804)
Unable to import \\TestServer\MSSCVMMLibrary\VHDs\Product-disk1.vhdx because of a syntax error in the file.

Please find my comments inline for your questions

Please let us know if there is anything else you need from us.


Thanks,
Amulya


-----Original Message-----
From: Jeff Cody [mailto:jcody@redhat.com]
Sent: Friday, December 12, 2014 8:48 PM
To: Lokesha, Amulya
Cc: Max Reitz; qemu-devel@nongnu.org; kwolf@redhat.com; stefanha@redhat.com
Subject: Re: [PATCH 4/4] block: vhdx - set .bdrv_has_zero_init to bdrv_has_zero_init_1

On Fri, Dec 12, 2014 at 09:43:16AM -0500, Lokesha, Amulya wrote:
>    Hi Max,
> 
>     

Please reply in-line, it makes it easier to follow technical discussions - thanks :)

> 
>    We applied all the 5 patches from the mail chain I got since the last
>    week. Please find attached the patches used by us.
> 
>    We were unable to apply the patch3 as it failed with the following 
> error
> 
>     
> 
>    # patch -p1 < patch3
> 
>    patching file block/vhdx.c
> 
>    patch: **** malformed patch at line 17:          error_setg_errno(errp,
>    EINVAL, "Image size too large; max of 64TB"); @@ -1936,7 +1936,9 @@ static
>    QemuOptsList vhdx_create_opts = {
> 
>

It looks like however you saved the patch file, it was corrupted.
Looking at your attached patch 3, it split line 9 across 2 lines.
Your patch also has whitespace differences from the patch I sent.

You also attached 5 patches - Why are you using patch 0?  You should only be applying patches 1-4.  This should not be causing any actual issues, however.
[Amulya]: First time we applied patches 1 to 4, created VHDX image and deployed to HyperV Server, but we got the same error. Then we took a fresh qemu source and applied patches 0 to 4 and deployed to HyperV and again got the same syntax error.


Are you using git for your qemu version?  If so, 'git am' is the preferred method of applying the patches - just save each of the patch emails (the whole email should be fine), and run 'git am' on each file.

[Amulya] : No. We don't have a git repository for our team. Could you please let us know how to apply these patches without git. What is the difference in applying the patch directly and modifying the code directly? Does it have any impact?

> 
>     
> 
>    Hence, we manually added the patch3 changes and recompiled the qemu. We
>    then used the patched qemu-img to convert  our vmdk image to dynamic VHDX
>    format. We found that the image created this time had a considerable
>    decrease in its size from 50GB to 12GB.
> 

Could you tell me the file size of the VMDK image you were converting?
Is it roughly 12GB as well?
[Amulya] :  No, the vmdk image which we used for conversion is just 1.4GB


>    However, when we deployed it into our SCVMM 2012, the import of the VHDX
>    image failed with a "syntax error" as below
> 
>     
> 
>    Information (10804)
> 
>    Unable to import \\Test.com\Library\VHDs\Test-disk1.vhdx because of a
>    syntax error in the file.
> 
>     

If you run qemu-img info on Test-disk1.vhdx, what does it say?

[Amulya] :   The following is seen with qemu-img info
# qemu-img info Test-disk1.vhdx
image: Test-disk1.vhdx
file format: vhdx
virtual size: 50G (53687091200 bytes)
disk size: 3.4G
cluster_size: 16777216

The size of our images
# ls -ltrh
total 4.8G
-rw-r--r-- 1 root root 1.4G Dec  9 10:48 Test-disk1.vmdk
-rw-r--r-- 1 root root  12G Dec 12 04:49 Test-disk1.vhdx

> 
>    Please let us know if we missed anything.
> 
>     
> 
>    Thanks,
> 
>    Amulya
> 
>     
>

[...]

Jeff
Jeff Cody Dec. 17, 2014, 12:14 p.m. UTC | #8
On Wed, Dec 17, 2014 at 05:46:32AM -0500, Lokesha, Amulya wrote:
> Hi Max, Jeff,
> 
> We were able to get the qemu patch files downloaded from the qemu patch site -  https://patchwork.ozlabs.org and were able to apply the patches successfully without any errors. With the patches applied, we recompiled the qemu and converted the VDK vmdk to vhdx format and uploaded to the SCVMM Server. But it failed again with the syntax error as below:
> 
> Information (10804)
> Unable to import \\TestServer\MSSCVMMLibrary\VHDs\Product-disk1.vhdx because of a syntax error in the file.
> 
> Please find my comments inline for your questions
> 
> Please let us know if there is anything else you need from us.
> 
>

Amulya,

I will try to test this on Windows Server, and see if I can reproduce
what you are seeing.

-Jeff

> 
> 
> -----Original Message-----
> From: Jeff Cody [mailto:jcody@redhat.com]
> Sent: Friday, December 12, 2014 8:48 PM
> To: Lokesha, Amulya
> Cc: Max Reitz; qemu-devel@nongnu.org; kwolf@redhat.com; stefanha@redhat.com
> Subject: Re: [PATCH 4/4] block: vhdx - set .bdrv_has_zero_init to bdrv_has_zero_init_1
> 
> On Fri, Dec 12, 2014 at 09:43:16AM -0500, Lokesha, Amulya wrote:
> >    Hi Max,
> > 
> >     
> 
> Please reply in-line, it makes it easier to follow technical discussions - thanks :)
> 
> > 
> >    We applied all the 5 patches from the mail chain I got since the last
> >    week. Please find attached the patches used by us.
> > 
> >    We were unable to apply the patch3 as it failed with the following 
> > error
> > 
> >     
> > 
> >    # patch -p1 < patch3
> > 
> >    patching file block/vhdx.c
> > 
> >    patch: **** malformed patch at line 17:          error_setg_errno(errp,
> >    EINVAL, "Image size too large; max of 64TB"); @@ -1936,7 +1936,9 @@ static
> >    QemuOptsList vhdx_create_opts = {
> > 
> >
> 
> It looks like however you saved the patch file, it was corrupted.
> Looking at your attached patch 3, it split line 9 across 2 lines.
> Your patch also has whitespace differences from the patch I sent.
> 
> You also attached 5 patches - Why are you using patch 0?  You should only be applying patches 1-4.  This should not be causing any actual issues, however.
> [Amulya]: First time we applied patches 1 to 4, created VHDX image and deployed to HyperV Server, but we got the same error. Then we took a fresh qemu source and applied patches 0 to 4 and deployed to HyperV and again got the same syntax error.
> 
> 
> Are you using git for your qemu version?  If so, 'git am' is the preferred method of applying the patches - just save each of the patch emails (the whole email should be fine), and run 'git am' on each file.
> 
> [Amulya] : No. We don't have a git repository for our team. Could you please let us know how to apply these patches without git. What is the difference in applying the patch directly and modifying the code directly? Does it have any impact?
> 
> > 
> >     
> > 
> >    Hence, we manually added the patch3 changes and recompiled the qemu. We
> >    then used the patched qemu-img to convert  our vmdk image to dynamic VHDX
> >    format. We found that the image created this time had a considerable
> >    decrease in its size from 50GB to 12GB.
> > 
> 
> Could you tell me the file size of the VMDK image you were converting?
> Is it roughly 12GB as well?
> [Amulya] :  No, the vmdk image which we used for conversion is just 1.4GB
> 
> 
> >    However, when we deployed it into our SCVMM 2012, the import of the VHDX
> >    image failed with a "syntax error" as below
> > 
> >     
> > 
> >    Information (10804)
> > 
> >    Unable to import \\Test.com\Library\VHDs\Test-disk1.vhdx because of a
> >    syntax error in the file.
> > 
> >     
> 
> If you run qemu-img info on Test-disk1.vhdx, what does it say?
> 
> [Amulya] :   The following is seen with qemu-img info
> # qemu-img info Test-disk1.vhdx
> image: Test-disk1.vhdx
> file format: vhdx
> virtual size: 50G (53687091200 bytes)
> disk size: 3.4G
> cluster_size: 16777216
> 
> The size of our images
> # ls -ltrh
> total 4.8G
> -rw-r--r-- 1 root root 1.4G Dec  9 10:48 Test-disk1.vmdk
> -rw-r--r-- 1 root root  12G Dec 12 04:49 Test-disk1.vhdx
> 
> > 
> >    Please let us know if we missed anything.
> > 
> >     
> > 
> >    Thanks,
> > 
> >    Amulya
> > 
> >     
> >
> 
> [...]
> 
> Jeff
Lokesha, Amulya Dec. 23, 2014, 10:07 a.m. UTC | #9
-----Original Message-----
From: Jeff Cody [mailto:jcody@redhat.com] 
Sent: Wednesday, December 17, 2014 5:44 PM
To: Lokesha, Amulya
Cc: Max Reitz; qemu-devel@nongnu.org; kwolf@redhat.com; stefanha@redhat.com
Subject: Re: [PATCH 4/4] block: vhdx - set .bdrv_has_zero_init to bdrv_has_zero_init_1

On Wed, Dec 17, 2014 at 05:46:32AM -0500, Lokesha, Amulya wrote:
> Hi Max, Jeff,
> 
> We were able to get the qemu patch files downloaded from the qemu patch site -  https://patchwork.ozlabs.org and were able to apply the patches successfully without any errors. With the patches applied, we recompiled the qemu and converted the VDK vmdk to vhdx format and uploaded to the SCVMM Server. But it failed again with the syntax error as below:
> 
> Information (10804)
> Unable to import \\TestServer\MSSCVMMLibrary\VHDs\Product-disk1.vhdx because of a syntax error in the file.
> 
> Please find my comments inline for your questions
> 
> Please let us know if there is anything else you need from us.
> 
>

Amulya,

I will try to test this on Windows Server, and see if I can reproduce what you are seeing.

-Jeff


Hi Jeff,

Any updates on this? Were you able to test it

Thanks,
Amulya


> 
> 
> -----Original Message-----
> From: Jeff Cody [mailto:jcody@redhat.com]
> Sent: Friday, December 12, 2014 8:48 PM
> To: Lokesha, Amulya
> Cc: Max Reitz; qemu-devel@nongnu.org; kwolf@redhat.com; 
> stefanha@redhat.com
> Subject: Re: [PATCH 4/4] block: vhdx - set .bdrv_has_zero_init to 
> bdrv_has_zero_init_1
> 
> On Fri, Dec 12, 2014 at 09:43:16AM -0500, Lokesha, Amulya wrote:
> >    Hi Max,
> > 
> >     
> 
> Please reply in-line, it makes it easier to follow technical 
> discussions - thanks :)
> 
> > 
> >    We applied all the 5 patches from the mail chain I got since the last
> >    week. Please find attached the patches used by us.
> > 
> >    We were unable to apply the patch3 as it failed with the 
> > following error
> > 
> >     
> > 
> >    # patch -p1 < patch3
> > 
> >    patching file block/vhdx.c
> > 
> >    patch: **** malformed patch at line 17:          error_setg_errno(errp,
> >    EINVAL, "Image size too large; max of 64TB"); @@ -1936,7 +1936,9 @@ static
> >    QemuOptsList vhdx_create_opts = {
> > 
> >
> 
> It looks like however you saved the patch file, it was corrupted.
> Looking at your attached patch 3, it split line 9 across 2 lines.
> Your patch also has whitespace differences from the patch I sent.
> 
> You also attached 5 patches - Why are you using patch 0?  You should only be applying patches 1-4.  This should not be causing any actual issues, however.
> [Amulya]: First time we applied patches 1 to 4, created VHDX image and deployed to HyperV Server, but we got the same error. Then we took a fresh qemu source and applied patches 0 to 4 and deployed to HyperV and again got the same syntax error.
> 
> 
> Are you using git for your qemu version?  If so, 'git am' is the preferred method of applying the patches - just save each of the patch emails (the whole email should be fine), and run 'git am' on each file.
> 
> [Amulya] : No. We don't have a git repository for our team. Could you please let us know how to apply these patches without git. What is the difference in applying the patch directly and modifying the code directly? Does it have any impact?
> 
> > 
> >     
> > 
> >    Hence, we manually added the patch3 changes and recompiled the qemu. We
> >    then used the patched qemu-img to convert  our vmdk image to dynamic VHDX
> >    format. We found that the image created this time had a considerable
> >    decrease in its size from 50GB to 12GB.
> > 
> 
> Could you tell me the file size of the VMDK image you were converting?
> Is it roughly 12GB as well?
> [Amulya] :  No, the vmdk image which we used for conversion is just 
> 1.4GB
> 
> 
> >    However, when we deployed it into our SCVMM 2012, the import of the VHDX
> >    image failed with a "syntax error" as below
> > 
> >     
> > 
> >    Information (10804)
> > 
> >    Unable to import \\Test.com\Library\VHDs\Test-disk1.vhdx because of a
> >    syntax error in the file.
> > 
> >     
> 
> If you run qemu-img info on Test-disk1.vhdx, what does it say?
> 
> [Amulya] :   The following is seen with qemu-img info
> # qemu-img info Test-disk1.vhdx
> image: Test-disk1.vhdx
> file format: vhdx
> virtual size: 50G (53687091200 bytes)
> disk size: 3.4G
> cluster_size: 16777216
> 
> The size of our images
> # ls -ltrh
> total 4.8G
> -rw-r--r-- 1 root root 1.4G Dec  9 10:48 Test-disk1.vmdk
> -rw-r--r-- 1 root root  12G Dec 12 04:49 Test-disk1.vhdx
> 
> > 
> >    Please let us know if we missed anything.
> > 
> >     
> > 
> >    Thanks,
> > 
> >    Amulya
> > 
> >     
> >
> 
> [...]
> 
> Jeff
Jeff Cody Dec. 23, 2014, 2:03 p.m. UTC | #10
On Tue, Dec 23, 2014 at 05:07:16AM -0500, Lokesha, Amulya wrote:
> 
> -----Original Message-----
> From: Jeff Cody [mailto:jcody@redhat.com] 
> Sent: Wednesday, December 17, 2014 5:44 PM
> To: Lokesha, Amulya
> Cc: Max Reitz; qemu-devel@nongnu.org; kwolf@redhat.com; stefanha@redhat.com
> Subject: Re: [PATCH 4/4] block: vhdx - set .bdrv_has_zero_init to bdrv_has_zero_init_1
> 
> On Wed, Dec 17, 2014 at 05:46:32AM -0500, Lokesha, Amulya wrote:
> > Hi Max, Jeff,
> > 
> > We were able to get the qemu patch files downloaded from the qemu patch site -  https://patchwork.ozlabs.org and were able to apply the patches successfully without any errors. With the patches applied, we recompiled the qemu and converted the VDK vmdk to vhdx format and uploaded to the SCVMM Server. But it failed again with the syntax error as below:
> > 
> > Information (10804)
> > Unable to import \\TestServer\MSSCVMMLibrary\VHDs\Product-disk1.vhdx because of a syntax error in the file.
> > 
> > Please find my comments inline for your questions
> > 
> > Please let us know if there is anything else you need from us.
> > 
> >
> 
> Amulya,
> 
> I will try to test this on Windows Server, and see if I can reproduce what you are seeing.
> 
> -Jeff
> 
> 
> Hi Jeff,
> 
> Any updates on this? Were you able to test it
> 
> Thanks,
> Amulya
>

Still in process.  I am working to get some MSDN licensing issues
resolved, and then I will be able to test.

> 
> > 
> > 
> > -----Original Message-----
> > From: Jeff Cody [mailto:jcody@redhat.com]
> > Sent: Friday, December 12, 2014 8:48 PM
> > To: Lokesha, Amulya
> > Cc: Max Reitz; qemu-devel@nongnu.org; kwolf@redhat.com; 
> > stefanha@redhat.com
> > Subject: Re: [PATCH 4/4] block: vhdx - set .bdrv_has_zero_init to 
> > bdrv_has_zero_init_1
> > 
> > On Fri, Dec 12, 2014 at 09:43:16AM -0500, Lokesha, Amulya wrote:
> > >    Hi Max,
> > > 
> > >     
> > 
> > Please reply in-line, it makes it easier to follow technical 
> > discussions - thanks :)
> > 
> > > 
> > >    We applied all the 5 patches from the mail chain I got since the last
> > >    week. Please find attached the patches used by us.
> > > 
> > >    We were unable to apply the patch3 as it failed with the 
> > > following error
> > > 
> > >     
> > > 
> > >    # patch -p1 < patch3
> > > 
> > >    patching file block/vhdx.c
> > > 
> > >    patch: **** malformed patch at line 17:          error_setg_errno(errp,
> > >    EINVAL, "Image size too large; max of 64TB"); @@ -1936,7 +1936,9 @@ static
> > >    QemuOptsList vhdx_create_opts = {
> > > 
> > >
> > 
> > It looks like however you saved the patch file, it was corrupted.
> > Looking at your attached patch 3, it split line 9 across 2 lines.
> > Your patch also has whitespace differences from the patch I sent.
> > 
> > You also attached 5 patches - Why are you using patch 0?  You should only be applying patches 1-4.  This should not be causing any actual issues, however.
> > [Amulya]: First time we applied patches 1 to 4, created VHDX image and deployed to HyperV Server, but we got the same error. Then we took a fresh qemu source and applied patches 0 to 4 and deployed to HyperV and again got the same syntax error.
> > 
> > 
> > Are you using git for your qemu version?  If so, 'git am' is the preferred method of applying the patches - just save each of the patch emails (the whole email should be fine), and run 'git am' on each file.
> > 
> > [Amulya] : No. We don't have a git repository for our team. Could you please let us know how to apply these patches without git. What is the difference in applying the patch directly and modifying the code directly? Does it have any impact?
> > 
> > > 
> > >     
> > > 
> > >    Hence, we manually added the patch3 changes and recompiled the qemu. We
> > >    then used the patched qemu-img to convert  our vmdk image to dynamic VHDX
> > >    format. We found that the image created this time had a considerable
> > >    decrease in its size from 50GB to 12GB.
> > > 
> > 
> > Could you tell me the file size of the VMDK image you were converting?
> > Is it roughly 12GB as well?
> > [Amulya] :  No, the vmdk image which we used for conversion is just 
> > 1.4GB
> > 
> > 
> > >    However, when we deployed it into our SCVMM 2012, the import of the VHDX
> > >    image failed with a "syntax error" as below
> > > 
> > >     
> > > 
> > >    Information (10804)
> > > 
> > >    Unable to import \\Test.com\Library\VHDs\Test-disk1.vhdx because of a
> > >    syntax error in the file.
> > > 
> > >     
> > 
> > If you run qemu-img info on Test-disk1.vhdx, what does it say?
> > 
> > [Amulya] :   The following is seen with qemu-img info
> > # qemu-img info Test-disk1.vhdx
> > image: Test-disk1.vhdx
> > file format: vhdx
> > virtual size: 50G (53687091200 bytes)
> > disk size: 3.4G
> > cluster_size: 16777216
> > 
> > The size of our images
> > # ls -ltrh
> > total 4.8G
> > -rw-r--r-- 1 root root 1.4G Dec  9 10:48 Test-disk1.vmdk
> > -rw-r--r-- 1 root root  12G Dec 12 04:49 Test-disk1.vhdx
> > 
> > > 
> > >    Please let us know if we missed anything.
> > > 
> > >     
> > > 
> > >    Thanks,
> > > 
> > >    Amulya
> > > 
> > >     
> > >
> > 
> > [...]
> > 
> > Jeff
Lokesha, Amulya Jan. 6, 2015, 10:30 a.m. UTC | #11
Comments inline

-----Original Message-----
From: Jeff Cody [mailto:jcody@redhat.com] 
Sent: Tuesday, December 23, 2014 7:33 PM
To: Lokesha, Amulya
Cc: Max Reitz; qemu-devel@nongnu.org; kwolf@redhat.com; stefanha@redhat.com
Subject: Re: [PATCH 4/4] block: vhdx - set .bdrv_has_zero_init to bdrv_has_zero_init_1

On Tue, Dec 23, 2014 at 05:07:16AM -0500, Lokesha, Amulya wrote:
> 
> -----Original Message-----
> From: Jeff Cody [mailto:jcody@redhat.com]
> Sent: Wednesday, December 17, 2014 5:44 PM
> To: Lokesha, Amulya
> Cc: Max Reitz; qemu-devel@nongnu.org; kwolf@redhat.com; 
> stefanha@redhat.com
> Subject: Re: [PATCH 4/4] block: vhdx - set .bdrv_has_zero_init to 
> bdrv_has_zero_init_1
> 
> On Wed, Dec 17, 2014 at 05:46:32AM -0500, Lokesha, Amulya wrote:
> > Hi Max, Jeff,
> > 
> > We were able to get the qemu patch files downloaded from the qemu patch site -  https://patchwork.ozlabs.org and were able to apply the patches successfully without any errors. With the patches applied, we recompiled the qemu and converted the VDK vmdk to vhdx format and uploaded to the SCVMM Server. But it failed again with the syntax error as below:
> > 
> > Information (10804)
> > Unable to import \\TestServer\MSSCVMMLibrary\VHDs\Product-disk1.vhdx because of a syntax error in the file.
> > 
> > Please find my comments inline for your questions
> > 
> > Please let us know if there is anything else you need from us.
> > 
> >
> 
> Amulya,
> 
> I will try to test this on Windows Server, and see if I can reproduce what you are seeing.
> 
> -Jeff
> 
> 
> Hi Jeff,
> 
> Any updates on this? Were you able to test it
> 
> Thanks,
> Amulya
>

Still in process.  I am working to get some MSDN licensing issues resolved, and then I will be able to test.


Hi Jeff,

Were you able to get it tested? We are waiting to deliver the patches to our customers. Please let us know
 
Thanks,
Amulya
> > 
> > 
> > -----Original Message-----
> > From: Jeff Cody [mailto:jcody@redhat.com]
> > Sent: Friday, December 12, 2014 8:48 PM
> > To: Lokesha, Amulya
> > Cc: Max Reitz; qemu-devel@nongnu.org; kwolf@redhat.com; 
> > stefanha@redhat.com
> > Subject: Re: [PATCH 4/4] block: vhdx - set .bdrv_has_zero_init to
> > bdrv_has_zero_init_1
> > 
> > On Fri, Dec 12, 2014 at 09:43:16AM -0500, Lokesha, Amulya wrote:
> > >    Hi Max,
> > > 
> > >     
> > 
> > Please reply in-line, it makes it easier to follow technical 
> > discussions - thanks :)
> > 
> > > 
> > >    We applied all the 5 patches from the mail chain I got since the last
> > >    week. Please find attached the patches used by us.
> > > 
> > >    We were unable to apply the patch3 as it failed with the 
> > > following error
> > > 
> > >     
> > > 
> > >    # patch -p1 < patch3
> > > 
> > >    patching file block/vhdx.c
> > > 
> > >    patch: **** malformed patch at line 17:          error_setg_errno(errp,
> > >    EINVAL, "Image size too large; max of 64TB"); @@ -1936,7 +1936,9 @@ static
> > >    QemuOptsList vhdx_create_opts = {
> > > 
> > >
> > 
> > It looks like however you saved the patch file, it was corrupted.
> > Looking at your attached patch 3, it split line 9 across 2 lines.
> > Your patch also has whitespace differences from the patch I sent.
> > 
> > You also attached 5 patches - Why are you using patch 0?  You should only be applying patches 1-4.  This should not be causing any actual issues, however.
> > [Amulya]: First time we applied patches 1 to 4, created VHDX image and deployed to HyperV Server, but we got the same error. Then we took a fresh qemu source and applied patches 0 to 4 and deployed to HyperV and again got the same syntax error.
> > 
> > 
> > Are you using git for your qemu version?  If so, 'git am' is the preferred method of applying the patches - just save each of the patch emails (the whole email should be fine), and run 'git am' on each file.
> > 
> > [Amulya] : No. We don't have a git repository for our team. Could you please let us know how to apply these patches without git. What is the difference in applying the patch directly and modifying the code directly? Does it have any impact?
> > 
> > > 
> > >     
> > > 
> > >    Hence, we manually added the patch3 changes and recompiled the qemu. We
> > >    then used the patched qemu-img to convert  our vmdk image to dynamic VHDX
> > >    format. We found that the image created this time had a considerable
> > >    decrease in its size from 50GB to 12GB.
> > > 
> > 
> > Could you tell me the file size of the VMDK image you were converting?
> > Is it roughly 12GB as well?
> > [Amulya] :  No, the vmdk image which we used for conversion is just 
> > 1.4GB
> > 
> > 
> > >    However, when we deployed it into our SCVMM 2012, the import of the VHDX
> > >    image failed with a "syntax error" as below
> > > 
> > >     
> > > 
> > >    Information (10804)
> > > 
> > >    Unable to import \\Test.com\Library\VHDs\Test-disk1.vhdx because of a
> > >    syntax error in the file.
> > > 
> > >     
> > 
> > If you run qemu-img info on Test-disk1.vhdx, what does it say?
> > 
> > [Amulya] :   The following is seen with qemu-img info
> > # qemu-img info Test-disk1.vhdx
> > image: Test-disk1.vhdx
> > file format: vhdx
> > virtual size: 50G (53687091200 bytes) disk size: 3.4G
> > cluster_size: 16777216
> > 
> > The size of our images
> > # ls -ltrh
> > total 4.8G
> > -rw-r--r-- 1 root root 1.4G Dec  9 10:48 Test-disk1.vmdk
> > -rw-r--r-- 1 root root  12G Dec 12 04:49 Test-disk1.vhdx
> > 
> > > 
> > >    Please let us know if we missed anything.
> > > 
> > >     
> > > 
> > >    Thanks,
> > > 
> > >    Amulya
> > > 
> > >     
> > >
> > 
> > [...]
> > 
> > Jeff
diff mbox

Patch

diff --git a/block/vhdx.c b/block/vhdx.c
index ddefc2a..2bbb3ee 100644
--- a/block/vhdx.c
+++ b/block/vhdx.c
@@ -1956,6 +1956,7 @@  static BlockDriver bdrv_vhdx = {
     .bdrv_create            = vhdx_create,
     .bdrv_get_info          = vhdx_get_info,
     .bdrv_check             = vhdx_check,
+    .bdrv_has_zero_init     = bdrv_has_zero_init_1,
 
     .create_opts            = &vhdx_create_opts,
 };