Sun Microsystems 3.0.0 user manual VBoxManage guestproperty

Models: 3.0.0

1 259
Download 259 pages 49.67 Kb
Page 124
Image 124

8 VBoxManage reference

Note: The query subcommand does not remove or “flush” retained data. If you query often enough you will see how old samples are gradually being “phased out” by new samples.

collect This subcommand sets the interval between taking two samples of metric data and the number of samples retained internally. The collected data is displayed periodically until Ctrl-C is pressed unless the -detach option is specified. With the -detach option, this subcommand operates the same way as setup does. The -list option shows which metrics match the specified filter.

8.24 VBoxManage guestproperty

The “guestproperty” commands allow you to get or set properties of a running virtual machine. Please see chapter 4.9, Guest properties, page 72 for an introduction. As explained there, guest properties are arbitrary key/value string pairs which can be written to and read from by either the guest or the host, so they can be used as a low-volume communication channel for strings, provided that a guest is running and has the Guest Additions installed. In addition, a number of values whose keys begin with “/VirtualBox/“ are automatically set and maintained by the Guest Additions.

The following subcommands are available (where <vm>, in each case, can either be a VM name or a VM UUID, as with the other VBoxManage commands):

enumerate <vm> [-patterns <pattern>]: This lists all the guest prop- erties that are available for the given VM, including the value. This list will be very limited if the guest’s service process cannot be contacted, e.g. because the VM is not running or the Guest Additions are not installed.

If --patterns <pattern> is specified, it acts as a filter to only list properties that match the given pattern. The pattern can contain the following wildcard characters:

* (asterisk): represents any number of characters; for example, “/VirtualBox*“ would match all properties beginning with “/VirtualBox”.

? (question mark): represents a single arbitrary character; for example, “fo?“ would match both “foo” and “for”.

(pipe symbol): can be used to specify multiple alternative patterns; for example, “s*t*“ would match anything starting with either “s” or “t”.

get <vm>: This retrieves the value of a single property only. If the property cannot be found (e.g. because the guest is not running), this will print “No value set¡‘.

set <vm> <property> [<value> [-flags <flags>]]: This allows you to set a guest property by specifying the key and value. If <value> is

124

Page 124
Image 124
Sun Microsystems 3.0.0 user manual VBoxManage guestproperty