In the GUI, I can see whether a VM has been changed from the current snapshot in that it reads "Aktueller Zustand (verändert)". i.e. "Current State (changed)".
I cannot find anything similar using vboxmanage, neither the snapshot command nor showvminfo seem to give me that information, or do they?
Determine "VM state" with vboxmanage
-
- Site Moderator
- Posts: 20945
- Joined: 30. Dec 2009, 20:14
- Primary OS: MS Windows 10
- VBox Version: PUEL
- Guest OSses: Windows, Linux
Re: Determine "VM state" with vboxmanage
It appears there is an indication of the "Current State modidifed", not in 'vboxmanage showvminfo', but in the VM's .vbox file.
'vboxmanage showvminfo' shows the VM's snapshot structure and which snapshot is active, as shown with one of my test VMs:
The .vbox file contains this line in the <Machine> key:
'vboxmanage showvminfo' shows the VM's snapshot structure and which snapshot is active, as shown with one of my test VMs:
The asterisk shows the active snapshot, and the indenting shows the structure. The asterisk does not change if "Current State" goes to "Current State (modified)", and no other indicators are placed.Snapshots: Name: Snapshot 1 (UUID: 5f9732fa-8716-40b6-8115-2afedb02ab91) Name: Snapshot 2 (UUID: 97b24a5a-f1a4-4c52-ab74-122368e358d2) Name: Snapshot 4 (UUID: b1fb069f-d2f7-439a-a76f-8635af360b30) * Name: Snapshot 3 (UUID: 9ae01d4e-9a6d-451e-9410-7f05ad16be52)
The .vbox file contains this line in the <Machine> key:
So you'll have to read the .vbox file. It appears this bolded underlined text disappears when the current state is modified, it does not read "true". Note that the .vbox file gets overwritten by the VboxSVC service every so often, at least when the VM is started. The VM's "state" line in 'vboxmanage showvminfo' will show when the VM is running, and the Current State will be "modified" when the VM is running.<Machine uuid= ... snapshotFolder="Snapshots" currentStateModified="false" lastStateChange=... >
Re: Determine "VM state" with vboxmanage
Ok, thanks, noted.
But I would reckon this should be in showvminfo, or shouldn't it?
Is it possible to suggest this as a feature to the team?
But I would reckon this should be in showvminfo, or shouldn't it?
Is it possible to suggest this as a feature to the team?
-
- Site Moderator
- Posts: 20945
- Joined: 30. Dec 2009, 20:14
- Primary OS: MS Windows 10
- VBox Version: PUEL
- Guest OSses: Windows, Linux
Re: Determine "VM state" with vboxmanage
It seems it would be a good match for showvminfo. You can post an enhancement on the Bugtracker if you wish.
However, don't hold up your project waiting for the idea to take hold. The devs are rather busy with bugs.
However, don't hold up your project waiting for the idea to take hold. The devs are rather busy with bugs.