Feature Request: Provide all parameters for showvminfo

Here you can provide suggestions on how to improve the product, website, etc.

Feature Request: Provide all parameters for showvminfo

Postby joseph1962smith » 16. Oct 2009, 21:33

Hi,

So I have one request ... but on the whole .. translates into a lot. In one of our environments, we have a number of VMs defined on one of our systems with anywhere from 5 to 9 running at any given time. As these VMs run on a headless system, I have put together a web interface that allows me to monitor and control the environments.

Unfortunately, there is no "efficient" way to determine when a VM has been "updated/changed". For most changes (adding drives, modifying parameters), the Machine XML is updated and so checking the date-time stamp on the XML works well. Unfortunately, if a machine is paused or started, no updates are done anywhere. Currently, the only reliable way to determine what has changed is to periodically run "VBoxManage showvminfo <VM ID> -- machinereadable". This works well ... but unfortunately adds considerable overhead to execute this for 25 VMs every 10 seconds.

So here is my first request: Would it be possible to add an extra field/parameter to the VBoxManage --list vms command that would also show the last date-time any config or state change happened? That way it will only be necessary to interrogate a VM that had a modification rather than all.

My second request: The VBoxManage showvminfo with the --machinereadable option does not show all the options. For example, the 'biossystemtimeoffset' value is provided but 'bioslogofadein, bioslogofadeout, biospxedebug' options among many others are not. Some other examples that are not listed are 'dvdpassthrough' and 'snapshotfolder'. Other critical settings that are not provided are the list of SCSI drives that are attached. Luckily, those are in the Machine XML.

Though it might be possible some options are not being reported because there is no setting, from my tests it does not seem that is the case.

To work past this problem, I have had to parse the output from showvminfo and the XML file. Yup ... I know ... not good to look at the XML file ... but am unable to see any other option right now.

Any suggestions/thoughts ?

Thanks,
Joe
joseph1962smith
 
Posts: 12
Joined: 16. Oct 2009, 21:27
Primary OS: openSUSE
VBox Version: PUEL
Guest OSses: openSUSE, Red Hat, CentOS, Solaris, Windows XP, Windows 7, Ubuntu, Mandriva

Re: Feature Request: Provide all parameters for showvminfo

Postby KciNicK » 31. Oct 2009, 14:36

joseph1962smith wrote:Hi,

So I have one request ... but on the whole .. translates into a lot. In one of our environments, we have a number of VMs defined on one of our systems with anywhere from 5 to 9 running at any given time. As these VMs run on a headless system, I have put together a web interface that allows me to monitor and control the environments.

Unfortunately, there is no "efficient" way to determine when a VM has been "updated/changed". For most changes (adding drives, modifying parameters), the Machine XML is updated and so checking the date-time stamp on the XML works well. Unfortunately, if a machine is paused or started, no updates are done anywhere. Currently, the only reliable way to determine what has changed is to periodically run "VBoxManage showvminfo <VM ID> -- machinereadable". This works well ... but unfortunately adds considerable overhead to execute this for 25 VMs every 10 seconds.

So here is my first request: Would it be possible to add an extra field/parameter to the VBoxManage --list vms command that would also show the last date-time any config or state change happened? That way it will only be necessary to interrogate a VM that had a modification rather than all.

My second request: The VBoxManage showvminfo with the --machinereadable option does not show all the options. For example, the 'biossystemtimeoffset' value is provided but 'bioslogofadein, bioslogofadeout, biospxedebug' options among many others are not. Some other examples that are not listed are 'dvdpassthrough' and 'snapshotfolder'. Other critical settings that are not provided are the list of SCSI drives that are attached. Luckily, those are in the Machine XML.

Though it might be possible some options are not being reported because there is no setting, from my tests it does not seem that is the case.

To work past this problem, I have had to parse the output from showvminfo and the XML file. Yup ... I know ... not good to look at the XML file ... but am unable to see any other option right now.

Any suggestions/thoughts ?

Thanks,
Joe


u could use some of the apis to code a program with callbacks... if you already have a program that check the xml, timestamps, etc, it should be a 20 lines code, cya...
KciNicK
 
Posts: 5
Joined: 28. Sep 2009, 12:04
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: LINUX

Re: Feature Request: Provide all parameters for showvminfo

Postby joseph1962smith » 2. Nov 2009, 05:29

Hi Nick,

Unfortunately ... that's the rub. The API you refer to is only 'easily' accessible via C++ or Python. The solution I have is in PHP (has to be) ... and therefore ... makes it somewhat of a challenge.

In fact, it is because the command-line utilities do not provide all the details that it became necessary to parse the XML files, etc.

I've decided to bite the bullet and write an intermediary layer in Python that will post and receive XPCOM call-backs ... and relay the data to the other tools that need the information. That way ... I won't have to be dependent on knowing or caring about the XML format.
joseph1962smith
 
Posts: 12
Joined: 16. Oct 2009, 21:27
Primary OS: openSUSE
VBox Version: PUEL
Guest OSses: openSUSE, Red Hat, CentOS, Solaris, Windows XP, Windows 7, Ubuntu, Mandriva

Re: Feature Request: Provide all parameters for showvminfo

Postby KciNicK » 3. Nov 2009, 19:50

yes, i know, i was writing a remote web console in php, i have to start it over in c, coz of this, i try the webservice, but again, same problem...

a daemon in c that commit changes to a mysql db should be the best method for you, i think, so u can access db info, states, properties etc thru mysql and don't have to mess with timestamp, xml, etc..., ahh, and u don't have to be root in php to read the xml files...
KciNicK
 
Posts: 5
Joined: 28. Sep 2009, 12:04
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: LINUX

Re: Feature Request: Provide all parameters for showvminfo

Postby joseph1962smith » 6. Nov 2009, 14:47

Hi Nick,

Had some revelations that allowed me to make progress using PHP to interact with VBox via the XPCOM API layer.

I added some comments to an older post with code snippet examples. Here is the link to the response on this forum: http://forums.virtualbox.org/viewtopic.php?f=1&t=12216

Hope this helps.

Joe
joseph1962smith
 
Posts: 12
Joined: 16. Oct 2009, 21:27
Primary OS: openSUSE
VBox Version: PUEL
Guest OSses: openSUSE, Red Hat, CentOS, Solaris, Windows XP, Windows 7, Ubuntu, Mandriva


Return to Suggestions

Who is online

Users browsing this forum: No registered users and 1 guest