2

Is it possible to backup a VM running with VirtualBox?

"vboxmanage export" requires exclusive access to the VM.

I know Hyper-V can backup running instances of VM, I was just wondering if it can be done with VirtualBox too.

Thanks,

3 Answers 3

2

Here is a bash script that I use. It can backup a running VM, but it shuts it down during the backup. You can then fire it up again. I don't think backing up a VM while it's running is possible.

The other caveat is that you need to manually merge any snapshots for this to work.

#!/bin/bash

#from `VBoxManage list vms |grep "^\(Name\|UUID\)"
VM=80e1cd84-0790-4c9f-a97e-97319c59431f

#from `VBoxManage list hdds |grep "^\(Location\|UUID\)"
HD=790acb86-703d-44e1-8f80-4e0229a2c054
VDI=WindowsXP.IE.vdi

# stop
VBoxManage controlvm $VM savestate

# backup (shrink happens automatically)
rm -f /home/chase/vms/backup/$VDI
VBoxManage clonehd $HD /home/chase/vms/backup/$VDI -remember
0

I believe you could take a snapshot of the VM and then back up the idle VDI and then remove the snapshot when your backup is complete.

Other methods would include using snapshot features of your storage system (LVM, etc) in order to capture an idle VDI and then backup from the storage snapshot.

-1

VizionCore's ESXRanger app. (We use it; we don't sell it.)

1
  • I don't believe that ESXRanger (or vRanger Pro as it is known now) supports VirtualBox Jul 27, 2009 at 20:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .