I’ve been working through this issue too, let me summarize what worked for me.
I use VirtualBox to run openSuSE 13.1 and I needed to clone the machine. I wanted its folder self contained and as small as possible for backup purposes. When I used the standard procedure to clone, the resulting machine could not use its hard drives. It turns out there are some changes to make to openSuSE BEFORE cloning that will allow subsequently-generated clones to work.
It was difficult to find all the correct information in one place. Kudos to Ben for having it right and being articulate too. I highly recommend reading his brief piece if you want to understand what’s going on. http://www.gridshore.nl/2013/08/19/cloning-an-opensuse-12-3-virtual-machine-using-grub2-virtualbox-and-cryptfs/
Here’s the recipe.
I have a working VirtualBox with openSuSE 13.1 KDE. I make a snapshot, then do the following editing as root in the live VM. When the changes are made and confirmed I will clone the VM.
To start, run the VirtualBox openSuSE VM you will clone.
Create a snapshot.
Open a terminal as root and issue this command:# ls -l /root/dev/disk/by-id
The results included (for me) these lines with ata-VBOX_HARDDISK in them.lrwxrwxrwx 1 root root 9 Apr 1 18:33 ata-VBOX_HARDDISK_VBad0d9a6d-2d9f483f → …/…/sda
lrwxrwxrwx 1 root root 10 Apr 1 18:33 ata-VBOX_HARDDISK_VBad0d9a6d-2d9f483f-part1 → …/…/sda1
You will know they are the right entries when you edit the text files below and find the same long names there to be replaced.
Based on the above info I will replace long names with short, wherever they occur in several files./dev/disk/by-id/ata-…83f becomes /dev/sda
/dev/disk/by-id/ata-…83f-part1 becomes /dev/sda1
Modify these files using a text editor:/etc/fstab
/boot/grub2/device.map
/boot/grub2/grub.cfg
Make the changes, save the files, and reboot. If it reboots ok then you probably did it right.
Now this VM and its descendents may be cloned and their hard drives will work; this business only has to be done once.
There are two choices you should make when starting the cloning process:Check the option to “Reinitialize the MAC address of all network cards.”
You probably want to end up with one clean folder, so choose a Full clone.
The clone VMs you make after this process “just work”, disks and network and all, just like the clonee. HTH