VirtualBox

source: vbox/trunk/doc/manual/en_US/dita/topics/guestadd-guestprops.dita@ 105293

Last change on this file since 105293 was 99797, checked in by vboxsync, 21 months ago

Docs: bugref:10302. Merging changes from the docs team. Almost exclusively conkeyref related stuff.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 7.4 KB
Line 
1<?xml version='1.0' encoding='UTF-8'?>
2<!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">
3<topic xml:lang="en-us" id="guestadd-guestprops">
4 <title>Guest Properties</title>
5
6 <body>
7 <p>
8 <ph conkeyref="vbox-conkeyref-phrases/product-name"/> enables requests of some properties from a running
9 guest, provided that the <ph conkeyref="vbox-conkeyref-phrases/product-name"/> Guest Additions are
10 installed and the VM is running. This provides the following
11 advantages:
12 </p>
13 <ul>
14 <li>
15 <p>
16 A number of predefined VM characteristics are automatically
17 maintained by <ph conkeyref="vbox-conkeyref-phrases/product-name"/> and can be retrieved on the host.
18 For example, to monitor VM performance and statistics.
19 </p>
20 </li>
21 <li>
22 <p>
23 Arbitrary string data can be exchanged between guest and host.
24 This works in both directions.
25 </p>
26 </li>
27 </ul>
28 <p>
29 To accomplish this, <ph conkeyref="vbox-conkeyref-phrases/product-name"/> establishes a private
30 communication channel between the <ph conkeyref="vbox-conkeyref-phrases/product-name"/> Guest Additions
31 and the host, and software on both sides can use this channel to
32 exchange string data for arbitrary purposes. Guest properties are
33 simply string keys to which a value is attached. They can be set,
34 or written to, by either the host and the guest. They can also be
35 read from both sides.
36 </p>
37 <p>
38 In addition to establishing the general mechanism of reading and
39 writing values, a set of predefined guest properties is
40 automatically maintained by the <ph conkeyref="vbox-conkeyref-phrases/product-name"/> Guest Additions to
41 allow for retrieving interesting guest data such as the guest's
42 exact operating system and service pack level, the installed
43 version of the Guest Additions, users that are currently logged
44 into the guest OS, network statistics and more. These predefined
45 properties are all prefixed with <codeph>/VirtualBox/</codeph>
46 and organized into a hierarchical tree of keys.
47 </p>
48 <p>
49 Some of this runtime information is shown when you select
50 <b outputclass="bold">Session Information Dialog</b> from a
51 virtual machine's <b outputclass="bold">Machine</b> menu.
52 </p>
53 <p>
54 A more flexible way to use this channel is with the <userinput>VBoxManage
55 guestproperty</userinput> command. See <xref href="vboxmanage-guestproperty.dita"/>.
56 For example, to have <i>all</i> the available guest properties for a given running VM
57 listed with their respective values, use this command:
58 </p>
59 <pre xml:space="preserve">$ VBoxManage guestproperty enumerate "Windows Vista III"
60VirtualBox Command Line Management Interface Version <varname>version-number</varname>
61Copyright (C) 2005-2022 Oracle and/or its affiliates
62
63Name: /VirtualBox/GuestInfo/OS/Product, value: Windows Vista Business Edition,
64 timestamp: 1229098278843087000, flags:
65Name: /VirtualBox/GuestInfo/OS/Release, value: 6.0.6001,
66 timestamp: 1229098278950553000, flags:
67Name: /VirtualBox/GuestInfo/OS/ServicePack, value: 1,
68 timestamp: 1229098279122627000, flags:
69Name: /VirtualBox/GuestAdd/InstallDir,
70 value: C:/Program Files/Oracle/VirtualBox
71 Guest Additions, timestamp: 1229098279269739000, flags:
72Name: /VirtualBox/GuestAdd/Revision, value: 40720,
73 timestamp: 1229098279345664000, flags:
74Name: /VirtualBox/GuestAdd/Version, value: <varname>version-number</varname>,
75 timestamp: 1229098279479515000, flags:
76Name: /VirtualBox/GuestAdd/Components/VBoxControl.exe, value: <varname>version-number</varname>r40720,
77 timestamp: 1229098279651731000, flags:
78Name: /VirtualBox/GuestAdd/Components/VBoxHook.dll, value: <varname>version-number</varname>r40720,
79 timestamp: 1229098279804835000, flags:
80Name: /VirtualBox/GuestAdd/Components/VBoxDisp.dll, value: <varname>version-number</varname>r40720,
81 timestamp: 1229098279880611000, flags:
82Name: /VirtualBox/GuestAdd/Components/VBoxMRXNP.dll, value: <varname>version-number</varname>r40720,
83 timestamp: 1229098279882618000, flags:
84Name: /VirtualBox/GuestAdd/Components/VBoxService.exe, value: <varname>version-number</varname>r40720,
85 timestamp: 1229098279883195000, flags:
86Name: /VirtualBox/GuestAdd/Components/VBoxTray.exe, value: <varname>version-number</varname>r40720,
87 timestamp: 1229098279885027000, flags:
88Name: /VirtualBox/GuestAdd/Components/VBoxGuest.sys, value: <varname>version-number</varname>r40720,
89 timestamp: 1229098279886838000, flags:
90Name: /VirtualBox/GuestAdd/Components/VBoxMouse.sys, value: <varname>version-number</varname>r40720,
91 timestamp: 1229098279890600000, flags:
92Name: /VirtualBox/GuestAdd/Components/VBoxSF.sys, value: <varname>version-number</varname>r40720,
93 timestamp: 1229098279893056000, flags:
94Name: /VirtualBox/GuestAdd/Components/VBoxVideo.sys, value: <varname>version-number</varname>r40720,
95 timestamp: 1229098279895767000, flags:
96Name: /VirtualBox/GuestInfo/OS/LoggedInUsers, value: 1,
97 timestamp: 1229099826317660000, flags:
98Name: /VirtualBox/GuestInfo/OS/NoLoggedInUsers, value: false,
99 timestamp: 1229098455580553000, flags:
100Name: /VirtualBox/GuestInfo/Net/Count, value: 1,
101 timestamp: 1229099826299785000, flags:
102Name: /VirtualBox/HostInfo/GUI/LanguageID, value: C,
103 timestamp: 1229098151272771000, flags:
104Name: /VirtualBox/GuestInfo/Net/0/V4/IP, value: 192.168.2.102,
105 timestamp: 1229099826300088000, flags:
106Name: /VirtualBox/GuestInfo/Net/0/V4/Broadcast, value: 255.255.255.255,
107 timestamp: 1229099826300220000, flags:
108Name: /VirtualBox/GuestInfo/Net/0/V4/Netmask, value: 255.255.255.0,
109 timestamp: 1229099826300350000, flags:
110Name: /VirtualBox/GuestInfo/Net/0/Status, value: Up,
111 timestamp: 1229099826300524000, flags:
112Name: /VirtualBox/GuestInfo/OS/LoggedInUsersList, value: username,
113 timestamp: 1229099826317386000, flags:</pre>
114 <p>
115 To query the value of a single property, use the
116 <userinput>get</userinput> subcommand as follows:
117 </p>
118 <pre xml:space="preserve">$ VBoxManage guestproperty get "Windows Vista III" "/VirtualBox/GuestInfo/OS/Product"
119VirtualBox Command Line Management Interface Version <varname>version-number</varname>
120Copyright (C) 2005-2022 Oracle and/or its affiliates
121
122Value: Windows Vista Business Edition</pre>
123 <p>
124 To add or change guest properties from the guest, use the tool
125 <userinput>VBoxControl</userinput>. This tool is included in the Guest
126 Additions. When started from a Linux guest, this tool requires
127 root privileges for security reasons.
128 </p>
129 <pre xml:space="preserve">$ sudo VBoxControl guestproperty enumerate
130VirtualBox Guest Additions Command Line Management Interface Version <varname>version-number</varname>
131Copyright (C) 2005-2022 Oracle and/or its affiliates
132
133Name: /VirtualBox/GuestInfo/OS/Release, value: 2.6.28-18-generic,
134 timestamp: 1265813265835667000, flags: &lt;NULL&gt;
135Name: /VirtualBox/GuestInfo/OS/Version, value: #59-Ubuntu SMP Thu Jan 28 01:23:03 UTC 2010,
136 timestamp: 1265813265836305000, flags: &lt;NULL&gt;
137 ...</pre>
138 <p>
139 For more complex needs, you can use the <ph conkeyref="vbox-conkeyref-phrases/product-name"/> programming
140 interfaces. See <xref href="VirtualBoxAPI.dita"><ph conkeyref="vbox-conkeyref-phrases/product-name"/> Programming Interfaces</xref>.
141 </p>
142 </body>
143</topic>
Note: See TracBrowser for help on using the repository browser.

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