I am running a LAMP (ubuntu) guest machine on a WinXP host.
I have set up a scheduled task executing the following command, so the guest machine starts up after each host boot.
VBoxManage startvm "Ubuntu_server" --type headless
But I have not an UPS so, when there is a power off both (host and guest) are badly shut down. Unfortunately, this happens frequently (at least 2 or 3 times a week). So, I have 2 questions:
1. I wonder how to periodically save the current status of the guest machine running a .BAT script (let's say, each hour). I am only interested in the last status (I mean, the "2 hours ago status" could be overwritten by the "1 hour ago status").
2. And then, I would like to modify the startvm command (at host boot) so the VM starts from that saved status
For question 1, I guessed snapshots should be the solution (they are supposed to let you save the status of a running machine, true?), but the command below is giving me an error. Anyway, I wouldn't know how to start from that saved status (question 2).
VBoxManage snapshot "Ubuntu_server" take "Ubuntu_server_status"
this was my result (also when using the GUI to take the snapshot):
Code: Select all
VirtualBox Command Line Management Interface Version 3.0.4
(C) 2005-2009 Sun Microsystems, Inc.
All rights reserved.
0%...10%...20%...30%...FAILED
Error: failed to take snapshot.
Error message: Hard disk 'E:\Documents and Settings\abu\.VirtualBox\HardDisks\VM-VB-ubuntu.vdi' is attached to a virtual machine with UUID {c4655d83-a6ab-4432-a86f-ac9895df0b51}.
No differencing hard disks based on it may be created until it is detached