Hi,
I couldn't find information, how to display value of a particular VM property from the command line. I mean, I can set for example value of the "natdnsproxy" property using the VBoxManage and command "modifyvm" (VBoxManage modifyvm "VM name" --natdnsproxy1 on), but how can I display the currently set value of that property? That property isn't even in the Virtualbox's GUI.
Thank you.
How to display VM properties
-
- Posts: 6
- Joined: 7. Feb 2014, 21:26
- Primary OS: MS Windows 7
- VBox Version: PUEL
- Guest OSses: Linux (Debian, Ubuntu)
- Location: Prague, Czech republic
- Contact:
How to display VM properties
Dawid Ferenczy
-
- Site Moderator
- Posts: 34369
- Joined: 6. Sep 2008, 22:55
- Primary OS: Linux other
- VBox Version: OSE self-compiled
- Guest OSses: *NIX
Re: How to display VM properties
VBoxManage showvminfo <uuid|name> should show what you need.
-
- Posts: 6
- Joined: 7. Feb 2014, 21:26
- Primary OS: MS Windows 7
- VBox Version: PUEL
- Guest OSses: Linux (Debian, Ubuntu)
- Location: Prague, Czech republic
- Contact:
Re: How to display VM properties
Thank you for your answer, I have already checked that, because it's in the manual. But it's not easy to find anything in that output. It even doesn't contain "dns" anywhere. I would like to display just the value of one particular property. I have no clue, how the value of "natdnsproxy" property could be interpreted in that output.
Dawid Ferenczy
-
- Site Moderator
- Posts: 34369
- Joined: 6. Sep 2008, 22:55
- Primary OS: Linux other
- VBox Version: OSE self-compiled
- Guest OSses: *NIX
Re: How to display VM properties
Well in Linux you would use grep but Windows you would need to use something else.
You can also look at the *.vbox file but here again it is complex and full of stuff.
Simple in Linux just run a command like the following.
I'm sure there is a Windows substitute or you can install Cygwin and use the above command
You can also look at the *.vbox file but here again it is complex and full of stuff.
Simple in Linux just run a command like the following.
Code: Select all
cat /<location of guest file.vbox>/*.vbox | grep natdnsproxy
-
- Posts: 6
- Joined: 7. Feb 2014, 21:26
- Primary OS: MS Windows 7
- VBox Version: PUEL
- Guest OSses: Linux (Debian, Ubuntu)
- Location: Prague, Czech republic
- Contact:
Re: How to display VM properties
Sure, I'm using the Cygwin for very long time. Actually grepping the output of VBoxManage showvminfo (but with -i option for case insensitive searching) was my first attempt, but without success. Also VM's .vbox file doesn't contain the string "natdnsproxy" at all. It seems, that it's stored in this XML tag in the VM's .vbox file: under the "Adapter" node.
But that's very uncomfortable, since to find that, you have to read the whole .vbox file and think what each tag and property means and what "modifyvm" property could be related to.
There is really no way to display value of one particular VM's property from the command line?
A lot of software works for example this way:
Or there could be something like this:
Code: Select all
<DNS pass-domain="true" use-proxy="true" use-host-resolver="true"/>
But that's very uncomfortable, since to find that, you have to read the whole .vbox file and think what each tag and property means and what "modifyvm" property could be related to.
There is really no way to display value of one particular VM's property from the command line?
A lot of software works for example this way:
Code: Select all
VBoxManage modifyvm "VM name" --natdnsproxy1 on # sets property's value
VBoxManage modifyvm "VM name" --natdnsproxy1 # gets property value (since there is no value to be set)
Code: Select all
VBoxManage showvminfo "VM name" --natdnsproxy1
Dawid Ferenczy
Re: How to display VM properties
Exactly the same question and issue (related to getting the current value of the --natdnsproxy1 setting). It's 5 years later there is still no way to do this?
-
- Site Moderator
- Posts: 20945
- Joined: 30. Dec 2009, 20:14
- Primary OS: MS Windows 10
- VBox Version: PUEL
- Guest OSses: Windows, Linux
Re: How to display VM properties
There's nowhere in this thread indicating that a post to the Bugtracker as an Enhancement Request was made for this feature. Until that is done the developers won't know this is desired. (And it may still take some time thereafter until they find money behind the request or find it is easy to throw a couple more lines in the code, or until someone codes it for them.) You could go there and search or post.
FWIW I found that turning this on in a guest causes the line:
<DNS use-proxy="true"/>
to appear in the network section related to the # in "--natdnsproxy#".
This is with a non-commanded NAT:
This is with a commanded NAT:
And here is where I ran the command on an adapter that wasn't enabled in the guest:
The slot # is one less than the "--natdnsproxy#". It would take a bit of programming to show this in a command, but it could be scripted, although there may likely be other things that can be put in the NAT adapter that would have to be accounted for. A visual perusal of the .vbox file can identify this as well.
FWIW I found that turning this on in a guest causes the line:
<DNS use-proxy="true"/>
to appear in the network section related to the # in "--natdnsproxy#".
This is with a non-commanded NAT:
Code: Select all
<Adapter slot="0" enabled="true" MACAddress="08002750CB2D" type="Am79C973">
<NAT/>
</Adapter>
Code: Select all
<Adapter slot="0" enabled="true" MACAddress="08002750CB2D" type="Am79C973">
<NAT>
<DNS use-proxy="true"/>
</NAT>
</Adapter>
Code: Select all
<Adapter slot="2" cable="true" type="Am79C973">
<DisabledModes>
<NAT>
<DNS use-proxy="true"/>
</NAT>
</DisabledModes>
</Adapter>