Page 1 of 1
several copy of same machine
Posted: 29. Nov 2010, 11:04
by upaco
Hi!
I am new to vm and virtualbox, so this might come of as a easy question for you.
I have just installed VirtualBox (3.2.10) on my Windows 7 computer. I have installed a windows xp pro guest virtual machine. (just starting to try the product out).
I have taken two snapshots so far, 1 when the win xp OS is installed with the latest service pack and patches and, 1 when it is a member of the domain.
I am about to do a sysprep on the machine and take a third snapshot.
Now I would like to take the sysprep version and send to a work buddy of mine so that he quickly can set up his vm test machine.
I also would like to send the first snapshot version to another work buddy who needs a clean machine (before domain and gpo restrictions are put on).
Can one do this and how?
all help is appretiated
Paco Serveras
Re: several copy of same machine
Posted: 29. Nov 2010, 11:46
by Sasquatch
It's difficult to nearly impossible to clone a VDI that has snapshots, especially if you want to create clones from intermediate snapshots. One thing you can try is to use Mpacks CloneVDI tool (see Windows Hosts) to create a clone of the last state. Then with the command line VBoxManage, you can try to clone the base VDI of the VM, where it has all the patches but no domain membership. To use the command line, you open a command prompt window, navigate to the VB install directory and run VBoxManage clonehd <full path of base VDI> <full path of new file>.
Good luck. But keep in mind, this might not work.
Re: several copy of same machine
Posted: 29. Nov 2010, 11:55
by upaco
Hi and thank you for a quick reply.
Is there an easy way to do a copy without the snapshot?
I could reinstall the vm guest, take a copy. Install everything that should be there and run a sysprep and take a new copy to send out and then install it for myself with domain rights.
Re: several copy of same machine
Posted: 29. Nov 2010, 12:09
by Sasquatch
Ehm, well, what are the exact differences between the clean install and the sysprep, other than domain membership? If there is none, then you can just as well send the base to both of them. I just remembered that you should be able to just copy the base VDI and send it to the other users without doing anything special. However, VB might complain about missing snapshots for the base VDI because of the original snapshots being hooked up to it. There are hooks made in the base when you create a snapshot.
Re: several copy of same machine
Posted: 29. Nov 2010, 12:16
by upaco
The clean installation is just the os and sp, the one I am doing sysprep on has a little more applications etc. installed on it.
But I will try and copy the base vdi to another machine and see what it says.
Else if I do a sysprep and then remove all the snapshots I should be able to just copy that vdi to someone else?
Re: several copy of same machine
Posted: 29. Nov 2010, 12:23
by Sasquatch
Yes, if you merge the snapshots into the base VDI, you can safely send it to someone else. But Mpacks tool allows you to clone a VDI with snapshots into a base VDI ready for sending, without breaking your snapshots.
Re: several copy of same machine
Posted: 29. Nov 2010, 16:27
by upaco
Sasquatch wrote:One thing you can try is to use Mpacks CloneVDI tool (see Windows Hosts) to create a clone of the last state.
I just don't get it, starting to feel dumb.
I downloaded the Mpack Clonedvi and ran it. I can choose the .VirtualBox\HardDisks\VM002.vdi
but not the .VirtualBox\Machines\VM002\Snapshots\{6c03be19-dfb2-4978-bd87-a31a5ebb96ad}.vdi file.
So the clone I am getting out is the same base os+sp that I get when just copying it.
Am I not to get the vdi with the latest snapshot in here or is the latest snapshot added with the vboxmanage?
Re: several copy of same machine
Posted: 29. Nov 2010, 17:07
by Sasquatch
When you select the base VDI, you get the base VDI clone. When you select a snapshot, you get a single VDI with the snapshot data in it as if you merged the two. The full working of the tool is in his usage document and the topic itself.
Re: several copy of same machine
Posted: 30. Nov 2010, 14:45
by upaco
Which version of CloneVDI are you using? I am running v.2.03 and I cannot pick a snapshot to make a clone of.
I only get the error msg. 'source is a difference image...'.
Also found a detailed description of clonevdi, and it also wants you to merge all the snapshots with the base vdi before cloning.
If you know of a version or way to clone the base and snapshot together please direct me to it.
Thank you
Re: several copy of same machine
Posted: 30. Nov 2010, 21:00
by Sasquatch
I don't use CloneVDI. If you have some questions with the latest version, then ask in the discussion topic. Mpack will reply once he reads it.
Re: several copy of same machine
Posted: 6. Dec 2010, 13:41
by mpack
upaco wrote:Which version of CloneVDI are you using? I am running v.2.03 and I cannot pick a snapshot to make a clone of.
v2.03 is the latest version, and it supports cloning of snapshots. You would only get the validation error you mention if the tool was unable to resolve the chain of links back to the base VDI - this chain is required in order that CloneVDI can access all of the data necessary for a merged clone.
Background: each VDI header has a UUID to identify itself, and another UUID to identify the parent (in non-snapshot VDIs the parent UUID is 0). In order to turn the parent-UUID into a filename I have to look up the UUID in the VirtualBox media registry (in VirtualBox.xml). So if you've messed up the media registry, or you moved or renamed the files then that step will fail, and you'll get that error message. As a last resort you can create your own media registry - see the CloneVDI release notes for a description of CloneVDI_Media.xml.
upaco wrote:Also found a detailed description of clonevdi, and it also wants you to merge all the snapshots with the base vdi before cloning.
I think I know the tutorial you mean. It's wrong. It was wrong at the time of writing, I said so to the author, but he never corrected it. In his defence the procedure he outlines should work, it's just isn't necessary, and that one sentence we're talking about - is just plain wrong. The CloneVDI release notes document is the definitive guide as to what CloneVDI can and can't do.
Re: several copy of same machine
Posted: 29. Jun 2012, 17:43
by rogerdpack
Since google led me here,
http://superuser.com/questions/22671/ho ... pshot?rq=1 may have an idea or 2 for you.
Re: several copy of same machine
Posted: 29. Jun 2012, 18:30
by mpack
That external discussion seems quite worthless to me.
The easiest, current, way to clone a VM, with snapshots or without, whether you want to keep the snapshots or not, is to use the built in "Clone" feature (available since v4.1.0). It easily handles all of these scenarios.