2

I want to back up my entire system, with all programs and files that are currently installed on the VM. How can I do this?

If I lose my computer or something goes wrong with my operating system, I would like to have this security backup.

2 Answers 2

6

To backup a full VM in VirtualBox we only need to save your virtual hard drive that has the .vdi extension.

On Linux, the HD is usually in:

user_name/.VirtualBox/HardDisks/harddisk_name.vdi

Just copy this file and save it in some safe place.

To restore the backup, just select the .vdi file as the image's HD when creating a VM in VirtualBox.

3
  • +1 export command is really slow and unpractical when needing to backup large vms, yet everyone seems to be using it. Jul 1, 2021 at 19:53
  • Thanks. but will this recreate the MAC address of the network card attached to the VM?
    – BenKoshy
    Oct 20 at 8:59
  • As far as I know, Linux systems save this type of information in the file system. Oct 24 at 16:34
6

Export the VM...

vboxmanage export vmname -o vmname.ova

...and import...

vboxmanage import vmname
2
  • This method isn't practical for larger vms. It takes long to export. Instead one should just copy the VDI file as @Thiago Krempser pointed out. Jul 1, 2021 at 19:54
  • 1
    I presume that exporting can happen while the VM is running, while copying the VDI can only be done while the VM is off?
    – mwfearnley
    Nov 11, 2022 at 9:55

You must log in to answer this question.

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