VirtualBox

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

Last change on this file since 99016 was 98549, checked in by vboxsync, 2 years ago

Docs: bugref:10302. Uploading .dita user manual files we received from the doc team on 25th Jan.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 7.1 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 Oracle VM VirtualBox enables requests of some properties from a running
9 guest, provided that the Oracle VM VirtualBox 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 Oracle VM VirtualBox 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, Oracle VM VirtualBox establishes a private
30 communication channel between the Oracle VM VirtualBox 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 Oracle VM VirtualBox 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
55 <userinput>VBoxManage guestproperty</userinput> command. See
56 <xref href="man_VBoxManage-guestproperty.dita#vboxmanage-guestproperty"/>. For example, to have
57 <i>all</i> the available guest properties for a
58 given running VM listed with their respective values, use this
59 command:
60 </p>
61 <pre xml:space="preserve">$ VBoxManage guestproperty enumerate "Windows Vista III"
62VirtualBox Command Line Management Interface Version <varname>version-number</varname>
63Copyright (C) 2005-2022 Oracle and/or its affiliates
64
65Name: /VirtualBox/GuestInfo/OS/Product, value: Windows Vista Business Edition,
66 timestamp: 1229098278843087000, flags:
67Name: /VirtualBox/GuestInfo/OS/Release, value: 6.0.6001,
68 timestamp: 1229098278950553000, flags:
69Name: /VirtualBox/GuestInfo/OS/ServicePack, value: 1,
70 timestamp: 1229098279122627000, flags:
71Name: /VirtualBox/GuestAdd/InstallDir,
72 value: C:/Program Files/Oracle/VirtualBox
73 Guest Additions, timestamp: 1229098279269739000, flags:
74Name: /VirtualBox/GuestAdd/Revision, value: 40720,
75 timestamp: 1229098279345664000, flags:
76Name: /VirtualBox/GuestAdd/Version, value: <varname>version-number</varname>,
77 timestamp: 1229098279479515000, flags:
78Name: /VirtualBox/GuestAdd/Components/VBoxControl.exe, value: <varname>version-number</varname>r40720,
79 timestamp: 1229098279651731000, flags:
80Name: /VirtualBox/GuestAdd/Components/VBoxHook.dll, value: <varname>version-number</varname>r40720,
81 timestamp: 1229098279804835000, flags:
82Name: /VirtualBox/GuestAdd/Components/VBoxDisp.dll, value: <varname>version-number</varname>r40720,
83 timestamp: 1229098279880611000, flags:
84Name: /VirtualBox/GuestAdd/Components/VBoxMRXNP.dll, value: <varname>version-number</varname>r40720,
85 timestamp: 1229098279882618000, flags:
86Name: /VirtualBox/GuestAdd/Components/VBoxService.exe, value: <varname>version-number</varname>r40720,
87 timestamp: 1229098279883195000, flags:
88Name: /VirtualBox/GuestAdd/Components/VBoxTray.exe, value: <varname>version-number</varname>r40720,
89 timestamp: 1229098279885027000, flags:
90Name: /VirtualBox/GuestAdd/Components/VBoxGuest.sys, value: <varname>version-number</varname>r40720,
91 timestamp: 1229098279886838000, flags:
92Name: /VirtualBox/GuestAdd/Components/VBoxMouse.sys, value: <varname>version-number</varname>r40720,
93 timestamp: 1229098279890600000, flags:
94Name: /VirtualBox/GuestAdd/Components/VBoxSF.sys, value: <varname>version-number</varname>r40720,
95 timestamp: 1229098279893056000, flags:
96Name: /VirtualBox/GuestAdd/Components/VBoxVideo.sys, value: <varname>version-number</varname>r40720,
97 timestamp: 1229098279895767000, flags:
98Name: /VirtualBox/GuestInfo/OS/LoggedInUsers, value: 1,
99 timestamp: 1229099826317660000, flags:
100Name: /VirtualBox/GuestInfo/OS/NoLoggedInUsers, value: false,
101 timestamp: 1229098455580553000, flags:
102Name: /VirtualBox/GuestInfo/Net/Count, value: 1,
103 timestamp: 1229099826299785000, flags:
104Name: /VirtualBox/HostInfo/GUI/LanguageID, value: C,
105 timestamp: 1229098151272771000, flags:
106Name: /VirtualBox/GuestInfo/Net/0/V4/IP, value: 192.168.2.102,
107 timestamp: 1229099826300088000, flags:
108Name: /VirtualBox/GuestInfo/Net/0/V4/Broadcast, value: 255.255.255.255,
109 timestamp: 1229099826300220000, flags:
110Name: /VirtualBox/GuestInfo/Net/0/V4/Netmask, value: 255.255.255.0,
111 timestamp: 1229099826300350000, flags:
112Name: /VirtualBox/GuestInfo/Net/0/Status, value: Up,
113 timestamp: 1229099826300524000, flags:
114Name: /VirtualBox/GuestInfo/OS/LoggedInUsersList, value: username,
115 timestamp: 1229099826317386000, flags:</pre>
116 <p>
117 To query the value of a single property, use the
118 <userinput>get</userinput> subcommand as follows:
119 </p>
120 <pre xml:space="preserve">$ VBoxManage guestproperty get "Windows Vista III" "/VirtualBox/GuestInfo/OS/Product"
121VirtualBox Command Line Management Interface Version <varname>version-number</varname>
122Copyright (C) 2005-2022 Oracle and/or its affiliates
123
124Value: Windows Vista Business Edition</pre>
125 <p>
126 To add or change guest properties from the guest, use the tool
127 <userinput>VBoxControl</userinput>. This tool is included in the Guest
128 Additions. When started from a Linux guest, this tool requires
129 root privileges for security reasons.
130 </p>
131 <pre xml:space="preserve">$ sudo VBoxControl guestproperty enumerate
132VirtualBox Guest Additions Command Line Management Interface Version <varname>version-number</varname>
133Copyright (C) 2005-2022 Oracle and/or its affiliates
134
135Name: /VirtualBox/GuestInfo/OS/Release, value: 2.6.28-18-generic,
136 timestamp: 1265813265835667000, flags: &lt;NULL&gt;
137Name: /VirtualBox/GuestInfo/OS/Version, value: #59-Ubuntu SMP Thu Jan 28 01:23:03 UTC 2010,
138 timestamp: 1265813265836305000, flags: &lt;NULL&gt;
139 ...</pre>
140 <p>
141 For more complex needs, you can use the Oracle VM VirtualBox programming
142 interfaces. See <xref href="VirtualBoxAPI.dita">Oracle VM VirtualBox Programming Interfaces</xref>.
143 </p>
144 </body>
145</topic>
Note: See TracBrowser for help on using the repository browser.

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