VirtualBox

Opened 8 years ago

Last modified 8 years ago

#15990 new defect

VirtualBox 5.x CLI cannot display snapshot list while VM is running

Reported by: TastyWheat Owned by:
Component: VM control Version: VirtualBox 5.1.6
Keywords: vboxmanage, snapshot Cc:
Guest type: Linux Host type: Windows

Description

The following command produces an error when executed while the targeted VM is running:

C:\Program Files\Oracle\VirtualBox>VBoxManage.exe snapshot MyLinuxVM list

The error is as follows:

VBoxManage.exe: error: Code E_FAIL (0x80004005) - Unspecified error (extended info not available)
VBoxManage.exe: error: Context: "LockMachine(a->session, LockType_Shared)" at line 331 of file VBoxManageSnapshot.cpp

If the command is executed while the VM is stopped (either suspended or powered off) the command is successful. I do not have any trouble creating snapshots with VBoxManage while the VM is running.

I had this problem in a previous version (5.0.x) and again when I updated to the latest version (5.1.6).

Attachments (1)

Windows 7_SnapshotList.png (168.8 KB ) - added by Socratis 8 years ago.
I colored the "Run as Administrator" cmd red. Sorry for the small, non-essential amount of Greek text.

Download all attachments as: .zip

Change History (6)

comment:1 by Socratis, 8 years ago

I tried to reproduce the bug. It's only reproducible on Windows. The 'VBoxManage snapshot <uuid|vmname> list' gives the following results:

  • works as intended on OSX (my host).
  • works as intended on Ubuntu (DOS VM inside an Uvuntu VM).
  • does not work on Windows (DOS VM inside a Windows VM). Fails with the exact same message as the OP.

comment:2 by Alex, 8 years ago

Hello. Unable to reproduce this error on Windows 10 host. Could you attach VBox.log please?

comment:3 by Socratis, 8 years ago

Hmm... I tried to reproduce it and *I could* on a Win7 computer and a Win7 VM.

But, then I found out the "culprit". I have setup the "Command Prompt" shortcut to "Run as Administrator" and that causes erratic results. Here's a way to reproduce it:

  • Log on as Administrator.
  • Right-click on the "Command Prompt", "Run as Administrator". The title of the window is "Administrator: Command Prompt".
  • Run "VBoxManage list vms". Surprisingly, it works! I guess it looks at the user's VirtualBox.xml? Remember, we're (almost?) the same user. At least as far as the user home directory is concerned.
  • Run "VBoxManage list runningvms". It comes up empty, meaning it failed to see the VM as a running process(?). Maybe because the process is running under a different user security context?
  • Run "VBoxManage snapshot <Pick_any_VM> list". The above OP mentioned error pops up.

Now, change the way that you open CommandPrompt. Do it "normally":

  • Open "Command Prompt", or use "Run...", "cmd". The title of the window is simply "Command Prompt".
  • Run "VBoxManage list vms". It works.
  • Run "VBoxManage list runningvms". It works.
  • Run "VBoxManage snapshot <Pick_any_VM> list". It works.

I think that this is most probably what's going on with the OP. I just happened to have the same "weird" setup?

Now, this is not the behavior if you're a simple user and you use the "Run as Administrator" trick (and enter your admin password of course). You won't even see the VMs, the running VMs, or get information about their snapshots, but with a different error message (correct one). That is the expected behavior:

VBoxManage: error: Could not find a registered machine named 'OpenSTEP'
VBoxManage: error: Details: code VBOX_E_OBJECT_NOT_FOUND (0x80bb0001), component VirtualBoxWrap, interface IVirtualBox, callee nsISupports
VBoxManage: error: Context: "FindMachine(Bstr(VMNameOrUuid).raw(), machine.asOutParam())" at line 2780 of file VBoxManageInfo.cpp

I don't think that you'd still want a VBox.log ;) But, I'll attach a picture summarizing the whole thing.

by Socratis, 8 years ago

Attachment: Windows 7_SnapshotList.png added

I colored the "Run as Administrator" cmd red. Sorry for the small, non-essential amount of Greek text.

comment:4 by Alex, 8 years ago

That's known issue. Workaround is to use vbox consistently in the admin role or not.

in reply to:  2 comment:5 by Socratis, 8 years ago

Replying to Lelik:

Unable to reproduce this

Replying to Lelik:

That's known issue

Right... That should cover it :D

Note: See TracTickets for help on using tickets.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette