Migrating Windows Physical Machine to VirtualBox

Background:

As more depending on iPad (now iPad mini), few tasks are to be done on my current notebook PC, Acer Aspire 1810Z running Windows 7 Home Premium.

Rebuild desktop PC, HP from previous CentOS 5 to OpenSuse, I want to have a virtual Windows for some special situations, e.g. web applications need to run on MS Internet Explorer. Actually, still most payment gateways connected to the Hong Kong Government’s agencies need IE to proceed the payment transactions even though some of them allow you to make booking reservation online with other browsers.

Choosing Oracle VirtualBox as the virtualization platform rather than OpenSuse’s preferred Xen and KVM tools because I used to running my virtualized guest OS’ on VirtualBox for quite some years. My CentOS guest has been running the main webserver Apache on VirtualBox deployed in my Mac Mini for 2 years.

Methodology for the migration is using Windows 7 built-in backup system utilities to backup the whole system to external disk, and made a ISO bootable file to be used as the virtual boot CD in VirtualBox.

Issues:

  1. Making VirtualBox to operating properly in OpenSuse was the 1st issue. After installation, only the root user could start it, but not other normal users. I run my desktop as normal user instead of root just for security reasons.
  2. Could not restore the Windows backup image to a new virtual disk with error stating that no valid disk is connected to the system. Actually, by inputing Windows command “DISKPART” followed by “LIST DISK”, the newly created disk was shown. Even though using Gparted utility to make partition table on the disk and format the disk to ntfs file system. All these did not work.
  3. After recovering from the backup image, still could not kick of the Windows VM. After seeing the Windows 7 logo, total black screen and nothing happened.

Solutions:

  1. Run VirtualBox as non-root user.
    1. Install VirtualBox from Oracle site rather than from OpenSuse software repository. Also install Oracle VirtualBox extension Pack.
    2. Change permission of /dev/vboxdrv to allow other users to access this driver.
  2. Select SATA controller to configure the virtual system disk to run Windows though transferring of files is fine using other types of storage controllers, say IDE. Configure a larger disk, say 160GB. Using a disk with small capacity say 40GB would cause the error mentioned above.
  3. Configure VM with 2 processors instead of 1.

Tricks:

  1. After installing VirtualBox from Oracle site, still some minor errors occur. Need to install/update some software in OpenSuse to clear the errors.
  2. Even though the windows image is small, say 30GB, but I guess the original disk being backup was 120GB, then the target disk should not be less than 120GB. In case no physical capacity for disk is available. Thin provisioning of disk by selecting dynamic disk space allocation in VirtualBox is good.
  3. I focused on changing the video RAM allocation for the VM and unchecking 3D, 2D acceleration. All these changes suggested on the web could NOT help for this scenario.

Config:

  • CPU E8400 dual-core 3GHz, with 4GB memory
  • OpenSuse 12.2 (x86_64)
  • VirtualBox 4.2.8 r83876, and VM configuration below:
    • Processor No =2
    • Memory = 1.5GB
    • 3D and 2D acceleration checked
  • Windows 7 Home Premium