Cannot use cloned VDI
-
pepe_gotera
- Posts: 37
- Joined: 6. Dec 2013, 21:56
Cannot use cloned VDI
Hi everybody!
I have several virtual machines with fixed size VDI disks which I need to resize. Following the instructions, firstly I need to clone them in order VBoxManage to create dynamic VDIs. After cloning my first disk, I try to use it with the .vbox file and it doesn't run. VB says nothing but researching by myself I deduce it's a problem with the "uuid". I have changed in the VirtualBox.XML the old uuid to the new uuid assigned by VBoxManage to the cloned VDI, but it doesn't work neither.
What do you think it is happening?
Thanks and regards!
I have several virtual machines with fixed size VDI disks which I need to resize. Following the instructions, firstly I need to clone them in order VBoxManage to create dynamic VDIs. After cloning my first disk, I try to use it with the .vbox file and it doesn't run. VB says nothing but researching by myself I deduce it's a problem with the "uuid". I have changed in the VirtualBox.XML the old uuid to the new uuid assigned by VBoxManage to the cloned VDI, but it doesn't work neither.
What do you think it is happening?
Thanks and regards!
-
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: Cannot use cloned VDI
Create a new VM around the clone VDI. Or (if the old VM did not use snapshots), use the Storage panel in the guest settings to disconnect the old drive and mount the new one.
For best results, copy the VDI into the VM folder before connecting to the VM. That ensures you follow the convention that all VM related files can be found in the same folder.
For best results, copy the VDI into the VM folder before connecting to the VM. That ensures you follow the convention that all VM related files can be found in the same folder.
-
pepe_gotera
- Posts: 37
- Joined: 6. Dec 2013, 21:56
Re: Cannot use cloned VDI
Thank you.mpack wrote:Create a new VM around the clone VDI. Or (if the old VM did not use snapshots), use the Storage panel in the guest settings to disconnect the old drive and mount the new one.
For best results, copy the VDI into the VM folder before connecting to the VM. That ensures you follow the convention that all VM related files can be found in the same folder.
I did it but two strange things happened:
1. Cloned VDI is so much smaller (from 18GB to 11GB), but if I start the virtual machine and look the properties of the hard disk, it tells me 18GB.
2. Cloned VDI does not save its state.
Are both normal?
Thanks!
-
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: Cannot use cloned VDI
It's normal for a disk to get smaller during cloning if it contained lots of zero sectors or you selected "compact", or especially if you converted from fixed size to dynamic.
As for "Cloned VDI does not save it's state", I'm not sure what that means. A VDI doesn't have a state - it's just a container. I assume you understand the distinction between cloning a VDI and cloning a VM?
As for "Cloned VDI does not save it's state", I'm not sure what that means. A VDI doesn't have a state - it's just a container. I assume you understand the distinction between cloning a VDI and cloning a VM?
-
pepe_gotera
- Posts: 37
- Joined: 6. Dec 2013, 21:56
Re: Cannot use cloned VDI
Thank you!mpack wrote:It's normal for a disk to get smaller during cloning if it contained lots of zero sectors or you selected "compact", or especially if you converted from fixed size to dynamic.
As for "Cloned VDI does not save it's state", I'm not sure what that means. A VDI doesn't have a state - it's just a container. I assume you understand the distinction between cloning a VDI and cloning a VM?
I'm not an expert in virtual machines. I understand now what you mean (the difference between cloning a VM and cloning a VDI).
Talking about the first problem... why if the cloned VDI is now 11GB sized, the disk's properties in Windows once the machine has been started, tells me 18GB? Sould not tell it 11GB?
In the other hand, is it possible to resize a VDI file with any tool or similar? My goal is to resize the VDI used in my VM and use it again as if it had not been resized (I don't want to restart the VM, I want to use it saved as usual).
Regards!!!
-
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: Cannot use cloned VDI
The capacity of a disk (reported by the guest) is not changed by compaction. The only thing that compaction changes is how much space the file occupies on the host. With dynamically allocated disks the host disk space is allocated on demand (when the guest writes to new areas of the disk. In fixed disks it's all allocated up front, even if the guest will never need it.
It might be worth your while to read up on disk types in the user manual.
It might be worth your while to read up on disk types in the user manual.
-
pepe_gotera
- Posts: 37
- Joined: 6. Dec 2013, 21:56
Re: Cannot use cloned VDI
So maybe the solution is firstly convert the statics disks into dynamic, isn't it? Is it possible?mpack wrote:The capacity of a disk (reported by the guest) is not changed by compaction. The only thing that compaction changes is how much space the file occupies on the host. With dynamically allocated disks the host disk space is allocated on demand (when the guest writes to new areas of the disk. In fixed disks it's all allocated up front, even if the guest will never need it.
It might be worth your while to read up on disk types in the user manual.
-
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: Cannot use cloned VDI
You've lost me. The solution to what? Your second post implied that you had solved all problems and only needed to understand the effect of compaction. If the drive was successfully compacted then it's already in dynamic format since you can't compact fixed size drives.
-
pepe_gotera
- Posts: 37
- Joined: 6. Dec 2013, 21:56
Re: Cannot use cloned VDI
Well, what I meant is to resize (but not by cloning it) the VDI machine in order to it shows the new real new size. Is there any tool to do it? I think that it cannot be done by using VirtualBox tools...mpack wrote:You've lost me. The solution to what? Your second post implied that you had solved all problems and only needed to understand the effect of compaction. If the drive was successfully compacted then it's already in dynamic format since you can't compact fixed size drives.
Thanks!
-
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: Cannot use cloned VDI
You should probably read the tutorial: Howto: Resize a Virtual Drive. Read the whole thing.
-
pepe_gotera
- Posts: 37
- Joined: 6. Dec 2013, 21:56
Re: Cannot use cloned VDI
mpack wrote:You should probably read the tutorial: Howto: Resize a Virtual Drive. Read the whole thing.
I have asked about any independent tool or something like that. I already knew it does not work with snapshots nor fixed drives by using the original tools...First resizing does not work if the guest has snapshots nor will it work on Fixed drives.
In the other hand, is there any way to see the real size of the disk in the guest OS after having cloned the VDI file?
Thanks!
-
Perryg
- Site Moderator
- Posts: 34369
- Joined: 6. Sep 2008, 22:55
- Primary OS: Linux other
- VBox Version: OSE self-compiled
- Guest OSses: *NIX
Re: Cannot use cloned VDI
Did you read the link at all? It tells you in step two what you use.
-
pepe_gotera
- Posts: 37
- Joined: 6. Dec 2013, 21:56
Re: Cannot use cloned VDI
Yes, but the new size of my VDI disk is smaller than the original one instead of bigger what these instructions are talking about.Perryg wrote:Did you read the link at all? It tells you in step two what you use.
Do the instructions work also for new smaller disks?
Thanks!
-
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: Cannot use cloned VDI
Your disk capacity is not smaller, only the host file size is smaller.
You need to understand the difference between what is being simulated (a drive of a particular size), and the means of that simulation (a file on the host).
You need to understand the difference between what is being simulated (a drive of a particular size), and the means of that simulation (a file on the host).
-
pepe_gotera
- Posts: 37
- Joined: 6. Dec 2013, 21:56
Re: Cannot use cloned VDI
I understand it. Whis would be the form of fixing it?mpack wrote:Your disk capacity is not smaller, only the host file size is smaller.
You need to understand the difference between what is being simulated (a drive of a particular size), and the means of that simulation (a file on the host).
Regards!