Cloning Windows 7 VMs Using FOG

FOG has supported Windows 7 since 0.26, But what they don’t mention, is the exact steps you have to do if you want to clone an actual Windows 7 machine…

In this article I am going to test a number of possibilities regarding cloning Windows 7, albeit virtualized. In the future I will repeat this test on separate physical machines.

Test system

CentOS 5.5 in VirtualBox
FOG 0.29

Two Windows 7 Ultimate 64-bit VMs in VirtualBox

The first thing I am going to do, is to install Windows 7 on the first VM, this will be our prototype master. The second VM will be empty, with only a dummy partition so that one can use FOG to test out the images (see FOG And New Hard Drives).

NOTE: When I’m imaging computers, I always use the following image setting on FOG:
“Multiple Partition Image – All Disks (Not Resizable)”

Windows 7 does not support a single partition, because it reserves another hidden partition for system files. Therefore you can not use the Single Partition (NTFS Only, Resizable) option. You can try, but I suspect wierd things would happen then…

Just for fun, I am going to try just that on the end of this test. 🙂

The following scenarios will be tested:

  1. Uploading and deploying the image without entering any commands or running any tools.
  2. Uploading and deploying the image after entering the commands below in an elevated command prompt:
    bcdedit /set {bootmgr} device boot
    bcdedit /set {default} device boot
    bcdedit /set {default} osdevice boot
  3. Uploading and deploying the image after running FOGPrep.
  4. Repeating number 1, but with the Single Partition image type.
  5. Repeating number 3, but with the Single Partition image type.


Prototype VM:

  1. Worked perfectly. This will be the image that resets the VM.
  2. Windows started to load files, Startup Repair tried to automatically repair any issues. After that, it booted fine.
  3. Worked perfectly. A little slower at first startup, but that’s because FOGPrep.exe alters the registry settings that controls boot devices, I guess.
  4. Two points:
    A: Because the Single Partition type is destructive, I had to check that the original system didn’t take harm. After an automatic CHKDSK, the system booted without any more trouble.
    B: After deployment, Windows Boot Manager halted with Status: 0xc000000e.
  5. Same as 4.

Client VM:

  1. Worked perfectly, after manually partitioning the disk first. This, and the following results contradicts with previous attempts where the black screen of death appeared.
  2. Same as first VM.
  3. Same as first VM.
  4. Same as first VM.
  5. Same as first VM.


I think we can say that scenario 1 was the one that ultimately could show us a number of problems regarding FOG and Windows 7. However, that clearly was not the case.

When the system mysteriously booted without a hitch, there really was no point in continuing the test, but for science, I did.

I wonder if there are some kind of hidden differences between Virtual Machines and physical machines. Nonetheless, I will have to repeat this test with the appropriate equipment in the future.

Scenario 4 was an interesting one, using Single Partition while Windows 7 actually has one extra hidden partition for system files. As expected, this led to a complete halt for the boot manager.

Scenario 5 confirmed my original suspicion of that Windows 7 needs its hidden system reserved partition even though the system is prepped. In turn, this means that the drive in which one is imaging to needs to be at least the size of the old one.

Final Conclusion: No resizing is supported (so far) when FOG is used to clone Windows 7. One must use Multiple Partition Image and run FOGPrep* prior to uploading.

We’ll see if things repeat themselves when I do this testing on real physical equipment!

*All in all, one would certainly suggest running FOGPrep before upload in any case!

This entry was posted in FOG, Linux and tagged , , , , , , , , , . Bookmark the permalink.

3 Responses to Cloning Windows 7 VMs Using FOG

  1. Mark says:

    Thanks for this test… I’m new to Fog and have just begun experimenting with cloning Windows 7 machines. The documentation on Fog is a little sparse at times, but it’s an awesome tool.

  2. Ian says:

    According to their wiki, you can do the single partition resize, but fogprep is critical and must be run before sysprep. If the machine is rebooted, it needs running again. I

  3. andrew says:

    MAKE SURE TO SET YOUR VM TO IDE HARD DISK OR FOG WONT UPLOAD IT, I had that problem as I made it with scuzzi!

Leave a Reply

Your email address will not be published. Required fields are marked *