When finishing up at the laboratory I was researching at, I needed to take my PC setup with me to complete my thesis at home. As taking the hardware with me was not an option, I decided to use a Virtual Disk in combination with one of the freely available virtualization software packages (I'm using virtualbox https://virtualbox.org).
Installing a complete PC from scratch while retaining all software settings I made over the years was not really feasible, so I went with cloning the entire PC into a virtual disk. This retains the OS, all software with settings and also all data.

My setup

Luckily, I was able to setup my PC myself when I began working at the lab. This way, I was able to install my own copy of Windows 7 64bit, which prevented me running into any license problems later on. If you are using an enterprise version of windows, you cannot simply and legally change to a non-enterprise version and will need to authenticate with the KMS server one way or another. One possibility is to take your image on a laptop with you and connect to the work network to get the authenthication. This is, of course, not a permanent solution.

Making the image

The creation of the actual image is pretty straightforward. Install disk2vhd (v2.01) from Microsoft Systernals (https://docs.microsoft.com/en-us/sysinternals/downloads/disk2vhd) and start the program. Uncheck "Use Vhdx" to create a VHD image (VHDX is not supported by Virtualbox at time of writing). Select your partition to save, mine was C:\, select an output file, preferably on a differen drive, and click Create. Keep in mind that VHD supports only images up to 127 GB, so you better remove all clutter in advance, such as hiberfil.sys, old windows installs, unneccessary programs. The preinstalled Disk Cleanup utility does a good job on freeing some space.

Integrating the image into Virtualbox

After installing Virtualbox on you host system, create a new machine for your guest system. In that case, Windows 7 64bit. Leave all settings at default and when asked for a disk, select existing file and select your VHD file. Your system is now ready. For ease of use, right click your system and create a Desktop shortcut. Another important step is to install the Guest Additions, they will give a performance boost and allow Seamless Mode which will essentially remove the guest desktop background except the taskbar and displays all windows seamlessly on your host machine. Very comfortable.

Nächster Beitrag