Backing up and recovering a VM

Discussions about using Windows guests in VirtualBox.

Re: Backing up and recovering a VM

Postby kees0_15 » 3. Sep 2019, 16:24

because just before I hastly "killed" my running VM., it reported "disk full .."or something alike: "make some room.."
Mpack was right: not closed, but killed. He advised read "How to resize a Virtual Drive" -> so I did.

Also started Gparted to see was is left. It showed /dev/sdb1 size: 300 GiB used: 286 GiB left: 13 GiB (rounded) but Nemo showed 45 KB !!

the directory at /home/kees/../my-vm occupies about 90 GiB. Because I cannot reach my machine through the Oracle VM VirtualBox Manager, shoud I use the VboxManager through the commandline?

Also using Gparted to enlage the my first partition is risky:

1. need to shrink partition /dev/sdb5 (space available: say about 20 GiB)
2. move partiton /dev/sdb3 ( 75 GiB, part of a LVM!!)
3. enlarge /dev/sdb5 (with the same 20 GiB)

Maybe there is a way to register my vm again, skipping the last snapshot? (from there -> clone ??)

something in my mind says "ït there; just find it"

Kees :?
kees0_15
 
Posts: 4
Joined: 30. Aug 2019, 22:47
Primary OS: Ubuntu 8.04
VBox Version: OSE Debian
Guest OSses: XP WIN10 MINT19

Re: Backing up and recovering a VM

Postby mpack » 3. Sep 2019, 16:32

kees0_15 wrote:Also using Gparted to enlage the my first partition is risky:

Not really. Just make a backup of the VM folder before you start.

Did you overcome the problem with the corrupted .vbox file? Because nothing much can be done with your snapshots until you have a working control file.

Snapshots are not backups! Not in any sense of the word. Snapshots allow you to have convenient access to multiple alternate states of the guest OS, and that is all they do. They are of no help if you want to recover an earlier (working) state of the HOST, which is what you are trying to do here. What's worse the complexity of snapshots ensures that data loss on the host is more likely, because there are more files to damage and they must all be mutually consistent. A snapshot chain is like a patch chain. You have a base VDI, then the first (oldest) snapshot has data on how to patch the base to obtain the state #1. The second oldest snapshot contains data on how to patch state #1 to get state #2... and so on. If you zap an early state file then the entire chain is lost from that point onwards.

Incidentally, another reason not to use snapshots is that they can be huge. Each one can potentially grow to the full creation size of the hard disk, so a 30GB drive plus 10 snapshots could potentially grow to 330GB, and all of it has to be online.

One thing you can try is to identify the newest snapshot and attempt to clone it with CloneVDI. This is a Win32 app, but it also runs under Wine on Linux hosts. Note that you clone the snapshot, not the base. Whichever snapshot you pick, CloneVDI works out the chain back to the base VDI and creates a merged clone, so it's up to you to find the newest snapshot CloneVDI will accept. CloneVDI can also resize the virtual disk for you. You must then mount that clone in a new VDI, you cannot replace a snapshot chain with a merged clone.
mpack
Site Moderator
 
Posts: 29949
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Backing up and recovering a VM

Postby kees0_15 » 3. Sep 2019, 21:15

thanks!

I will work that out and report back my result. (will take some time).

And no, de three *.vdi files in my VM-folder do not respond for now.

let us see if CloneVDI will be helpfull -> I give it a try on a second (physical) machine on the homenetwork (linus host with a clean XP guest)

wish me luck,

Kees :D
kees0_15
 
Posts: 4
Joined: 30. Aug 2019, 22:47
Primary OS: Ubuntu 8.04
VBox Version: OSE Debian
Guest OSses: XP WIN10 MINT19

Re: Backing up and recovering a VM

Postby mpack » 4. Sep 2019, 09:56

Well if you're going to try CloneVDI on a second machine then make sure not to forget the base VDI. Best is to put all VDIs (base plus all snapshots) into one folder.
mpack
Site Moderator
 
Posts: 29949
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Previous

Return to Windows Guests

Who is online

Users browsing this forum: No registered users and 9 guests