Page 1 of 2
windows xp guest and ext usb HD
Posted: 13. Jun 2011, 16:10
by eyeman
Hi All
I have an XP VM running as a guest on my MacBookPro. The HD on the Mac is 100Gb and is the free disc space is always running low. When I created the Vbox VM, I migrated the machine from Parallels via VMWare. On my Mac, there is a 64gb directory of VMDK files, which obviously hogs most of the Mac HD. Is there a safe way of migrating these files to a USB ext HD and still run the XP guest? If so, how would this best be done, and what other files need to be moved to the ext HD, and to which location?
Thanks in advance for any help you can give this noob to VBox
Todd
Re: windows xp guest and ext usb HD
Posted: 13. Jun 2011, 16:36
by mpack
"Mac hosts" would be a better place to ask this question, because a detailed answer to your question is most useful for Mac host users.
It's easy enough to move your disks onto a USB drive. Is that safe and reliable? Beats me, I'm not a Mac host user. On a Windows host I would consider it unreliable because Windows addresses drives using drive letters, which are not a persistent address label (i.e. Windows has a nasty habit of shuffling drive letters when it feels like it).
I should also point out the two main downsides of running a VM located on a removable USB drive. First is that disk performance will be terrible, second is that there's a possibility that you'll one day absent mindedly yank the drive from the PC while the VM is still running, certainly causing some disk corruption, perhaps even serious corruption.
ps. One way to get a lot of disk space back is to stop using snapshots, and merge any existing snapshots into a single file. From now on if you want to create a restore point then you just make a copy of your VMDK file to the external drive. This is something you can do without a performance penalty - quite the contrary in fact.
Re: windows xp guest and ext usb HD
Posted: 13. Jun 2011, 16:43
by eyeman
Hi and thanks for the very fast reply. I have posted the same query on the Mac hosts forum.
How would I merge the snapshots into a single file? I assume that all of the constituent .vmdk files are snaphots...
Todd
Re: windows xp guest and ext usb HD
Posted: 13. Jun 2011, 17:11
by mpack
eyeman wrote:How would I merge the snapshots into a single file? I assume that all of the constituent .vmdk files are snaphots...
In theory you just delete unwanted older snapshot states using the GUI. Each time you do this the GUI merges the deleted snapshot data into other states. Eventually you just have the one. Personally I don't like this because I have my doubts that this eradicates every last vestige of the use of snapshots. I would prefer to clone the most recent state - cloning definitely produces a stand alone VDI - then build a new VM around the clone. This takes a little more knowledge to do, on the other hand it should be quite safe since it leaves your old VM untouched until you have proven to yourself that the clone VM is working well.
Cloning is done using the "VBoxManage clonehd" command (see VBox user manual).
Re: windows xp guest and ext usb HD
Posted: 13. Jun 2011, 21:30
by eyeman
Hi
I am still relatively new to VM's...I have a directory of what I think are snapshots on my Mac's HD..they are labeled Windows XP-5-0-s001.vmdk through s033.vmdk and also Windows XP-5-0.vmdk, Windows XP-5.VMX and Windows XP-5.vmx, all created by migrating from Parallels to VMWare and then onto VBox. The setup for the Windows XP guest that I am currently using has a SATA drive pointing to the Windows XP-5-0.vmdk file. It runs OK, but hogs the Mac's HD free space.
If I wanted to clone the VM, which of these files do I use?
Thanks for your patience and help
Todd
Re: windows xp guest and ext usb HD
Posted: 13. Jun 2011, 22:43
by mpack
I'm not a regular user of the VMDK format (and it's been a while since I studied it) so I can't be 100% sure, but I don't think you have snapshots there, I think what you actually have is a segmented VMDK. That is a VMDK image in which the disk has been split into segments called extents, typically 2GB in size - that's 2GB of virtual disk per segment, the actual size of the file depends on the segment type (fixed size would be exactly 2GB, flexible aka sparse/dynamic format stores only used sectors and hence is <=2GB). There would usually be a small control file with a .vmdk extension - this is actually a text file and if you look at it with notepad++ you'll find that it lists all of the extent file names, in order. If the small control file isn't there then the control info is embedded in the first extent, which is the .vmdk that doesn't have "-snnn" as part of the name.
Re: windows xp guest and ext usb HD
Posted: 14. Jun 2011, 00:01
by eyeman
Thanks for the explanation...that seems to fit.
In order to clone, do I run the command from Terminal in the Mac? Can you help me with the syntax, and which of the earlier-described files the command is applied to?
Thanks again for the help
PS I have read some posts describing a program called VDIClone, but it seems like it runs in XP, and my vmdk files are on my Mac...am I missing something?
Re: windows xp guest and ext usb HD
Posted: 14. Jun 2011, 11:01
by mpack
eyeman wrote:Thanks for the explanation...that seems to fit.
How well? Are your extent files exactly 2GB, or are they <=2GB? Which? If the former then cloning will create a sparse/dynamic version, which will be smaller. If it's already spare then there will not be much benefit from cloning. My original suggestion was cloning it order to stop using snapshots - if you weren't using snapshots then this suggestion doesn't help either.
eyeman wrote:In order to clone, do I run the command from Terminal in the Mac?
I imagine so, though I'm not a Mac user. The exact syntax of "VBoxManage clonehd" is given in the VBox user manual. The command would be applied to the main .vmdk file, the same name used to identify this disk in the VBox media registry. If I was you I would allow the clone to be in VDI format, as it's better supported in VBox.
eyeman wrote:PS I have read some posts describing a program called VDIClone, but it seems like it runs in XP, and my vmdk files are on my Mac...am I missing something?
It's called CloneVDI, and yes it was designed for Windows hosts, though it works just as well under Wine on Linux and Mac. I'm not sure what you think you may be missing? CloneVDI would certainly be easier to use, and you would probably benefit from the compaction feature too. There are some notes
here on getting CloneVDI to work on a Mac under Wine.
Re: windows xp guest and ext usb HD
Posted: 14. Jun 2011, 15:02
by eyeman
Hi
The files are not exactly 2Gb..most are over, and a few are under...but none are 2gb. All together they take up 56 GB (out of a 100Gb int HD) of hd space, which is why I want to move them over to an external HD. I am not sure what snapshots are...I just did whatever I could to get the VM working and havent paid much attention to the workings of Vbox otherwise
On the Mac host forum, one of the experts suggested I could move all of the vmdk files over to the ext HD and point the setup in a new VM to them. Of course, what he didnt tell me was that I would get an error msg saying that the UUID was already in use.
So, I am realizing I need to clone the vmdk to vdi, and that the process should give me a new UUID. I will read the link you sent me on using VDI clone in mac..thanks. Of all of the vdmk extents, which is the one that VDI clone looks for?
Thanks again for your interest
Todd
Re: windows xp guest and ext usb HD
Posted: 14. Jun 2011, 16:02
by eyeman
Mpack:
Here is my virtualbox.xml file (I assume this is the same thing as the Vbox Media Registry):
Hopefully this will help identify the correct file to input
Todd
Re: windows xp guest and ext usb HD
Posted: 14. Jun 2011, 16:11
by mpack
You can get around the UUID conflict by releasing then removing the old location from the media registry first, then re-register from the new location. You will then have to re-attach the virtual disk to the VM, and disk performance will be terrible, as I mentioned previously.
None of the extent files will be larger than 2GB, that would defeat the purpose. However, a binary 2GB is 2048MB, not 2000000000 bytes.
You view the media registry in File | VirtualBox Media Manager. The data displayed there comes from all your .vbox VM settings files. An older VirtualBox.xml can sometimes also contain a legacy media registry, but your's doesn't.
I have become convinced that what you most need to do is compact your virtual disk. CloneVDI would be easiest for that, else a search should net you instructions for doing it the hard way.
Re: windows xp guest and ext usb HD
Posted: 14. Jun 2011, 16:30
by eyeman
Mpack
Thanks for your patience with me..this is all new to me.
I followed your link to using Wine to run CloneVDI, and followed the instructions. One last question...the Winebottler seemed to install the CloneVDI successfully, according to the msg that popped up. How do I find the icon to run CloneVD now...that isn't clear to me from the instructions
Thanks
Todd
Re: windows xp guest and ext usb HD
Posted: 14. Jun 2011, 17:31
by mpack
eyeman wrote:How do I find the icon to run CloneVD now...that isn't clear to me from the instructions
Beats me, I am not a Mac user. That would be a question for the Mac hosts forum I imagine - the existing thread is
here.
Re: windows xp guest and ext usb HD
Posted: 14. Jun 2011, 21:03
by eyeman
Mpack
You forced me to search, but I found the CloneDVD in one of your postings, the version that reads .vmdk files
Is there a way I can load the output directly to an external HD? My HD's don't show up in the search window
Todd
Re: windows xp guest and ext usb HD
Posted: 14. Jun 2011, 21:22
by eyeman
Mpack
I persisted and found my ext HD under Volumes...CloneVDI is now processing.
I appreciate your help
Todd