I had a virtualbox (4.1.18) .vdi file that was ubuntu server (12.04) running on windows server 2008. I used vboxmanage clonehd [path to vdi] ouput.img --format RAW to clone the drive then used a live cd to perform a dd if=[path to output.img] of=/dev/sda. When I finished I knew the nics would not be recognized so I deleted /etc/udev/rules.d/70-persistent-net.rules rebooted and all seemed fine. By fine I mean the now physical machine booted allowed me to log into both the console and putty into it. It had the right static ip, correct hostname, Apache was running. Time for a frosty beverage of your choice right?? Well... I had a set of web scripts in the /home/[user]/www directory. They are gone. So far what I have found is that the symbolic link that was sitting at /var/www is gone and the aforementioned directory does not exist. I am thinking this is something simple I missed but what? When you clone the .vdi file that is like cloning a hard drive. Those files did not sit on a network share and all the other custom configuration I did to the ubuntu server came across fine. So, what happened??
Signed,
Confused admin in Austin
missing files after vboxmange clonehd
-
mpack
- Site Moderator
- Posts: 39134
- Joined: 4. Sep 2008, 17:09
- Primary OS: MS Windows 10
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Mostly XP
Re: missing files after vboxmange clonehd
Most likely you cloned the wrong VDI. Most likely your VM uses snapshots and you cloned only the base VDI; you should have cloned the current state instead.robinls wrote:So, what happened?
I also wonder why you didn't just use the Machine|Clone.. feature to clone the entire VM, rather than cloning a disk.
Re: missing files after vboxmange clonehd
mpack that was it, definately a doh moment, thanks for the help! 
solved - Re: missing files after vboxmange clonehd
mpake Thanks so much for the reply. That is exactly what happened... doh! And as far as using the clone machine, that is what I did to merge the snapshots, from that point I used the vboxmanage clonehd, since I knew how to supply the --format RAW switch to make an .img file. I did not see how to mark this thread as solved but it is. Thanks again, Robin