HOME            INDEX


 Here are just a few observations about using VirtualBox on both a Linux, and Windows PC. Also a few notes about gzip and gunzip.

 Over the last week or so I have been having some fun experimenting with VirtualBox. VirtualBox is a piece of software that allows you to run virtual PCs, or "guest operating systems" on either a Linux, or Windows PC. It will also run on Apple machines, as well as Solaris computers as well, but I haven't tried that.

 No matter whether you run it under Linux, or Windows, the guest operating system can probably be anything that will run on a standard Intel based PC. That means you can run any version of Windows, or any Linux distribution (in theory) using VirtualBox. In practice some operating systems are more happy than others when running in a virtual environment. I have had Windows 2000, Windows Vista, Linux Mint 6, and others all running quite happily.

 Each guest operating system is installed on a virtual hard disk that is stored as a single file on the host operating system. One interesting thing about this is that once you have successfully got a working installation you can take a copy of the virtual hard disk and transfer it to a different computer. For instance, I installed Linux Mint 6 on my computer at home running Open Suse 11 as the host system, and took a copy of the virtual hard disk file to my work PC which runs Windows XP. With just a few settings to set the virtual hardware for the virtual machine, I succesfully booted up Linux Mint 6 on my work PC.

 There is a practical usage for running what is in effect a cloned machine, although I must admit that I was just playing for fun. However it could be useful to demonstrate something that you have tried at home to, say, a workmate.

 One very practical use of running a virtual machine is that you can keep a pristine copy of the virtual hard disk, and do all sort of potentially damaging things when running copies of the virtual hard disk. As a for instance, I think I may see what would really happen if I allowed a virus to infect a (virtual) Windows PC. Most of the stuff I have done where my machine could potentially be infected has been done using Linux machines for the last 9 or 10 years, and these machines are not affected by Windows viruses (which account for practically every virus going). Once my virtual machine is infected, or I have done something weird and wonderful that has made it inoperative (not very hard for a Windows machine) I can just delete the copy of the virtual disk, and start afresh with a fresh copy of the pristine virtual hard disk.

 There is one problem I found when it comes to transporting a virtual hard disk to another machine (and in particular to a machine outside of my own local area network - such as to my PC at work). That problem is the size of the file. For instance my virtual Windows Vista has a virtual hard disk file that is almost 10 GB in size. That's too big to burn to DVD, and too big to fit on my 8 GB USB flash drive. The answer it to compress the file. A lot of the virtual hard disk is filled with empty space, and many of the files it contains are very compressible. Unfortunately the biggest file size that Winzip appears to be able to handle if 4 GB. 7zip may do better, and WinRar may be able to handle large file sizes too.

( A quick look at the 7zip web site and found this :- Supporting files with sizes up to 16000000000 GB. WOW !!!)

 The solution I used was the Linux bash shell command gzip. This does a good job of compressing my 10 GB virtual Vista file down to a more manageable 4 GB. However there is a problem. In fact two of them. For reasons that I am unsure of, when I attempt to invoke this from Konqueror, the KDE desktop file manager, it fails. One reason for this is that it may be attempting to do the compression via a temporary directory that has insufficient space. The simple solution is to do it from the command line, but this has a problem too, but not a serious one. Invoking gzip Vista.vdi from the command line does a successful compression and yields a far smaller file called Vista.vdi.gz. The one problem, and I am unaware if there is a solution, is that it deletes the original file. Maybe this is why KDE tries to copy the file to a temporary directory first. My solution is to copy the compressed file to my big USB flash memory stick, and then invoke gunzip Vista.vdi.gz from the command line to restore the original file. It may not be very elegant, but it works, and that is the most important thing.