Problems with exporting to OVA - Parent Child

This is for discussing general topics about how to use VirtualBox.
Post Reply
Test Beta
Posts: 5
Joined: 19. Jan 2023, 11:53

Problems with exporting to OVA - Parent Child

Post by Test Beta »

I have a problem with exporting virtual machine, changing virtual size or cloning disk of one of the machines.
I suspect the problem is because of parent/child disk relationship, and maybe parent corrupted.
I honestly don't remember what did I do to create this mess but since I need this one on other PCs I wonder can something be done to export it and change disk size.
I will attach few pictures for reference.
virtualbox.png
virtualbox.png (12.65 KiB) Viewed 6010 times
virtualbox2.png
virtualbox2.png (5.69 KiB) Viewed 6010 times
Can somebody help me with that?
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Problems with exporting to OVA - Parent Child

Post by mpack »

Why do you want to export a VM? Are you moving it to (e.g.) VMware?

Trying to resize linked clones or VMs with snapshots is fraught with difficulties. Basically... don't.

There should be no problems creating a clone of a working VM. More details needed.

And please let's just concentrate on the latter problem: one issue per topic.
Test Beta
Posts: 5
Joined: 19. Jan 2023, 11:53

Re: Problems with exporting to OVA - Parent Child

Post by Test Beta »

Basically I need more disk space on that virtual machine and it gives me error.
Aldo I would also like to export it to OVA file, which does work on any other virtual machine I have but not at this one.
How do I unlink this, so it does have only one drive and not linked
Snimka zaslona 2023-01-19 113327.png
Snimka zaslona 2023-01-19 113327.png (12.35 KiB) Viewed 6005 times
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Problems with exporting to OVA - Parent Child

Post by mpack »

The easiest way to unlink a VM is to create a full clone from it, current state only.
Test Beta
Posts: 5
Joined: 19. Jan 2023, 11:53

Re: Problems with exporting to OVA - Parent Child

Post by Test Beta »

That is what I am saying, I cant even do a full clone
Snimka zaslona 2023-01-19 122713.png
Snimka zaslona 2023-01-19 122713.png (10.42 KiB) Viewed 5981 times
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Problems with exporting to OVA - Parent Child

Post by mpack »

It is strange to see "VERR_ZIP_CORRUPTED" when referring to a VMDK which is part of a working VM.

So, my guess is that it is not a fully working VM. At best it was limping along.

I think what may have happened is that you manually unpacked an OVA and then maybe created a VM around the unpacked VMDK. You should not do that because VMDKs inside OVAs are stream compressed and therefore read-only. They need to be decompressed to produce a working VM. Using the proper "import" feature does this automatically, hence my assumption that you didn't use it.

I have not tried this in a long time, but if you DID manually unpack a VMDK from an OVA, did not decompress it, and then included it in a VM, VirtualBox will indeed accept it, but it will create a snapshot layer to allow the drive to be writeable. I have always disliked that VirtualBox does this: obviously the devs felt it was better than issuing an error, but IMO it only stores up problems for a future when the repair costs will be higher.

An example of the stored up problems is that such a VM cannot be exported again, or cloned to a snapshot-free VM, because neither option keeps snapshots, and there's no way this arrangement can be "flattened".

What I would suggest doing is to use VBoxManage clonemedium to convert the "Work-Win7-disk001.vmdk" file to VDI format. That guarantees that it can't be stream compressed because VDI has no such feature. Then replace the VMDK in the source VM using the VDI. You will have to discard the snapshot since there is no way to merge it. After that it should be ok.
Last edited by mpack on 19. Jan 2023, 14:32, edited 1 time in total.
Reason: Oops! Said "liked" when I meant "disliked".
Test Beta
Posts: 5
Joined: 19. Jan 2023, 11:53

Re: Problems with exporting to OVA - Parent Child

Post by Test Beta »

This gives me Compressed image is corrupted Ver_Zip_Corrupted.
But, could I like use Acronis or AOMEI bootabile disc to create image of machine and than just create new one out of it
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Problems with exporting to OVA - Parent Child

Post by mpack »

Yes, you can run a disk imaging tool inside the VM (I have had great success with Macrium Reflect Free), writing the image to a network or USB drive, and then "restore" the Macrium image into a new VM.
Test Beta
Posts: 5
Joined: 19. Jan 2023, 11:53

Re: Problems with exporting to OVA - Parent Child

Post by Test Beta »

I did it, AOMEI image froze but Acronis worked good.

After trial and error this worked:

- Made another new virtual disk.
- Mount that disk to virtual machine.
- Open virtual machine and made disk in disk management tool.
- Shut down
- I had Acronis bootable ISO and mount it into CD on VM.
- boot from CD
- clone disk 1 to disk 2
- Remove disk 1 from VM
- Normal boot from disk 2

Now I can do anything with machine, I exported to OVA file normally.
MariaCook
Posts: 1
Joined: 13. Feb 2023, 21:27

Re: Problems with exporting to OVA - Parent Child

Post by MariaCook »

mpack wrote:Yes, you can run a disk imaging tool inside the VM (I have had great success with Macrium Reflect Free), writing the image to a network or USB drive, and then "restore" the Macrium image into a new VM.
Thanks for helping me out as well. You made my day. If I face any more problem, I will message you.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Problems with exporting to OVA - Parent Child

Post by mpack »

Hmm. It seems that in January I omitted to congratulate "Test Beta" on solving his problem. Well done.
Post Reply