Ticket #8446 (closed defect: worksforme)

Opened 7 years ago

Last modified 7 years ago

VBoxManage snapshot $machine_uuid vminfo $snapshot_uuid doesn't work

Reported by: intuited Owned by:
Priority: major Component: VM control
Version: VirtualBox 3.2.8 Keywords: snapshot showvminfo
Cc: Guest type: Windows
Host type: other


The VBoxManage docs state that the snapshot command's operations, like vminfo, can take either a name or a UUID.

Attempting to use a UUID gives errors like this:

$ VBoxManage snapshot $machine_uuid showvminfo $snapshot_uuid
Oracle VM VirtualBox Command Line Management Interface Version 3.2.8_OSE
(C) 2005-2010 Oracle Corporation 
All rights reserved.

ERROR: Could not find a snapshot named '$snapshot_uuid'
Details: code VBOX_E_OBJECT_NOT_FOUND (0x80bb0001), component Machine, interface IMachine, callee nsISupports
Context: "FindSnapshot(Bstr(a->argv[2]), snapshot.asOutParam())" at line 486 of file VBoxManageSnapshot.cpp

I haven't tried to use the other operations of snapshot yet; rumours (other bug reports and forum posts) suggest that the delete operation takes a UUID.

Change History

comment:1 Changed 7 years ago by frank

  • Status changed from new to closed
  • Resolution set to invalid

It seems you mis-understood the documentation. You cannot pass the word $snapshot_uuid to VBoxManage but you have to pass the actual UUID which you can get by running VBoxManage showvminfo VM_NAME (replace VM_NAME by the actual name of the VM).

comment:2 Changed 7 years ago by intuited

  • Status changed from closed to reopened
  • Resolution invalid deleted

On the contrary, sir: you have misunderstood my bug report. Or perhaps I ought to have explained myself in a more platform-independent manner. The words written with dollar signs in front are meant to be UNIX shell-style variables. In the case of the command line, it could have been written exactly like that, given the presence of those two variables in the shell environment. However, when I typed the command originally, I did use literal UUIDs rather than shell variables. In the quoted output, I just substituted $snapshot_uuid in for the snapshot UUID to make the output more readable.

So when I originally typed the command, it looked like

$ VBoxManage snapshot 123-f00d-baaaaaa-baaaaa-baaaa showvminfo 456-deadf00d-600d-600d-600d

comment:3 Changed 7 years ago by intuited

As a further note: if I substitute the name of the snapshot (found via VBoxManage showvminfo 123-f00d-baaaaaa-baaaaa-baaaa --machinereadable) for "456-deadf00d-600d-600d-600d", it works as expected. The point of the bug report is that either

a) the VBoxManage documentation is incorrect and should indicate that VBoxManage snapshot . . . showvminfo does not accept snapshot UUIDs; or

b) the VBoxManage snapshot . . . showvminfo operation really should accept UUIDs in addition to accepting names.

Also note that the $ at the beginning of my code block lines is meant to represent a shell prompt and was not part of the command.

comment:4 Changed 7 years ago by frank

Shell variables with '$' will be expanded by the shell, therefore the error message you posted did not make sense. And your example works here. Perhaps you should post your complete shell script.

comment:5 Changed 7 years ago by intuited

Hmm.. yes, you're right, it does accept valid snapshot UUIDs. I was using the UUID for the hard disk image associated with the snapshot rather than that of the snapshot itself. The error message led me to believe that it would not accept a UUID.

As mentioned above, I replaced the actual UUID with $snapshot_uuid in the output for readability. Sorry for the confusion.. probably should have explained that in the first place.

If I use a valid $snapshot_uuid, it does work as expected. So the bug is that the error message ERROR: Could not find a snapshot named '456-deadf00d-600d-600d-600d' implies that a name must be given. Something like "... a snapshot with name or UUID '456..." would be more clear to people who are learning to use the commands and don't know whether or not the documentation is consistent with the functionality.

Thanks for your help.

comment:6 Changed 7 years ago by frank

  • Status changed from reopened to closed
  • Resolution set to worksforme

Yes, probably the error message could be improved a bit.

Note: See TracTickets for help on using tickets.
ContactPrivacy policyTerms of Use