Can I backup a running virtualbox Virtual machine?
I am currently running a time consuming python script on a virtual machine(It has been running for ~95 hours at the moment). I have no idea how long it will take to complete and am running it on a VM because of the possibility to save the state and reboot my laptop (In case of mandatory updates). However, I just received an e-mail that I have to turn my laptop in to get an upgrade from windows 8 to windows 10 tomorrow.
Because the script has been running for quite some time now I don't want to start all over again the day after tomorrow. Is it possible to back-up the VM including the current state and get it up and running again when my machine has been updated? And if so what is the best way to do this?
Some extra information:
-I am running windows 8 on the host system
-The VM is running Xubuntu 16.04
Thanks in advance!
Edit: I'm not upgrading from windows 8 to 10 with the free upgrade, i will receive a clean windows 10 installation because of company policy.
This is not possible.
Yes, you can save the state of the VM to disk and resume it later, but the upgrade to windows 10 will break it. I speak out of experience.
Technically speaking it should be possible to save and resume, but pratically I found out that it won't.
What I would do in your case would be to click on "Save the machine state" in VirtualBox and then simply copy the whole VM folder to your backup drive. This way, when your laptop is returned to you with Windows 10, you can simply copy the VM folder back again to your VirtualBox VMs
folder and then click on the yourVMName.vbox
file to import the VM back into VirtualBox.
I have done this to move VMs to/from different computers and it's worked fine.
I am not sure about the whole system & virtual box change effect on your saved (cloned) VM. Honestly, I do not think it should break anything, that is what export is for, right?
But to answer the question that I came here with: Can I backup a running virtualbox Virtual machine?
The short answer is no. But there is a walk-around.
What you can do is use VirtualBox Snapshot. During snapshotting VBox freezes your system for a while, but it saves its current state. This might be enough if you do not want to move the machine.
I wanted to have a backup of this state. So now there is also a clone option. You can't clone a running VM. But you can clone a Snapshot of running VM :-)
So to have a copy of your machine:
Create a Snapshot
vboxmanage snapshot <uuid|vmname> take <snap-name>
Clone the Snapshot
vboxmanage clonevm <uuid|vmname> --snapshot <snap-name>
Docs: https://www.virtualbox.org/manual/ch08.html