How to backup virtual machine and its saved state

Discussions related to using VirtualBox on Linux hosts.
Post Reply
morphex
Posts: 2
Joined: 6. Sep 2009, 01:18
Primary OS: Ubuntu other
VBox Version: OSE Debian
Guest OSses: XP

How to backup virtual machine and its saved state

Post by morphex »

I currently have VirtualBox 3.0.4 installed on a Kubuntu 9.04 amd64 system. I'm using a .vhd file of WIndows XP and each time I close the virtual machine I save its state. I would like to backup the virtual XP system so that I can install it on a different pc. However I want to make sure that when I import the virtual machine on my other pc that it will include the saved state. Is this possible and if so, how can I backup the virtual XP system and saved state and then import them on a different pc?
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: How to backup virtual machine and its saved state

Post by Perryg »

Maybe you should explain what you mean by save its state. Are you talking about snap shots or that you really have not powered down the unit and just saved the state.
If you are talking about snap shots then you have a real problem. If it is the latter then all you need to do is power down the VM and it will copy all of the information to the VDI file. Then you can either export it, or clone it, or simply copy it to another PC. Remember to write down the settings including the MAC address of the guest.
morphex
Posts: 2
Joined: 6. Sep 2009, 01:18
Primary OS: Ubuntu other
VBox Version: OSE Debian
Guest OSses: XP

Re: How to backup virtual machine and its saved state

Post by morphex »

When I shutdown the virtual machine I go to Machine > Close > Save the machine state > OK. I have a .sav file in the .VirtualBox Snapshots folder so I'm assuming that everytime I close down the machine it overwrites that file, right? My goal is to backup the virtual machine in a way that will preserve the saved state so that I can import it on my other pc. Will the saved state be copied into the export file if I use the "Export Appliance" feature?
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: How to backup virtual machine and its saved state

Post by Perryg »

It does over write the file each time you tell it to save the state, but it will not be included in an export.
If you shut down the guest then the saved state will be written to the VDI/VHD file.
A saved state in VBox is kind of like hibernate.
Post Reply