CloneVDI tool - Discussion & Support

Discussions related to using VirtualBox on Windows hosts.

Re: CloneVDI tool - Discussion & Support

Postby mpack » 9. Jan 2015, 16:08

I agree with your conclusion, OTOH I'm struggling to explain why there would be even a small difference in the two methods: both should identify all of the unused space on a disk, and both can only discard a 1MB VDI block when the entire block is unused. Normally, you should only see a difference if some extra step has been done for one case only, e.g. defragging or deleting some big file.

I would also point out that the sdelete method only works when the area to be compacted is included in a guest filesystem. CloneVDI can also clean up unpartitioned areas of the disk, e.g. left behind after shrinking a partition.
mpack
Site Moderator
 
Posts: 30055
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: CloneVDI tool - Discussion & Support

Postby gb3 » 12. Jan 2015, 12:26

Hi.
I used CloneVDI in order to add space to my virtual disk, but I have a problem.
I installed Ubuntu 14.04 in the Virtual Machine with a VDI disk 8 GB wide.
Now I want to add 72 GB to this disk without reinstalling UBUNTU; with GParted I notice that I have a partition dev/sda 8GB wide, than a 500MB of Linux Swap.
With Virtual Box command line I resized my Virtual Box size to 80 GB, and now in VB setup I see my disk with 80GB, but only 8 GB allocated. In Gparted I have 72GB not allocated space.
So I tried to use Clone VDI in order to enlarge disk dimension, but after Clone_DVI.dvi creation, I can use only 8 GB

Any ideas?

Thanks
gb3
 
Posts: 2
Joined: 12. Jan 2015, 12:17

Re: CloneVDI tool - Discussion & Support

Postby mpack » 12. Jan 2015, 13:39

Those are all FAQ questions.

If you use snapshots then you must clone the most recent snapshot, not the base VDI. See the CloneVDI release notes for details.

After resizing the disk (by whatever means), you need to use GParted or similar to increase the main partition size to fill the disk.

CloneVDI can automatically increase the partition size for NTFS and FAT guest filesystems, but not Linux (EXTx). Hence the need to use GParted for those guests after resizing the disk.
mpack
Site Moderator
 
Posts: 30055
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: CloneVDI tool - Discussion & Support

Postby AnrDaemon » 13. Jan 2015, 12:22

gb3 wrote:Hi.
I used CloneVDI in order to add space to my virtual disk, but I have a problem.
I installed Ubuntu 14.04 in the Virtual Machine with a VDI disk 8 GB wide.
Now I want to add 72 GB to this disk without reinstalling UBUNTU; with GParted I notice that I have a partition dev/sda 8GB wide, than a 500MB of Linux Swap.
With Virtual Box command line I resized my Virtual Box size to 80 GB, and now in VB setup I see my disk with 80GB, but only 8 GB allocated. In Gparted I have 72GB not allocated space.
So I tried to use Clone VDI in order to enlarge disk dimension, but after Clone_DVI.dvi creation, I can use only 8 GB

Any ideas?

Thanks

1. Remove swap partition.
2. Use parted or fdisk (parted preferred, since fdisk can't deal with GPT) to enlarge data partition.
3. Use resize2fs to enlarge filesystem to partiton size.
4. Create a swap FILE, it'll help you with future resizes, if that comes.
All this is not a VirtualBox questions, you could find this info in any Linux FAQ.

P.S.
If I were you, I'd just add a second disk instead of enlarging your current one, and moved /home to it.
Much less hassle, and much more useful.
AnrDaemon
 
Posts: 109
Joined: 7. Feb 2010, 23:41
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Ubuntu Linux, Windows

Re: CloneVDI tool - Discussion & Support

Postby gb3 » 13. Jan 2015, 13:48

You are right about this.
Much less hassle, and much more useful.

I posted here my question because I tought it was a Virtual Box trouble with Ubuntu.

Thank you very much
gb3
 
Posts: 2
Joined: 12. Jan 2015, 12:17

Re: CloneVDI tool - Discussion & Support

Postby AnrDaemon » 13. Jan 2015, 21:33

The simplest idea you can think about, is this: VM is a separate physical system.
Anything you want to do with it, you're doing with a physical system.
Yes, you're not reaching into it with a scrwewdriver to add or replace hardware, but whatever you do with it afterward, doesn't differ from if you were doing it to the real physical system.
Creating partitions, moving data between them - all is examples of the works of your operating system, and you are better off seeking the relevant info on profile forums.
Don't forget to clearly state that you are using VM, though, if you are not sure if that info is relevant to the cause. Even if it doesn't make a difference in most cases, some issues (i.e. video driver issues) need a special treatment.
AnrDaemon
 
Posts: 109
Joined: 7. Feb 2010, 23:41
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Ubuntu Linux, Windows

Respect for great tool

Postby Alexis Pokrovski » 16. Jan 2015, 12:29

Your soft was so useful that I've even registered at Oracle to express you my respect. Enormously useful.

THANK YOU VERY MUCH!

Update: Especially useful was the feature that clears out all unpartitioned space of the processed .vdi. So shrinking the partition (say, with gParted) and cloning the result works just as expected.
Alexis Pokrovski
 
Posts: 4
Joined: 16. Jan 2015, 12:26

Re: CloneVDI tool - Discussion & Support

Postby mpack » 16. Jan 2015, 12:48

Thanks very much for the positive feedback. :)
mpack
Site Moderator
 
Posts: 30055
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: CloneVDI tool - Discussion & Support

Postby Alexis Pokrovski » 16. Jan 2015, 16:57

Btw, I would suggest to add a couple of paragraphs to your top post that would address the two most common issues one uses CloneVDI for: shrinking and expanding .vdi files. Of course, all info required is in releasenotes.txt... but... anyway, these are very standard operations.

As for shrinking (I didn' try expansion yet), I would suggest step-by-step instruction
...............................................
How to decrease .vdi size if guest system uses only part of available space:
1. Make linked copy of the virtual machine used with source .vdi (using VirtualBoxManager; it creates .vbox files, NOT .vdi)
2. Resize the partition from within the guest machine (e.g. mount .iso with gparted)
3. Make CloneVDI copy of the resized snapshot .vdi with the "Compact drive" option checked
4. In the COPY of the machine remove old .vdi and attach the one from CloneVDI.
................................................

(By the way, steps 1 and 4 smoothly solve the issue from release notes "Instead go carefully through the settings, making absolutely sure that the old and new VMs have the same settings". I tried it only once, but copying the VM automatically copies all settings; anything other would be strange. )

All this is very simple, but maybe will save someone a couple of hours that I've lost on trial and error.

The order of steps supposes that first you make the copy of the machine, and only then clone the .vdi. Thus you can place the clone to the folder of the new VM.

The procedure is completely safe, since both old machine and .vdi remain untouched. Of course, one can attach cloned .vdi to
the old machine directly, but I prefer to waste extra 30 seconds to be on the safe side.
Alexis Pokrovski
 
Posts: 4
Joined: 16. Jan 2015, 12:26

Re: CloneVDI tool - Discussion & Support

Postby mpack » 16. Jan 2015, 18:55

If "linked copy" refers to a linked clone, then that isn't really a safe procedure. Creating a linked clone modifies the original VM, and the clone too expects to use a difference image.

At the time the release notes were written, VirtualBox had no facility to clone a VM, and only command line support for cloning a disk. I agree that some of the procedures in the release notes could be simplified nowadays.
mpack
Site Moderator
 
Posts: 30055
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: CloneVDI tool - Discussion & Support

Postby Alexis Pokrovski » 17. Jan 2015, 10:19

mpack wrote:If "linked copy" refers to a linked clone, then that isn't really a safe procedure. Creating a linked clone modifies the original VM, and the clone too expects to use a difference image.


Yes, it should've been "linked clone", sorry. It does create an extra snapshot in the source VM, but the previous snapshot remains unchanged. So we can discard the extra snapshot in the source VM. Or am I missing something?

Yes, the cloned machine expects to use the difference image. But step 4 of the suggested procedure substitutes the link to the source .vdi with the cloned .vdi (using official VBoxManager). Or maybe there are some hidden traps?
Alexis Pokrovski
 
Posts: 4
Joined: 16. Jan 2015, 12:26

Re: CloneVDI tool - Discussion & Support

Postby mpack » 17. Jan 2015, 12:22

I don't really want to get into a technical discussion of how snapshots work, as that would be off topic here.
mpack
Site Moderator
 
Posts: 30055
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: CloneVDI tool - Discussion & Support

Postby Alexis Pokrovski » 17. Jan 2015, 12:37

mpack wrote:I don't really want to get into a technical discussion of how snapshots work, as that would be off topic here.


Sure. Anyway many thanks for the great soft.
Alexis Pokrovski
 
Posts: 4
Joined: 16. Jan 2015, 12:26

Make a bootable external hdd from an archlinux.vdi

Postby herakles » 8. Feb 2015, 10:39

Hello everybody from Mauritius ~! :D

I am Caron from Mauritius. I run Mint 17 Quiana 64 bit and an Archlinux Vm. My aim is to convert my archlinux vdi into a bootable external hdd ( I use a laptop so I'll be using a laptop external hdd in a usb casing.)
I read that I had first to convert the .vdi into a .raw and then use dd command. Unfortunately I failed because the commands are not working- unable to find the .vdi on my system. :?
Can u help please ?

Thanks in advance. :)

Caron
herakles
 
Posts: 48
Joined: 8. Jan 2013, 09:53

Re: CloneVDI tool - Discussion & Support

Postby mpack » 8. Feb 2015, 11:35

Please post non-CloneVDI questions in an appropriate forum.
mpack
Site Moderator
 
Posts: 30055
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

PreviousNext

Return to VirtualBox on Windows Hosts

Who is online

Users browsing this forum: socratis and 28 guests