* [Qemu-devel] vmdk stream-optimised format @ 2013-08-19 11:09 Alex Bligh 2013-08-19 11:23 ` Fam Zheng 0 siblings, 1 reply; 11+ messages in thread From: Alex Bligh @ 2013-08-19 11:09 UTC (permalink / raw) To: qemu-devel; +Cc: Alex Bligh I note some recent work on vmdk file support. Has anyone looked at supporting vmdk streaming format as an /output/ file format (I think we currently support it as an input format). This is what you need to use to upload a VM to vCenter. Currently the route is convert to raw then use: https://github.com/imcleod/VMDK-stream-converter which is some Python from Ian McLeod <imcleod@redhat.com> Life would be easier if qemu-img supported this directly. It does not look fantastically difficult. -- Alex Bligh ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Qemu-devel] vmdk stream-optimised format 2013-08-19 11:09 [Qemu-devel] vmdk stream-optimised format Alex Bligh @ 2013-08-19 11:23 ` Fam Zheng 2013-08-19 11:50 ` Alex Bligh 0 siblings, 1 reply; 11+ messages in thread From: Fam Zheng @ 2013-08-19 11:23 UTC (permalink / raw) To: Alex Bligh; +Cc: qemu-devel On Mon, 08/19 12:09, Alex Bligh wrote: > I note some recent work on vmdk file support. Has anyone looked at > supporting vmdk streaming format as an /output/ file format (I > think we currently support it as an input format). This is what > you need to use to upload a VM to vCenter. Currently the route > is convert to raw then use: > > https://github.com/imcleod/VMDK-stream-converter > > which is some Python from Ian McLeod <imcleod@redhat.com> > Life would be easier if qemu-img supported this directly. > It does not look fantastically difficult. > > -- > Alex Bligh > Yes, that would be something possible to do. Is it the only format to upload a VM to vCenter now, shouldn't normal VMDK be supported as well? Thanks, Fam ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Qemu-devel] vmdk stream-optimised format 2013-08-19 11:23 ` Fam Zheng @ 2013-08-19 11:50 ` Alex Bligh 2013-08-20 1:42 ` Fam Zheng 0 siblings, 1 reply; 11+ messages in thread From: Alex Bligh @ 2013-08-19 11:50 UTC (permalink / raw) To: famz; +Cc: qemu-devel, Alex Bligh On 19 Aug 2013, at 12:23, Fam Zheng wrote: > Yes, that would be something possible to do. Is it the only format to > upload a VM to vCenter now, shouldn't normal VMDK be supported as well? Ian puts it better than I can: > This format is only useful if you are attempting to import virtual machines > into ESX using the vSphere SOAP API and HTTP POST uploads of image files. > (In which case, it is required.) IE it is the ONLY format you can use using the vSphere SOAP API, which is the only way to automate image uploading. vCenter converts other formats to this format. Extensive testing with qemu in Q1 this year indicates that it is not possible to use qemu-img convert to produce anything that will upload. I went as far as hexdump at the time. I believe I tried compat6 and the various subformat options. I believe we /read/ this format fine. -- Alex Bligh ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Qemu-devel] vmdk stream-optimised format 2013-08-19 11:50 ` Alex Bligh @ 2013-08-20 1:42 ` Fam Zheng 2013-08-20 6:51 ` Alex Bligh 0 siblings, 1 reply; 11+ messages in thread From: Fam Zheng @ 2013-08-20 1:42 UTC (permalink / raw) To: Alex Bligh; +Cc: qemu-devel On Mon, 08/19 12:50, Alex Bligh wrote: > > On 19 Aug 2013, at 12:23, Fam Zheng wrote: > > > Yes, that would be something possible to do. Is it the only format to > > upload a VM to vCenter now, shouldn't normal VMDK be supported as well? > > Ian puts it better than I can: > > > This format is only useful if you are attempting to import virtual machines > > into ESX using the vSphere SOAP API and HTTP POST uploads of image files. > > (In which case, it is required.) > > IE it is the ONLY format you can use using the vSphere SOAP API, which is > the only way to automate image uploading. vCenter converts other formats > to this format. > > Extensive testing with qemu in Q1 this year indicates that it is not > possible to use qemu-img convert to produce anything that will upload. > I went as far as hexdump at the time. I believe I tried compat6 > and the various subformat options. > > I believe we /read/ this format fine. > OK, thanks for explaination. That sounds a valid use case for streamOptimized. However I am afraid QEMU and its users benefit not much from this feature anyway, because it's moving a VM away to VMware, :) that might be the reason it's not there yet, and I don't know about any plan to do it in the near future. But if someone sends patches for this, I think it is possible to get in. Thanks, Fam ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Qemu-devel] vmdk stream-optimised format 2013-08-20 1:42 ` Fam Zheng @ 2013-08-20 6:51 ` Alex Bligh 2013-08-20 7:08 ` Fam Zheng 2013-08-20 14:51 ` Stefan Hajnoczi 0 siblings, 2 replies; 11+ messages in thread From: Alex Bligh @ 2013-08-20 6:51 UTC (permalink / raw) To: famz; +Cc: qemu-devel, Alex Bligh On 20 Aug 2013, at 02:42, Fam Zheng wrote: > OK, thanks for explaination. That sounds a valid use case for > streamOptimized. However I am afraid QEMU and its users benefit not much > from this feature anyway, because it's moving a VM away to VMware, :) > that might be the reason it's not there yet, and I don't know about any > plan to do it in the near future. Well, given it is an open source project, the more interoperability the better. Even if it just means users need not worry about lock in to faster hypervisors ... Being more serious, qemu-img is part of the project too. > But if someone sends patches for this, I think it is possible to get in. I guessed "send code" might be the answer :-) What I'm not sure of is whether the streaming format has to be written sequentially from as opposed to random writes. I believe the way qemu-img convert works, one can't guarantee the writes are sequential. -- Alex Bligh ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Qemu-devel] vmdk stream-optimised format 2013-08-20 6:51 ` Alex Bligh @ 2013-08-20 7:08 ` Fam Zheng 2013-08-20 10:53 ` Paolo Bonzini 2013-08-20 14:51 ` Stefan Hajnoczi 1 sibling, 1 reply; 11+ messages in thread From: Fam Zheng @ 2013-08-20 7:08 UTC (permalink / raw) To: Alex Bligh; +Cc: qemu-devel On Tue, 08/20 07:51, Alex Bligh wrote: > > On 20 Aug 2013, at 02:42, Fam Zheng wrote: > > > OK, thanks for explaination. That sounds a valid use case for > > streamOptimized. However I am afraid QEMU and its users benefit not much > > from this feature anyway, because it's moving a VM away to VMware, :) > > that might be the reason it's not there yet, and I don't know about any > > plan to do it in the near future. > > Well, given it is an open source project, the more interoperability > the better. Even if it just means users need not worry about lock > in to faster hypervisors ... Being more serious, qemu-img is > part of the project too. > > > But if someone sends patches for this, I think it is possible to get in. > > I guessed "send code" might be the answer :-) > > What I'm not sure of is whether the streaming format has to be written > sequentially from as opposed to random writes. I believe the way > qemu-img convert works, one can't guarantee the writes are > sequential. > The order of sectors doesn't matter, but granularity should be aligned to, as the data is compressed cluster by cluster. And no overwrite, of course. The challenge may be that header comes at the end of file (well, called footer), which is not decided at create time. Thanks, Fam ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Qemu-devel] vmdk stream-optimised format 2013-08-20 7:08 ` Fam Zheng @ 2013-08-20 10:53 ` Paolo Bonzini 2013-08-20 13:37 ` Alex Bligh 0 siblings, 1 reply; 11+ messages in thread From: Paolo Bonzini @ 2013-08-20 10:53 UTC (permalink / raw) To: famz; +Cc: qemu-devel, Alex Bligh Il 20/08/2013 09:08, Fam Zheng ha scritto: > On Tue, 08/20 07:51, Alex Bligh wrote: >> >> On 20 Aug 2013, at 02:42, Fam Zheng wrote: >> >>> OK, thanks for explaination. That sounds a valid use case for >>> streamOptimized. However I am afraid QEMU and its users benefit not much >>> from this feature anyway, because it's moving a VM away to VMware, :) >>> that might be the reason it's not there yet, and I don't know about any >>> plan to do it in the near future. >> >> Well, given it is an open source project, the more interoperability >> the better. Even if it just means users need not worry about lock >> in to faster hypervisors ... Being more serious, qemu-img is >> part of the project too. >> >>> But if someone sends patches for this, I think it is possible to get in. >> >> I guessed "send code" might be the answer :-) >> >> What I'm not sure of is whether the streaming format has to be written >> sequentially from as opposed to random writes. I believe the way >> qemu-img convert works, one can't guarantee the writes are >> sequential. >> > The order of sectors doesn't matter, but granularity should be aligned > to, as the data is compressed cluster by cluster. And no overwrite, of > course. The challenge may be that header comes at the end of file > (well, called footer), which is not decided at create time. It doesn't look too different from what "qemu-img convert -c" does, except that you need to use the right "-o" incantation to specify the format type. Paolo ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Qemu-devel] vmdk stream-optimised format 2013-08-20 10:53 ` Paolo Bonzini @ 2013-08-20 13:37 ` Alex Bligh 2013-08-20 13:37 ` Paolo Bonzini 0 siblings, 1 reply; 11+ messages in thread From: Alex Bligh @ 2013-08-20 13:37 UTC (permalink / raw) To: Paolo Bonzini; +Cc: famz, qemu-devel, Alex Bligh On 20 Aug 2013, at 11:53, Paolo Bonzini wrote: > It doesn't look too different from what "qemu-img convert -c" does, > except that you need to use the right "-o" incantation to specify the > format type. Extensive incanting did not produce a result that works. Possibly inadequate haruspication on my part. I suspect it's only a minor modification to support it. -- Alex Bligh ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Qemu-devel] vmdk stream-optimised format 2013-08-20 13:37 ` Alex Bligh @ 2013-08-20 13:37 ` Paolo Bonzini 2013-08-20 14:02 ` Alex Bligh 0 siblings, 1 reply; 11+ messages in thread From: Paolo Bonzini @ 2013-08-20 13:37 UTC (permalink / raw) To: Alex Bligh; +Cc: famz, qemu-devel Il 20/08/2013 15:37, Alex Bligh ha scritto: > > On 20 Aug 2013, at 11:53, Paolo Bonzini wrote: > >> It doesn't look too different from what "qemu-img convert -c" does, >> except that you need to use the right "-o" incantation to specify the >> format type. > > Extensive incanting did not produce a result that works. Possibly > inadequate haruspication on my part. I suspect it's only a minor > modification to support it. Yes, because vmdk does not implement bdrv_write_compressed. Sorry for leaving out the small "detail". :( Paolo ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Qemu-devel] vmdk stream-optimised format 2013-08-20 13:37 ` Paolo Bonzini @ 2013-08-20 14:02 ` Alex Bligh 0 siblings, 0 replies; 11+ messages in thread From: Alex Bligh @ 2013-08-20 14:02 UTC (permalink / raw) To: Paolo Bonzini; +Cc: famz, qemu-devel, Alex Bligh On 20 Aug 2013, at 14:37, Paolo Bonzini wrote: > Yes, because vmdk does not implement bdrv_write_compressed. Sorry for > leaving out the small "detail". :( Would that be easy for me to fix? -- Alex Bligh ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Qemu-devel] vmdk stream-optimised format 2013-08-20 6:51 ` Alex Bligh 2013-08-20 7:08 ` Fam Zheng @ 2013-08-20 14:51 ` Stefan Hajnoczi 1 sibling, 0 replies; 11+ messages in thread From: Stefan Hajnoczi @ 2013-08-20 14:51 UTC (permalink / raw) To: Alex Bligh; +Cc: famz, qemu-devel On Tue, Aug 20, 2013 at 07:51:40AM +0100, Alex Bligh wrote: > What I'm not sure of is whether the streaming format has to be written > sequentially from as opposed to random writes. I believe the way > qemu-img convert works, one can't guarantee the writes are > sequential. It should be possible to support stream-optimized VMDK writing in qemu-img convert. The file format supports non-sequential layout of data - each piece of guest data also has a logical block address with it. You can write out the grain table/directory at the end of the image file once you know how data is layed out. The VMDK spec is not great so I guess you'll also need a VMware setup to verify your code changes. Stefan ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2013-08-20 14:52 UTC | newest] Thread overview: 11+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2013-08-19 11:09 [Qemu-devel] vmdk stream-optimised format Alex Bligh 2013-08-19 11:23 ` Fam Zheng 2013-08-19 11:50 ` Alex Bligh 2013-08-20 1:42 ` Fam Zheng 2013-08-20 6:51 ` Alex Bligh 2013-08-20 7:08 ` Fam Zheng 2013-08-20 10:53 ` Paolo Bonzini 2013-08-20 13:37 ` Alex Bligh 2013-08-20 13:37 ` Paolo Bonzini 2013-08-20 14:02 ` Alex Bligh 2013-08-20 14:51 ` Stefan Hajnoczi
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).