Page 1 of 1
Snapshots on running machine fail
Posted: 6. Jun 2018, 07:35
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?
Re: Snapshots on running machine fail
Posted: 10. Jun 2018, 23:21
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:
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.
Re: Snapshots on running machine fail
Posted: 14. Jun 2018, 03:18
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
Re: Snapshots on running machine fail
Posted: 14. Jun 2018, 08:25
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.
Re: Snapshots on running machine fail
Posted: 15. Jun 2018, 05:16
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.
Re: Snapshots on running machine fail
Posted: 15. Jun 2018, 07:43
by socratis
[color=#00AA00]socratis[/color] wrote:right-click on the VM, "Show in <whatever>". ZIP and post that .vbox file.
Re: Snapshots on running machine fail
Posted: 16. Jun 2018, 13:52
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.
Re: Snapshots on running machine fail
Posted: 16. Jun 2018, 14:16
by k-h
That file
Re: Snapshots on running machine fail
Posted: 16. Jun 2018, 19:03
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:
- Why VMDK?
- How did you move them?
- Why did you move them?
- What is "/vdisk"? An external hard drive? USB3? Filesystem?
- How much free space do you have in "/vdisk"?
- Do you need the snapshots? "Snapshot 1" and "Snapshot 2"?
Re: Snapshots on running machine fail
Posted: 17. Jun 2018, 03:35
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.
Re: Snapshots on running machine fail
Posted: 17. Jun 2018, 09:22
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.
Re: Snapshots on running machine fail
Posted: 17. Jun 2018, 09:45
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.
Re: Snapshots on running machine fail
Posted: 17. Jun 2018, 10:25
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".