-
Notifications
You must be signed in to change notification settings - Fork 897
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] vmdk file is incomplete when downloaded from SDDC vsphere content library via govc libary.export #3356
Comments
Howdy 🖐 mimcdevitt ! Thank you for your interest in this project. We value your feedback and will respond soon. If you want to contribute to this project, please make yourself familiar with the |
Thank you for the detailed report @mimcdevitt govmomi/govc/library/import.go Line 147 in a130044
Following patch adds the same for diff --git a/govc/library/export.go b/govc/library/export.go
index 45162144..c5f0fd82 100644
--- a/govc/library/export.go
+++ b/govc/library/export.go
@@ -84,6 +84,7 @@ func (cmd *export) Run(ctx context.Context, f *flag.FlagSet) error {
if err != nil {
return err
}
+ cmd.KeepAlive(c)
var names []string
m := library.NewManager(c) |
Thank you very much @dougm appreciate your help on this issue. |
Describe the bug
vsphere vmdk file is incomplete/corrupted when downloaded from SDDC vpshere content library using via the govc library.export command.
To Reproduce
Steps to reproduce the behavior:
use govc to perform library.export of OVA from SDDC Vsphere content library.
After download use qemu-ing to check validity of vmdk file
Expected behavior
govc library.export function should download all components of a OVA and files should be complete.
Affected version
Tested with these versions
govc version 0.34 and 0.34.1
VMware SDDC Version: 1.22v6
Additional context
Initially we though the problem was related to govc-library export not exporting all files in OVA. When using govc to export a OVA from our content library we are getting a 404 error intermittently when the export runs. However when we look at the data store we can see all three files that make up the OVA. It appears that the issue is related to the vmdk file not downloading entirely. Any files in the OVA that come after the vmdk do not download. The downloaded vmdk is not complete but there is no error from govc to indicate that the vmdk file did not download in its entirely.
As part of our workflow we download the OVF, VMDK and NVRAM files from the SDDC Content Library and then pass them as inputs to a script which performs additional operations and then recreates a new OVA.
Since mid-December or so, we noticed that the OVAs being created from the exported files had shrunk in size compared to previous uploads (~6 GB before vs ~2 GB after). When inspecting the VMDK file that was exported we encountered the following error.
This indicates that the VMDK is corrupt and from the size reduction, we hypothesized that it’s possibly not being downloaded fully from the Content Library . To investigate if this was caused due to a vCenter content library session timeout issue, we monitored the govc export sessions using the following command
$ while true; do govc library.session.ls; done
Surprisingly, keeping this session monitoring alive during the VMDK download caused it to download the entire 6GB VMDK instead of cutting short at ~2 GB, and the downloaded VMDK had no errors when inspected. The later usage of this VMDK to build a new OVA also worked fine.
The text was updated successfully, but these errors were encountered: