8 VBoxManage place. Otherwise the new filter will be added onto the end of the list. The target parameter selects the virtual machine that the filter should be attached to or use “global” to apply it to all virtual machines. name is a name for the new filter and for global filters, action says whether to allow machines access to devices that fit the filter description (“hold”) or not to give them access (“ignore”). In addition, you should specify parameters to filter by. You can find the parameters for devices attached to your system using VBoxManage list usbhost. Finally, you can specify whether the filter should be active, and for local filters, whether they are for local devices, remote (over an RDP connection) or either. When you modify a USB filter using usbfilter modify, you must specify the filter by in- dex (see the output of VBoxManage list usbfilters to find global filter indexes and that of VBoxManage showvminfo to find indexes for individual machines) and by target, which is ei- ther a virtual machine or “global”. The properties which can be changed are the same as for usbfilter add. To remove a filter, use usbfilter remove and specify the index and the tar- get. 8.27 VBoxManage sharedfolder add/remove This command allows you to share folders on the host computer with guest operating systems. For this, the guest systems must have a version of the VirtualBox Guest Additions installed which supports this functionality. Shared folders are described in detail in chapter 4.3, Shared folders, page 62. 8.28 VBoxManage guestproperty The “guestproperty” commands allow you to get or set properties of a running virtual machine. Please see chapter 4.6, Guest properties, page 66 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 properties 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 omitted, the property is deleted. 126
Previous Page Next Page