8 VBoxManage 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.32 VBoxManage hostonlyif With “hostonlyif” you can change the IP configuration of a host-only network interface. For a description of host-only networking, please refer to chapter 6.6, Host-only networking, page 88. Each host-only interface is identified by a name and can either use the internal DHCP server or a manual IP configuration (both IP4 and IP6). 8.33 VBoxManage dhcpserver The “dhcpserver” commands allow you to control the DHCP server that is built into VirtualBox. You may find this useful when using internal or host-only networking. (Theoretically, you can enable it for a bridged network as well, but that will likely cause conflicts with other DHCP servers in your physical network.) Use the following command line options: If you use internal networking for a virtual network adapter of a virtual machine, use VBoxManage dhcpserver add --netname network_name, where network_name is the same network name you used with VBoxManage modifyvm vmname --intnetX network_name. If you use host-only networking for a virtual network adapter of a virtual machine, use VBoxManage dhcpserver add --ifname hostonly_if_name instead, where hostonly_if_name is the same host-only interface name you used with VBoxManage modifyvm vmname --hostonlyadapterX hostonly_if_name. Alternatively, you can also use the –netname option as with internal networks if you know the host-only network’s name you can see the names with VBoxManage list hostonlyifs (see chapter 8.3, VBoxManage list, page 106 above). The following additional parameters are required when first adding a DHCP server: With --ip, specify the IP address of the DHCP server itself. With --netmask, specify the netmask of the network. With --lowerip and --upperip, you can specify the lowest and highest IP address, re- spectively, that the DHCP server will hand out to clients. Finally, you must specify --enable or the DHCP server will be created in the disabled state, doing nothing. After this, VirtualBox will automatically start the DHCP server for given internal or host-only network as soon as the first virtual machine which uses that network is started. Reversely, use VBoxManage dhcpserver remove with the given --netname network_name or --ifname hostonly_if_name to remove the DHCP server again for the given internal or host-only network. To modify the settings of a DHCP server created earlier with VBoxManage dhcpserver add, you can use VBoxManage dhcpserver modify for a given network or host-only interface name. 132
Previous Page Next Page