Page 2 of 2
Re: How do convert dynamic to static vdi?
Posted: 19. Aug 2010, 09:18
by BillG
The only way to ensure that disks are not fragmented is to never use them. If you actually use a disk, physical or virtual, fixed or dynamic,and change any of the data stored on it, it will fragment.
Re: How do convert dynamic to static vdi?
Posted: 20. Jun 2011, 10:05
by jmouriz
juanma@ramona:~/.VirtualBox/HardDisks$ VBoxManage clonehd dynamic.vdi static.vdi --format VDI --variant Fixed
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Clone hard disk created in format 'VDI'. UUID: aec9cc2f-5879-43c5-988f-d042f42513f3
juanma@ramona:~/.VirtualBox/HardDisks$ ls -l
total 18301932032
-rw------- 1 juanma juanma 10737463296 2011-06-20 04:53 static.vdi
-rw------- 1 juanma juanma 7564468736 2011-06-20 04:42 dynamic.vdi
Re: How do convert dynamic to static vdi?
Posted: 11. Jul 2011, 00:27
by Russell
I have a problem
Code: Select all
suse111desktop:/media/sd_bkp_1000G_3 # VBoxManage clonehd winxp2003_new.vdi winxp2003_new_static.vdi --format VDI --variant Fixed
VBoxManage: error: Cannot register the hard disk '/media/sd_bkp_1000G_3/winxp2003_new.vdi' {7e0eda8a-47c3-4956-9128-3b86de67d16c} because a hard disk '/root/.VirtualBox/HardDisks/winxp2003.vdi' with UUID {7e0eda8a-47c3-4956-9128-3b86de67d16c} already exists
VBoxManage: error: Details: code NS_ERROR_INVALID_ARG (0x80070057), component VirtualBox, interface IVirtualBox, callee nsISupports
Context: "OpenMedium(Bstr(pszFilenameOrUuid).raw(), enmDevType, AccessMode_ReadWrite, pMedium.asOutParam())" at line 209 of file VBoxManageDisk.cpp
suse111desktop:/media/sd_bkp_1000G_3 #
Re: How do convert dynamic to static vdi?
Posted: 11. Jul 2011, 06:14
by stefan.becker
Have you read and checked the error message?
Re: How do convert dynamic to static vdi?
Posted: 11. Jul 2011, 18:31
by Russell
stefan.becker wrote:Have you read and checked the error message?
I don't know how to check it.
What file should I read?
I don't know what it means.
TY
Re: How do convert dynamic to static vdi?
Posted: 11. Jul 2011, 20:21
by stefan.becker
... because a hard disk '/root/.VirtualBox/HardDisks/winxp2003.vdi' with UUID {...} already exists ...
Re: How do convert dynamic to static vdi?
Posted: 11. Jul 2011, 21:17
by Sasquatch
Just to point it out more noticeable:
VBoxManage clonehd winxp2003_new.vdi
VBoxManage: error: Cannot register the hard disk '/media/sd_bkp_1000G_3/winxp2003_new.vdi' because a hard disk '/root/.VirtualBox/HardDisks/winxp2003.vdi' already exists.
See the problem? You have a VDI with that UUID already, but it has a different name.
In addition, why are you running VB as root in the first place? If that's your default user, then why the hell are you running Linux as root all the time? You should run everything as normal user, unless you are too familiar with Windows and it's default to running things as admin all the time (and applications that nag you when you don't run them with admin privs). Linux is made to run as unprivileged user.
Re: How do convert dynamic to static vdi?
Posted: 11. Jul 2011, 21:33
by Russell
stefan.becker wrote:... because a hard disk '/root/.VirtualBox/HardDisks/winxp2003.vdi' with UUID {...} already exists ...
Now it is working
I had a virtual HD
/root/.VirtualBox/HardDisks/winxp2003.vdi
I simply moved it in
/media/sd_bkp_1000G_3/ and renamed it
winxp2003_new.vdi,
Left the directory
/root/.VirtualBox/HardDisks empty.
I solved the problem, removing/detaching
winxp2003.vdi in the vbox manager (gui)
Re: How do convert dynamic to static vdi?
Posted: 11. Jul 2011, 21:55
by Russell
Sasquatch wrote:
In addition, why are you running VB as root in the first place? If that's your default user, then why the hell are you running Linux as root all the time? You should run everything as normal user, unless you are too familiar with Windows and it's default to running things as admin all the time (and applications that nag you when you don't run them with admin privs). Linux is made to run as unprivileged user.
I usually use linux as root, since some years.
Re: How do convert dynamic to static vdi?
Posted: 11. Jul 2011, 22:39
by Sasquatch
Sounds harsh, but I hope you crash your system soon and learn that you should run as unprivileged user. Linux is not Windows, running as root all the time is very dangerous and even Linux veterans don't run as root unless they want to play Russian Roulette with their system.
Re: How do convert dynamic to static vdi?
Posted: 21. Jul 2011, 05:39
by paradxum
So this kinda drove me nuts. This is the first google result and doesn't really give an answer so:
Step one: Disconnect from any VM's it's connected to
VBoxManage modifyvm WinXP --hda none
Step two: Remove the disk from the media registry
VBoxManage closemedium disk /path/to/disk.vdi
Step three: Clone the Disk (with the clone set as a fixed type)
VBoxManage clonehd disk1.vdi disk1a.vdi --format VDI --variant Fixed
Step four: Connect the new disk to the VM (automagically registeres the disk)
VBoxManage modifyvm WinXP --hda /path/to/disk1a.vdi