All of lore.kernel.org
 help / color / mirror / Atom feed
* why are qemu-img and vhd-util created files incompatible?
@ 2013-02-17 14:30 Darren Shepherd
  2013-02-19 17:00 ` Ian Jackson
  2013-02-19 23:40 ` Andrei Lifchits
  0 siblings, 2 replies; 5+ messages in thread
From: Darren Shepherd @ 2013-02-17 14:30 UTC (permalink / raw)
  To: xen-devel

I was wondering if someone can shed some light on why vhd files
created with qemu-img don't really work right with vhd-util and
consequentially blktap in general.  To validate the incompatiblity its
simple enough to do

qemu-img create -f vpc test.vhd 40g
vhd-util snapshot -n child.vhd -p test.vhd

Which will show the below and then the headers don't display the BATMAP summary:

primary footer invalid: creation time in future
test.vhd appears invalid; dumping metadata
Failed to open test.vhd: -22

Additionally "vhd-util snapshot -n child.vhd -p test.vhd" will give
you the same 22 error.

I was going to start researching this with the eventual goal of
changing qemu-img, but I thought I'd ask the experts first.

Thanks,
Darren

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: why are qemu-img and vhd-util created files incompatible?
  2013-02-17 14:30 why are qemu-img and vhd-util created files incompatible? Darren Shepherd
@ 2013-02-19 17:00 ` Ian Jackson
  2013-02-19 23:40 ` Andrei Lifchits
  1 sibling, 0 replies; 5+ messages in thread
From: Ian Jackson @ 2013-02-19 17:00 UTC (permalink / raw)
  To: Darren Shepherd; +Cc: xen-devel

Darren Shepherd writes ("[Xen-devel] why are qemu-img and vhd-util created files incompatible?"):
> I was wondering if someone can shed some light on why vhd files
> created with qemu-img don't really work right with vhd-util and
> consequentially blktap in general.  To validate the incompatiblity its
> simple enough to do
> 
> qemu-img create -f vpc test.vhd 40g
> vhd-util snapshot -n child.vhd -p test.vhd
...
> Additionally "vhd-util snapshot -n child.vhd -p test.vhd" will give
> you the same 22 error.
> 
> I was going to start researching this with the eventual goal of
> changing qemu-img, but I thought I'd ask the experts first.

I'm afraid there aren't many experts here on the vhd code in the
xen-unstable tree.  It's possible that the qemu-img built from
qemu-xen-traditional "qemu-img-xen" might be more compatible.

Please do let us know what you discover.

Thanks,
Ian.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: why are qemu-img and vhd-util created files incompatible?
  2013-02-17 14:30 why are qemu-img and vhd-util created files incompatible? Darren Shepherd
  2013-02-19 17:00 ` Ian Jackson
@ 2013-02-19 23:40 ` Andrei Lifchits
  2013-02-20 15:52   ` Darren Shepherd
  1 sibling, 1 reply; 5+ messages in thread
From: Andrei Lifchits @ 2013-02-19 23:40 UTC (permalink / raw)
  To: Darren Shepherd; +Cc: xen-devel

On Sun, Feb 17, 2013 at 2:30 PM, Darren Shepherd
<darren.s.shepherd@gmail.com> wrote:
> I was wondering if someone can shed some light on why vhd files
> created with qemu-img don't really work right with vhd-util and
> consequentially blktap in general.  To validate the incompatiblity its
> simple enough to do
>
> qemu-img create -f vpc test.vhd 40g
> vhd-util snapshot -n child.vhd -p test.vhd
>
> Which will show the below and then the headers don't display the BATMAP summary:
>
> primary footer invalid: creation time in future

This is due to a bug in the blktap2 code which uses local time instead
of UTC (which is mandated by the VHD specs). I fixed it recently in
the Citrix fork of blktap
(https://github.com/xen-org/blktap/commit/a79ac2c05f97c2384bbf981419f329f184dc646a),
but unfortunately these two forks aren't really kept in sync.

> test.vhd appears invalid; dumping metadata
> Failed to open test.vhd: -22
>
> Additionally "vhd-util snapshot -n child.vhd -p test.vhd" will give
> you the same 22 error.
>
> I was going to start researching this with the eventual goal of
> changing qemu-img, but I thought I'd ask the experts first.
>
> Thanks,
> Darren
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: why are qemu-img and vhd-util created files incompatible?
  2013-02-19 23:40 ` Andrei Lifchits
@ 2013-02-20 15:52   ` Darren Shepherd
  2013-02-20 21:28     ` Andrei Lifchits
  0 siblings, 1 reply; 5+ messages in thread
From: Darren Shepherd @ 2013-02-20 15:52 UTC (permalink / raw)
  To: Andrei Lifchits; +Cc: xen-devel

Thanks, I'll try out that patch.  I'm using the CentOS 6 bundle of Xen
which pulls in a lot of the newer blktap code.  Do you know if that is
the only thing that prevents snapshots from working?  I have seen
people work around the time issue with just using the faketime
preload, but I think there is something beyond the timestamp that is
incompatible.

Thanks,
Darren

On Tue, Feb 19, 2013 at 4:40 PM, Andrei Lifchits
<andrei.lifchits@citrix.com> wrote:
> On Sun, Feb 17, 2013 at 2:30 PM, Darren Shepherd
> <darren.s.shepherd@gmail.com> wrote:
>> I was wondering if someone can shed some light on why vhd files
>> created with qemu-img don't really work right with vhd-util and
>> consequentially blktap in general.  To validate the incompatiblity its
>> simple enough to do
>>
>> qemu-img create -f vpc test.vhd 40g
>> vhd-util snapshot -n child.vhd -p test.vhd
>>
>> Which will show the below and then the headers don't display the BATMAP summary:
>>
>> primary footer invalid: creation time in future
>
> This is due to a bug in the blktap2 code which uses local time instead
> of UTC (which is mandated by the VHD specs). I fixed it recently in
> the Citrix fork of blktap
> (https://github.com/xen-org/blktap/commit/a79ac2c05f97c2384bbf981419f329f184dc646a),
> but unfortunately these two forks aren't really kept in sync.
>
>> test.vhd appears invalid; dumping metadata
>> Failed to open test.vhd: -22
>>
>> Additionally "vhd-util snapshot -n child.vhd -p test.vhd" will give
>> you the same 22 error.
>>
>> I was going to start researching this with the eventual goal of
>> changing qemu-img, but I thought I'd ask the experts first.
>>
>> Thanks,
>> Darren
>>
>> _______________________________________________
>> Xen-devel mailing list
>> Xen-devel@lists.xen.org
>> http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: why are qemu-img and vhd-util created files incompatible?
  2013-02-20 15:52   ` Darren Shepherd
@ 2013-02-20 21:28     ` Andrei Lifchits
  0 siblings, 0 replies; 5+ messages in thread
From: Andrei Lifchits @ 2013-02-20 21:28 UTC (permalink / raw)
  To: Darren Shepherd; +Cc: xen-devel

On Wed, Feb 20, 2013 at 3:52 PM, Darren Shepherd
<darren.s.shepherd@gmail.com> wrote:
> Thanks, I'll try out that patch.  I'm using the CentOS 6 bundle of Xen
> which pulls in a lot of the newer blktap code.  Do you know if that is
> the only thing that prevents snapshots from working?

I don't, sorry: I've never really used OSS Xen until now.

> people work around the time issue with just using the faketime
> preload, but I think there is something beyond the timestamp that is
> incompatible.

If you tell me how to reproduce those other problems I can certainly
have a look.

Cheers,
Andrei

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-02-20 21:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-17 14:30 why are qemu-img and vhd-util created files incompatible? Darren Shepherd
2013-02-19 17:00 ` Ian Jackson
2013-02-19 23:40 ` Andrei Lifchits
2013-02-20 15:52   ` Darren Shepherd
2013-02-20 21:28     ` Andrei Lifchits

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.