1. Clone the hard disk
To clone the hard disk open VirtualBox and right click on a machine, you want to clone
2. Alter the hard disk identifiers
Having cloned the virtual disk image, i thought i was ready to roll. But on startup i encountered the following problem:

Apparently part of the UUID of the virtual disk image is used to identify the hard disk on startup. We have to change these references to their appropriate new ids.
2a. Startup in rescue mode
To startup the openSUSE vm in rescue mode insert the iso file you used for installation in the CD Drive of the vm. Upon startup select the Rescue System option from the menu.

2b. Mount the hard disk
Login as root and mount the hard disk (on my system this was /dev/sda2, this could be different on your system) via the following command:
1 |
mount /dev/sda2 /mnt |
2c. Alter the identifiers
Now first find out what the new identifier of the hard disks should be. Issue the following command
1 |
hdparm -i /dev/sda |
Note the identifier called SerialNo. This is the one you need. On my system it was VBa79c17fb-f28bb7c1.
Now there are 2 files you need to alter. First edit the file /mnt/etc/fstab and alter all the identifiers between /dev/disk/by-id/ata-VBOX_HARDDISK_ and -partx with the new identifier.
Next make corresponding changes to the file /mnt/boot/grub/menu.lst.
After this you can reboot the system
1 |
shutdown now -r |
3. Repair your network settings
If you made no typos, openSUSE should start up with no problems. There’s one piece of configuration to do though. The clone has messed up the network configuration. This can be easily repaired via the YaST GUI tool. Open it and select Network Devices > Network Settings. You should see 2 Ethernet Controllers. One of them is not configured. Configure this controller with default settings and delete the other one. Now your clone is ready for use.