Snapshots on running machine fail

Discussions related to using VirtualBox on Linux hosts.
Post Reply
k-h
Posts: 8
Joined: 20. Apr 2012, 12:41

Snapshots on running machine fail

Post by k-h »

I am running Version 5.2.12 r122591 (Qt5.6.1) on a kubuntu 16.04 machine and my client is an ubuntu 18.04 machine. When I try and take a snapshot of the running client it pauses, then gets to 96% done, then fails and aborts. I am left with a powered-off machine. Sometimes I get a message like: Failed to create a snapshot of the virtual machine. Result Code: NS_ERROR_ABORT (0x80004004).

This is very annoying although it is stably restarting from powered off each time, so far. I notice that even if I set the preferences to VirtualBox to run from a different default machine folder, it still creates a folder ~/VirtualBox VMs/machine-name/ and populates it.

How to fix the running snapshot fail?
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Snapshots on running machine fail

Post by socratis »

k-h wrote:I am running Version 5.2.12 r122591 (Qt5.6.1) on a kubuntu 16.04 machine
What's the output of:
  • VBoxManage -version
k-h wrote:even if I set the preferences to VirtualBox to run from a different default machine folder, it still creates a folder ~/VirtualBox VMs/machine-name/ and populates it
You'll need to change the VM settings as well, not just the program preferences.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
k-h
Posts: 8
Joined: 20. Apr 2012, 12:41

Re: Snapshots on running machine fail

Post by k-h »

$ VBoxManage -version
5.2.12r122591
You'll need to change the VM settings as well, not just the program preferences.
I haven't found that setting in the gui
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Snapshots on running machine fail

Post by socratis »

There are two places to set the default VM files location:
  • VirtualBox Preferences » General » Default Machine Folder. This involves VMs that are going to be created from now on, not existing VMs. For existing VMs, see "Moving a VM". After you move a VM, you should also check the following setting...
  • VM Settings » General » Advanced » Snapshots Folder.
Both of them assume that you haven't deviated from the defaults (keeping the VM files together) and you haven't moved things outside of VirtualBox, or assigned hard disks manually. If in doubt, right-click on the VM, "Show in <whatever>". ZIP and post that .vbox file.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
k-h
Posts: 8
Joined: 20. Apr 2012, 12:41

Re: Snapshots on running machine fail

Post by k-h »

I changed the location of the snapshots folder in the machine settings. The snapshots folder was moved. But it still created a folder in the default place ~/VirtualBox VMs/ and put in a .vbox file and a Logs directory. Eventually I made ~/VirtualBox VMs/machine name a symbolic link to the disk I had the machine.

I still can't save the machine state though.
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Snapshots on running machine fail

Post by socratis »

[color=#00AA00]socratis[/color] wrote:right-click on the VM, "Show in <whatever>". ZIP and post that .vbox file.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
k-h
Posts: 8
Joined: 20. Apr 2012, 12:41

Re: Snapshots on running machine fail

Post by k-h »

I created a new virtual machine and installed ubuntu 18.04. I could save a snapshot of the state with no issues.

Then stopped the new machine and I started the original virtual machine that won't save a snapshot, in order to copy some data from it. After that my new machine won't save snapshots any more while running or paused. It now has the same issue. It starts to save a snapshot either running or paused and gets to 96% and fails and the virtual machine aborts and must be restarted.

I have used virtualbox for many years and it has always been reliable up till now.
k-h
Posts: 8
Joined: 20. Apr 2012, 12:41

Re: Snapshots on running machine fail

Post by k-h »

That file
Attachments
vpn4.zip
(2.63 KiB) Downloaded 9 times
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Snapshots on running machine fail

Post by socratis »

You've created a mini mess between the locations of your .vbox file and your virtual hard drives. I should have asked you where the .vbox file is, you can always tell me its full path.

It's not for sure in the same location as your hard drives, because they wouldn't be referenced with their full path, but their relative path. Your hard drives are located at:
  • /vdisk/virtuals/vpn4/vpn4.vmdk
  • /vdisk/virtuals/vpn4/snapshots/{0dfca04e-972d-4186-98cb-03ef2d282701}.vmdk
  • /vdisk/virtuals/vpn4/snapshots/{c7e8f297-6027-48be-9792-fdf7db2a1db2}.vmdk
and the snapshot folder is set as "/vdisk/virtuals/vpn4/".

Questions:
  1. Why VMDK?
  2. How did you move them?
  3. Why did you move them?
  4. What is "/vdisk"? An external hard drive? USB3? Filesystem?
  5. How much free space do you have in "/vdisk"?
  6. Do you need the snapshots? "Snapshot 1" and "Snapshot 2"?
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
k-h
Posts: 8
Joined: 20. Apr 2012, 12:41

Re: Snapshots on running machine fail

Post by k-h »

The vbox file is at /vdisk/virtuals/vpn4/vpn4.vbox. (Which as you'll see is the same as ~/VirtualBox VMs/vpn4/vpn4.vbox

1. Why VMDK?
Why not. I didn't want to rule out running them under another virtualisation system in the future.

2. How did you move them?
I moved them using unix mv and then made ~/VirtualBox VMs a symbolic link to /vdisk/virtuals

Code: Select all

cd ~/'VirtualBox VMs'
mv vpn4 /vdisk/virtuals
cd ..
rmdir 'VirtualBox VMs'
ln -s /vdisk/virtuals 'VirtualBox VMs'
3. Why did you move them?
I wanted all the data for a virtual machine in one place. Is that a bad thing? It's how I have always done it or tried to do it. It helps if I need to move a virtual to another machine.

4. What is "/vdisk"? An external hard drive? USB3? Filesystem?
A linux mounted internal SSD drive.

5. How much free space do you have in "/vdisk"?
Lots, 200GB or so. Way bigger than this virtual.

6. Do you need the snapshots? "Snapshot 1" and "Snapshot 2"?
The snapshots allow me to experiment with changes. One of the reasons I use virtuals. Also As I said I have been having trouble making snapshots and the machine aborting. These are left over from various tests.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Snapshots on running machine fail

Post by mpack »

k-h wrote:I didn't want to rule out running them under another virtualisation system in the future.
Eh? Where did that come from? Why do you believe that VDI can't be converted to VMDK any time you want?

You should use the VirtualBox Disk Image format because... well the clue is in the name. It's the only format with full support in the software and in the forums.

Moving a VM to another drive isn't wrong per se, but it's clearly possible to get it wrong. I don't do Linux hosts so someone else will have to tell you what the problem is. I assume that symlinks possibly don't work in all kinds of path.
andyp73
Volunteer
Posts: 1631
Joined: 25. May 2010, 23:48
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Assorted Linux, Windows Server 2012, DOS, Windows 10, BIOS/UEFI emulation

Re: Snapshots on running machine fail

Post by andyp73 »

Two things spring to mind:

1. Has the /vdisk/virtuals directory tree that you created got the correct permissions, owner and group set in order for the user/owner of the virtual machine guest to have read/write access?

2. What happens if you create a hard link rather than a symlink?

-Andy.
My crystal ball is currently broken. If you want assistance you are going to have to give me all of the necessary information.
Please don't ask me to do your homework for you, I have more than enough of my own things to do.
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Snapshots on running machine fail

Post by socratis »

VirtualBox, due to its cross-platform philosophy, isn't setup to work with linked directories/files, be it hard- or soft-links. And the proof for that is that the paths in your .vbox file are referenced as absolute, not as relative.

What you need to do is to delete your VM. Choose to "Remove only", leaving your files intact. Then re-add your VM from its proper location. Hopefully, that will fix the paths. If not, we'll need to adjust the paths manually.

In the future, if you want to move a VM, take a look at the FAQ "Moving a VM".
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Post Reply