After Clone, WHAT?

Discussions related to using VirtualBox on Windows hosts.
RetiredGuy
Posts: 41
Joined: 19. Nov 2015, 18:15

After Clone, WHAT?

Post by RetiredGuy »

SO SORRY! Don't seem able to find 'post new message' :-(

After Clone, WHAT?

Okay, I'm stuck.
I have to upgrade the disk size of a guest. Sure, you guys say no 'fixed', yada-yada-yada.
Well, I've no interest in doing disk management, partitioning, etc., so instead of 'resize', I figgered I'd be creative.
1. Create a new disk
2. clone old --->new with '--existing' parameter
3. Run: VBoxManage clonemedium disk C:\Users\Public\VBox\WxP64-SB\WxP64-SB.vhd C:\Users\Public\VBox\WxP64-SB\newvirtual64.vhd --existing
4. SUCCESS! As per manual, ''if the destination medium is larger than the source the remaining part of the destination medium is unchanged."

Now what? Can't 'Add' or 'import' the new vhd; how can I start it to know it's good?
(After determining it's good, any reading how to swap out old for new?)

FYI: Win10Pro 64-bit host & guest, 1tbHDD(h),50gb HDD(g), 80gb new drive, both fixed
Last edited by scottgus1 on 23. Feb 2022, 23:09, edited 1 time in total.
Reason: changed topic title to reflect problem
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, Linux

Re: CloneVDI tool - Discussion & Support

Post by scottgus1 »

I'll guess that #3 is the command used in #2.

RetiredGuy wrote:Can't 'Add' or 'import' the new vhd
Import is for whole VMs packed as appliances, so a disk file is not imported.

If you want to make a new VM for the new VHD file, make a new VM. then when you are asked to either make a new disk file or use an existing one, use the provided dialog boxes to navigate to the new VHD file.

If this process does not succeed, please explain exactly what is happening, including any error messages you receive.

BTW, VHD is not a good disk file format, unless it is a fixed size VHD, just to let you know. VHD has a design flaw that can kill the data in the disk file if the host glitches while the VHD is expanding. Dynamic VHDs can expand, so the design flaw can be triggered. Fixed size VHDs do not expand so the design flaw will not trigger on them.
RetiredGuy
Posts: 41
Joined: 19. Nov 2015, 18:15

After Clone, WHAT?

Post by RetiredGuy »

Okay, I'm stuck.
I have to upgrade the disk size of a guest. Sure, you guys say no 'fixed', yada-yada-yada.
Well, I've no interest in doing disk management, partitioning, etc., so instead of 'resize', I figgered I'd be creative.
1. Create a new disk
2. clone old --->new with '--existing' parameter
3. Run: VBoxManage clonemedium disk C:\Users\Public\VBox\WxP64-SB\WxP64-SB.vhd C:\Users\Public\VBox\WxP64-SB\newvirtual64.vhd --existing
4. SUCCESS! As per manual, ''if the destination medium is larger than the source the remaining part of the destination medium is unchanged."

Now what? Can't 'Add' or 'import' the new vhd; how can I start it to know it's good?
(After determining it's good, any reading how to swap out old for new?)

FYI: Win10Pro 64-bit host & guest, 1tbHDD(h),50gb HDD(g), 80gb new drive, both fixed
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, Linux

Re: After Clone, WHAT?

Post by scottgus1 »

Merged your topics, please see my post above.
RetiredGuy
Posts: 41
Joined: 19. Nov 2015, 18:15

Re: After Clone, WHAT?

Post by RetiredGuy »

Thank you VERY MUCH for replying. Logged in to plead that somebody - anybody - comment.
So I figure ILL try your recommendation (where do I find 'make new vm? Not in the media tool :-( )
Back soon.


P.S. My idea ssound? You didn't comment...
RetiredGuy
Posts: 41
Joined: 19. Nov 2015, 18:15

Re: After Clone, WHAT?

Post by RetiredGuy »

Forget it, my whole premise is wrong.
When running clone, an end of-partition marker must be written too (c: drive size is unchanged).
Explorer shows the correct VOLUME size, but that is of no help.
So I'm back to 1)clone, 2)resize clone, 3)re-partition :-(

No flippin' idea how to re-partition+extend et al, gonna look at the docs.
Wish me luck !
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, Linux

Re: After Clone, WHAT?

Post by scottgus1 »

RetiredGuy wrote:how to re-partition+extend et al
Mpack's CloneVDI has a clone & increase feature which will also increase the main data partition as well, in at least some circumstances. I have used it and it works fine.
RetiredGuy
Posts: 41
Joined: 19. Nov 2015, 18:15

Re: After Clone, WHAT?

Post by RetiredGuy »

Tried your suggestion - thank you! - but I gotta be missing something :-(

Per the attached, I'm looking to clone an existing disk, as well as expand it.
The clone piece apparently works, and gives feedback as it progresses.
The1st indication I had that something wrong is that the mb completed + the mb to go equaled the original size (!).
I am not expanding. What am I missing?
Attachments
KlonedVDI.png
KlonedVDI.png (10.94 KiB) Viewed 1910 times
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, Linux

Re: After Clone, WHAT?

Post by scottgus1 »

Please run these commands on the host's command prompt:

cd "C:\Program Files\Oracle\Virtualbox"
vboxmanage showmediuminfo "drive:\path\to\cloned\drive\file.vdi"
RetiredGuy
Posts: 41
Joined: 19. Nov 2015, 18:15

Re: After Clone, WHAT?

Post by RetiredGuy »

Thanks for any help:

C:\Program Files\Oracle\VirtualBox>vboxmanage showmediuminfo "C:\Users\Public\VBox\CloneWxP64-SB\CloneWxP64-SB.vdi"
UUID: 655f8e65-3c05-48ee-822d-3e154a728743
Parent UUID: base
State: created
Type: normal (base)
Location: C:\Users\Public\VBox\CloneWxP64-SB\CloneWxP64-SB.vdi
Storage format: VDI
Format variant: dynamic default
Capacity: 77824 MBytes
Size on disk: 54802 MBytes
Encryption: disabled
Property: AllocationBlockSize=1048576

C:\Program Files\Oracle\VirtualBox>


One thhing. I always run as a limited user (paranoid). Is that maybbe a problem?
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, Linux

Re: After Clone, WHAT?

Post by scottgus1 »

RetiredGuy wrote:Capacity: 77824 MBytes
Size on disk: 54802 MBytes
Looks like it worked. If you run the disk file in a VM and it shows the desired 76-ish GB in the main partition then delete the "looks like". :D

The output of CloneVDI is always a dynamic .vdi, so the clone disk file will start off still small as the original (or smaller if you checked 'compact') and will increase in space over time.

If you desired a fixed-disk vdi, then you can fill up the clone disk with junk files to grow the vdi to its final size then delete the junk files. The disk file will remain grown.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: After Clone, WHAT?

Post by mpack »

RetiredGuy wrote: The 1st indication I had that something wrong is that the mb completed + the mb to go equaled the original size (!).
That's because you did not tick the "Compact" option. If you had then the output file would have been smaller than the original.

CloneVDI successfully increased the capacity of the virtual disk. Increasing the capacity does not change the size of the host file until the guest uses some of that new capacity.
RetiredGuy
Posts: 41
Joined: 19. Nov 2015, 18:15

Re: After Clone, WHAT?

Post by RetiredGuy »

Thank you BOTH for answering.
STOOOOPID! STOOOOPID! I can't believe that I was looking at the size of dynamic disk! :-(

That said, I believe this utility should be forthcoming with more diagnostics at completion. Yeah, I know it's a public service; so let's just call it a suggestion - probably not worth more than you paid for it.
Like, what say you show the TRUE 'capacity' as is shown in 'showmediuminfo'?
Additionally, how about showing that the partition has been extended, and we're not just dealing with 'Unallocated Space'?

I'm attaching a Win Explorer shot of the folder after running this utility.
Just to confirm, all I get is a .vdi, not a full VM. (Solved easily enough with a 'Machine-->Add' but using an existing drive)

Finally, a confirmation is requested that a .vdi icon is red rather tha blue, as a vhd.

Thanks again, and would greatly appreciate anything you can add her..
Attachments
KlonedVDI2.png
KlonedVDI2.png (5.96 KiB) Viewed 1778 times
RetiredGuy
Posts: 41
Joined: 19. Nov 2015, 18:15

Re: After Clone, WHAT?

Post by RetiredGuy »

Hello?
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: After Clone, WHAT?

Post by mpack »

Hello? I don't see an additional question. Details of what CloneVDI does can be found in its release notes.
Post Reply