Changeset 94208 in vbox
- Timestamp:
- Mar 13, 2022 7:48:18 PM (3 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/doc/manual/Config.kmk
r94207 r94208 77 77 man_VBoxManage-getextradata.xml \ 78 78 man_VBoxManage-setproperty.xml \ 79 man_VBoxManage-usbfilter.xml 79 man_VBoxManage-usbfilter.xml \ 80 man_VBoxManage-guestproperty.xml 80 81 81 82 ## List of user manual XML files. -
trunk/doc/manual/en_US/man_VBoxManage-guestproperty.xml
r82969 r94208 20 20 <refentry id="vboxmanage-guestproperty" lang="en"> 21 21 <refentryinfo> 22 <pubdate> September 2019</pubdate>22 <pubdate>$Date$</pubdate> 23 23 <title>VBoxManage guestproperty</title> 24 24 </refentryinfo> … … 32 32 <refname>VBoxManage-guestproperty</refname> 33 33 <refpurpose>manage virtual machine guest properties</refpurpose> 34 <refclass> Oracle VM VirtualBox</refclass>34 <refclass>&product-name;</refclass> 35 35 </refnamediv> 36 36 -
trunk/doc/manual/en_US/user_VBoxManage.xml
r94207 r94208 1111 1111 <xi:include href="user_man_VBoxManage-sharedfolder.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" /> 1112 1112 1113 <sect1 id="vboxmanage-guestproperty"> 1114 1115 <title>VBoxManage guestproperty</title> 1116 1117 <para> 1118 The <command>guestproperty</command> commands enable you to get or 1119 set properties of a running virtual machine. See 1120 <xref linkend="guestadd-guestprops" />. Guest properties are 1121 arbitrary keyword-value string pairs which can be written to and 1122 read from by either the guest or the host, so they can be used as 1123 a low-volume communication channel for strings, provided that a 1124 guest is running and has the Guest Additions installed. In 1125 addition, a number of values whose keywords begin with 1126 <computeroutput>/VirtualBox/</computeroutput>are automatically set 1127 and maintained by the Guest Additions. 1128 </para> 1129 1130 <para> 1131 The following subcommands are available, where 1132 <computeroutput><vm></computeroutput> can either be a VM 1133 name or a VM UUID, as with the other <command>VBoxManage</command> 1134 commands: 1135 </para> 1136 1137 <itemizedlist> 1138 1139 <listitem> 1140 <para> 1141 <computeroutput>enumerate <vm> [--patterns 1142 <pattern>]</computeroutput>: Lists all the guest 1143 properties that are available for the given VM, including the 1144 value. This list will be very limited if the guest's service 1145 process cannot be contacted, for example because the VM is not 1146 running or the Guest Additions are not installed. 1147 </para> 1148 1149 <para> 1150 If <computeroutput>--patterns <pattern></computeroutput> 1151 is specified, it acts as a filter to only list properties that 1152 match the given pattern. The pattern can contain the following 1153 wildcard characters: 1154 </para> 1155 1156 <itemizedlist> 1157 1158 <listitem> 1159 <para> 1160 <computeroutput>*</computeroutput> (asterisk): Represents 1161 any number of characters. For example, 1162 "<computeroutput>/VirtualBox*</computeroutput>" would 1163 match all properties beginning with "/VirtualBox". 1164 </para> 1165 </listitem> 1166 1167 <listitem> 1168 <para> 1169 <computeroutput>?</computeroutput> (question mark): 1170 Represents a single arbitrary character. For example, 1171 "<computeroutput>fo?</computeroutput>" would match both 1172 "foo" and "for". 1173 </para> 1174 </listitem> 1175 1176 <listitem> 1177 <para> 1178 <computeroutput>|</computeroutput> (pipe symbol): Can be 1179 used to specify multiple alternative patterns. For 1180 example, "<computeroutput>s*|t*</computeroutput>" would 1181 match anything starting with either "s" or "t". 1182 </para> 1183 </listitem> 1184 1185 </itemizedlist> 1186 </listitem> 1187 1188 <listitem> 1189 <para> 1190 <computeroutput>get <vm> 1191 <property></computeroutput>: Retrieves the value of a 1192 single property only. If the property cannot be found, for 1193 example because the guest is not running, the following 1194 message is shown: 1195 </para> 1196 1197 <screen>No value set!</screen> 1198 </listitem> 1199 1200 <listitem> 1201 <para> 1202 <computeroutput>set <vm> <property> [<value> 1203 [--flags <flags>]]</computeroutput>: Enables you to set 1204 a guest property by specifying the keyword and value. If 1205 <computeroutput><value></computeroutput> is omitted, the 1206 property is deleted. With 1207 <computeroutput>--flags</computeroutput>, you can specify 1208 additional behavior. You can combine several flags by 1209 separating them with commas. 1210 </para> 1211 1212 <itemizedlist> 1213 1214 <listitem> 1215 <para> 1216 <computeroutput>TRANSIENT</computeroutput>: The value will 1217 not be stored with the VM data when the VM exits. 1218 </para> 1219 </listitem> 1220 1221 <listitem> 1222 <para> 1223 <computeroutput>TRANSRESET</computeroutput>: The value 1224 will be deleted as soon as the VM restarts or exits. 1225 </para> 1226 </listitem> 1227 1228 <listitem> 1229 <para> 1230 <computeroutput>RDONLYGUEST</computeroutput>: The value 1231 can only be changed by the host, but the guest can only 1232 read it. 1233 </para> 1234 </listitem> 1235 1236 <listitem> 1237 <para> 1238 <computeroutput>RDONLYHOST</computeroutput>: The value can 1239 only be changed by the guest, but the host can only read 1240 it. 1241 </para> 1242 </listitem> 1243 1244 <listitem> 1245 <para> 1246 <computeroutput>READONLY</computeroutput>: The value 1247 cannot be changed at all. 1248 </para> 1249 </listitem> 1250 1251 </itemizedlist> 1252 </listitem> 1253 1254 <listitem> 1255 <para> 1256 <computeroutput>wait <vm> <pattern> --timeout 1257 <timeout></computeroutput>: Waits for a particular value 1258 described by the pattern string to change or to be deleted or 1259 created. The pattern rules are the same as for the 1260 <command>enumerate</command> subcommand. 1261 </para> 1262 </listitem> 1263 1264 <listitem> 1265 <para> 1266 <computeroutput>delete <vm> 1267 <property></computeroutput>: Deletes a guest property 1268 which has been set previously. 1269 </para> 1270 </listitem> 1271 1272 </itemizedlist> 1273 1274 </sect1> 1113 <xi:include href="user_man_VBoxManage-guestproperty.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" /> 1275 1114 1276 1115 <sect1 id="vboxmanage-guestcontrol"> -
trunk/src/VBox/Frontends/VBoxManage/VBoxManage.cpp
r94207 r94208 232 232 { "sharedfolder", USAGE_S_NEWCMD, HELP_CMD_SHAREDFOLDER, handleSharedFolder, 0 }, 233 233 #ifdef VBOX_WITH_GUEST_PROPS 234 { "guestproperty", USAGE_ GUESTPROPERTY, VBMG_CMD_TODO, handleGuestProperty, 0 },234 { "guestproperty", USAGE_S_NEWCMD,HELP_CMD_GUESTPROPERTY, handleGuestProperty, 0 }, 235 235 #endif 236 236 #ifdef VBOX_WITH_GUEST_CONTROL -
trunk/src/VBox/Frontends/VBoxManage/VBoxManage.h
r94207 r94208 109 109 USAGE_I_MODUNINSTALL, 110 110 USAGE_I_RENAMEVMDK, 111 #ifdef VBOX_WITH_GUEST_PROPS112 USAGE_GUESTPROPERTY,113 #endif /* VBOX_WITH_GUEST_PROPS defined */114 111 USAGE_I_CONVERTTORAW, 115 112 USAGE_METRICS, … … 255 252 RTEXITCODE handleDebugVM(HandlerArg *a); 256 253 257 /* VBoxManageGuestProp.cpp */258 extern void usageGuestProperty(PRTSTREAM pStrm, const char *pcszSep1, const char *pcszSep2);259 260 254 /* VBoxManageGuestCtrl.cpp */ 261 255 extern void usageGuestControl(PRTSTREAM pStrm, const char *pcszSep1, const char *pcszSep2, uint64_t fSubcommandScope); -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageGuestProp.cpp
r94184 r94208 54 54 55 55 56 void usageGuestProperty(PRTSTREAM pStrm, const char *pcszSep1, const char *pcszSep2)57 {58 RTStrmPrintf(pStrm, "%s guestproperty %s get <uuid|vmname>\n"59 " <property> [--verbose]\n"60 "\n", pcszSep1, pcszSep2);61 RTStrmPrintf(pStrm, "%s guestproperty %s set <uuid|vmname>\n"62 " <property> [<value> [--flags <flags>]]\n"63 "\n", pcszSep1, pcszSep2);64 RTStrmPrintf(pStrm, "%s guestproperty %s delete|unset <uuid|vmname>\n"65 " <property>\n"66 "\n", pcszSep1, pcszSep2);67 RTStrmPrintf(pStrm, "%s guestproperty %s enumerate <uuid|vmname>\n"68 " [--patterns <patterns>]\n"69 "\n", pcszSep1, pcszSep2);70 RTStrmPrintf(pStrm, "%s guestproperty %s wait <uuid|vmname> <patterns>\n"71 " [--timeout <msec>] [--fail-on-timeout]\n"72 "\n", pcszSep1, pcszSep2);73 }74 75 56 #ifndef VBOX_ONLY_DOCS 76 57 … … 78 59 { 79 60 HRESULT rc = S_OK; 61 62 setCurrentSubcommand(HELP_SCOPE_GUESTPROPERTY_GET); 80 63 81 64 bool verbose = false; … … 85 68 verbose = true; 86 69 else if (a->argc != 2) 87 return errorSyntax( USAGE_GUESTPROPERTY,GuestProp::tr("Incorrect parameters"));70 return errorSyntax(GuestProp::tr("Incorrect parameters")); 88 71 89 72 ComPtr<IMachine> machine; … … 121 104 HRESULT rc = S_OK; 122 105 106 setCurrentSubcommand(HELP_SCOPE_GUESTPROPERTY_SET); 107 123 108 /* 124 109 * Check the syntax. We can deduce the correct syntax from the number of … … 144 129 usageOK = false; 145 130 if (!usageOK) 146 return errorSyntax( USAGE_GUESTPROPERTY,GuestProp::tr("Incorrect parameters"));131 return errorSyntax(GuestProp::tr("Incorrect parameters")); 147 132 /* This is always needed. */ 148 133 pszName = a->argv[1]; … … 179 164 HRESULT rc = S_OK; 180 165 166 setCurrentSubcommand(HELP_SCOPE_GUESTPROPERTY_UNSET); 167 181 168 /* 182 169 * Check the syntax. We can deduce the correct syntax from the number of … … 188 175 usageOK = false; 189 176 if (!usageOK) 190 return errorSyntax( USAGE_GUESTPROPERTY,GuestProp::tr("Incorrect parameters"));177 return errorSyntax(GuestProp::tr("Incorrect parameters")); 191 178 /* This is always needed. */ 192 179 pszName = a->argv[1]; … … 221 208 static RTEXITCODE handleEnumGuestProperty(HandlerArg *a) 222 209 { 210 setCurrentSubcommand(HELP_SCOPE_GUESTPROPERTY_ENUMERATE); 211 223 212 /* 224 213 * Check the syntax. We can deduce the correct syntax from the number of … … 230 219 && strcmp(a->argv[1], "--patterns") 231 220 && strcmp(a->argv[1], "-patterns"))) 232 return errorSyntax( USAGE_GUESTPROPERTY,GuestProp::tr("Incorrect parameters"));221 return errorSyntax(GuestProp::tr("Incorrect parameters")); 233 222 234 223 /* … … 283 272 static RTEXITCODE handleWaitGuestProperty(HandlerArg *a) 284 273 { 274 setCurrentSubcommand(HELP_SCOPE_GUESTPROPERTY_WAIT); 275 285 276 /* 286 277 * Handle arguments … … 317 308 } 318 309 if (!usageOK) 319 return errorSyntax( USAGE_GUESTPROPERTY,GuestProp::tr("Incorrect parameters"));310 return errorSyntax(GuestProp::tr("Incorrect parameters")); 320 311 321 312 /* … … 420 411 421 412 if (a->argc == 0) 422 return errorSyntax( USAGE_GUESTPROPERTY,GuestProp::tr("Incorrect parameters"));413 return errorSyntax(GuestProp::tr("Incorrect parameters")); 423 414 424 415 /* switch (cmd) */ … … 435 426 436 427 /* default: */ 437 return errorSyntax( USAGE_GUESTPROPERTY,GuestProp::tr("Incorrect parameters"));428 return errorSyntax(GuestProp::tr("Incorrect parameters")); 438 429 } 439 430 -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp
r94207 r94208 639 639 "\n", SEP); 640 640 641 #ifdef VBOX_WITH_GUEST_PROPS642 if (enmCommand == USAGE_GUESTPROPERTY || enmCommand == USAGE_S_ALL)643 usageGuestProperty(pStrm, SEP);644 #endif /* VBOX_WITH_GUEST_PROPS defined */645 646 641 #ifdef VBOX_WITH_GUEST_CONTROL 647 642 if (enmCommand == USAGE_GUESTCONTROL || enmCommand == USAGE_S_ALL)
Note:
See TracChangeset
for help on using the changeset viewer.