GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
BMD-PLUGIN-HOOKCMD(8) FreeBSD System Manager's Manual BMD-PLUGIN-HOOKCMD(8)

bmd-plugin-hookcmdSpawns command when VM state is changed.

The bmd-plugin-hookcmd spawns the specific command when VM's status is changed.

This plugin expands VM configuration and add the following parameters to specify which command is spawned/invoked.

command_path;
File path to the spawn command. The user/group ID of spawned command is as same as the owner/group of the VM.
command_path;
File path to the prestart command. The prestart command is invoked before starting the VM and delays starting it until the prestart command terminates.
command_path;
File path to the prestart command. The poststop command is invoked after the VM stopped. Cleaning up the VM resources will delay until the poststop command terminates.

The files of ‘prestart’ and ‘poststop’ must be owned by root. They are invoked as same uid/gid as the bmd(8) (root/wheel) and intended to setup OS specific envrionments such as routing, firewall, etc.

The spawned command receives following arguments in following order.

VM_name
The name of VM.
VM_state
The state of VM. One of these values.

The loader is invoked.
VM start running.
VM is terminated.
Before starting the VM.
After stopping the VM.

The VM configurations are exported to the following environment variables.

Virtual machine name.
Unique number for each individual VMs that starts from 0. Same as $ID in the predefined configuration variable.
Uid number of the owner.
Gid number of the group. ‘-1’ if it is not set.
Number of CPUs.
Number of cpu_pin definitions.
vcpu:hostcpu. Where ${n} starts from 1 to VM_NCPU_PINS.
Size of memory which is specified in memory value.
‘true’ or ‘false’.
‘true’ or ‘false’.
‘true’ or ‘false’.
‘true’ or ‘false’.
‘true’ or ‘false’.
Assigned com port device name.
Debug port number.
Boot type.
Delay time in seconds.
Loader timeout in seconds.
VM stop timeout in seconds.
Type of loader.
Path to the OS loader.
Number of ‘bhyveload_env’ s.
Bhyveload environment variable. Where ${n} starts from 1 to VM_NBHYVELOAD_ENVS.
Number of ‘bhyve_env’ s.
Bhyve environment variable. Where ${n} starts from 1 to VM_NBHYVE_ENVS.
Loadcmd value which is specified in the configuration file. This is not the value `bmdctl inspect` creates.
Installcmd value which is specified in the configuration file. This is not the value `bmdctl inspect` creates.
Err_logfile name.
‘none’ or ‘intel’ or ‘amd’.
Number of ‘passthru’ s.
Passthru device. Where ${n} starts from 1 to VM_NPASSTHRUES.
Tpm device name. This is set if specified.
Tpm device version. This is set if specified.
Number of ‘disk’ s.
Disk device type. Where ${n} starts from 1 to VM_NDISKS.
Disk device path. Where ${n} starts from 1 to VM_NDISKS.
Number of ‘iso’ s.
Iso device type. Where ${n} starts from 1 to VM_NISOES.
Iso device path. Where ${n} starts from 1 to VM_NISOES.
Number of ‘network’ s.
Network device type. Where ${n} starts from 1 to VM_NNETWORKS.
Assigned tap interface name or vale(4) port name. Where ${n} starts from 1 to VM_NNETWORKS.
Bridge interface name or vale(4) swtich name. Where ${n} starts from 1 to VM_NNETWORKS.
‘true’ or ‘false’.
Vnc listen address. This is set if VM_GRAPHICS is ‘true’.
Vnc port number. This is set if VM_GRAPHICS is ‘true’.
Vnc password. This is set if VM_GRAPHICS is ‘true’.
<width> x <height>. This is set if VM_GRAPHICS is ‘true’.
‘true’ or ‘false.’ This is set if VM_GRAPHICS is ‘true’.
‘true’ or ‘false.’ This is set if VM_GRAPHICS is ‘true’.

bmd(8), bmd.conf(5)

August 15, 2023 FreeBSD 14.3-RELEASE

Search for    or go to Top of page |  Section 8 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.