Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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,

share|improve this question

3 Answers 3

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

share|improve this answer
    
I don't believe that ESXRanger (or vRanger Pro as it is known now) supports VirtualBox –  Kevin Kuphal Jul 27 '09 at 20:43

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
share|improve this answer

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.