Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
BVM(8)			FreeBSD	System Manager's Manual			BVM(8)

NAME
     bvm -- Bhyve Virtual machines Management tool

SYNOPSIS
     bvm --help
     bvm --version

     bvm --create name
     bvm --config name
     bvm --vminfo name
     bvm --os

     bvm --ls [byname|byos|bystatus]
     bvm --ll [byname|byip|byos|bystatus]
     bvm --login name
     bvm --start name
     bvm --restart name
     bvm --stop	name
     bvm --poweroff name

     bvm --clone name new-name
     bvm --remove name
     bvm --rename name new-name

     bvm --lock	name
     bvm --unlock name
     bvm --lockall
     bvm --unlockall

     bvm --addisk name
     bvm --deldisk name

     bvm --abinfo
     bvm --autoboot

     bvm --reload-nat

     bvm --setnat Nat ip/mask
     bvm --setsw Switch	ip/mask
     bvm --unsetsw Switch

     bvm --setpr ip
     bvm --showpr

     bvm --showdev
     bvm --showdevuse
     bvm --showdevall

     bvm --snapshot name
     bvm --rollback name
     bvm --showsnap name
     bvm --showsnapall

DESCRIPTION
     The bvm is	a bhyve(8) virtual machine management tool based on FreeBSD
     that allows you to	easily manage virtual machines.

     The virtual machine's network is handled by one or	more virtual switches.
     Each switch has a simple name, which is stored in the corresponding con-
     figuration	file and can be	modified by the	bvm create one or more
     bridge(4) devices for each	virtual	switch and dynamically assign them to
     the virtual machine tap(4)	interface. When	the virtual machine is shut
     down normally, the	bvm will automatically clean up	the useless network
     devices.

     The bvm supports multiple network cards and multiple hard disks.  Each
     virtual machine can have multiple network cards or	multiple hard disks,
     and can easily add, delete, and modify network cards or hard disks.

BASIC SETUP
     Once bvm is installed, the	first thing you	have to	do is set up the vir-
     tual machine's storage directory.

     Edit the value of vmdir in	/usr/local/etc/bvm/bvm.conf

	   vmdir=/your/vm/dir/

     If	you want to automatically boot the specified list of virtual machines
     in	order while the	host is	booting, add the following lines to
     /etc/rc.conf to enable:

	   bvmd_enable="YES"

OPTIONS
     --abinfo
	     Show information for all auto-bootstrap virtual machines.

     --addisk name
	     Add a hard	disk to	the virtual machine.

     --autoboot
	     Start the automatic booting virtual machine in order.  Boot op-
	     tion, which is usually not	required in administrator manual main-
	     tenance mode. Sometimes the host is powered on again after	shut-
	     down or unexpected	downtime.  At this time, the administrator-set
	     virtual machine can be automatically started by the rc script.
	     The method	is to use bvm --config to modify the default value of
	     the auto boot menu	to yes.

	     In	self-start mode, bvm will refer	to the boot level and delay
	     options of	vm. The	boot level is the boot priority. When there
	     are multiple self-starting	virtual	machines, the lower the
	     startup priority, the more	the virtual machine starts.  Back to
	     front. Boot time (boot time) After	starting the current virtual
	     machine, it can also be said that the number of seconds is	tenta-
	     tive before starting the next virtual machine.  The reason	for
	     designing these two parameters is because some services may need
	     to	be activated first to ensure normal business.

	     For example, the relationship between the database	and the	web
	     service, if the data virtual machine library is not prioritized,
	     it	may cause the web service to be	abnormal!

	     The correct way to	use this option	is to add the startup script:

		   # syrc bvmd_enable=yes

     --clone name new-name
	     Clone a new virtual machine from an existing virtual machine.

     --config name
	     Edit the configuration of the virtual machine.  This option needs
	     to	be used	in the case of a virtual machine. Options that allow
	     users to configure	independently are: cpus, ram, iso path,	boot
	     from, hostbridge, uefi, auto boot,	disk config, and network con-
	     fig.

	     cpus		The number of CPUs (non-cores) used by the
				current	virtual	machine.

	     ram		The size of the	memory requested by the	cur-
				rent virtual machine, the unit of which	can be
				M/G, etc.

	     iso path		The directory where the	iso disc image is lo-
				cated (is the directory, non-iso absolute ad-
				dress).	When the directory is specified, bvm
				will automatically list	the iso	files con-
				tained in the current directory.  The user can
				select the menu	number.

	     boot from		This is	an important option. When the system
				is first installed, bvm	will automatically ad-
				just this option to hd0	for system startup.
				When you need to use iso disc for system main-
				tenance, you can change	this option to cd0.

	     uefi		This option is mostly used by the operating
				system that installs the graphical interface.
				It needs to be used with VNC to	get the	desk-
				top. In	addition, this option will invalidate
				the --login option because --login is a	text
				console	and does not have graphical interface
				operating conditions.

	     auto boot		See --autoboot for details.

	     hostbridge		This is	a schema attribute whose attribute
				value should be	hostbridge when	using the In-
				tel system CPU;	its attribute value should be
				amd_hostbridge when using the AMD series CPU.

	     disk config	The option can add or delete the hard disk of
				the current virtual machine.  If you only want
				to add the hard	disk, it is recommended	to use
				bvm --addisk shortcut command.

	     network config	This option allows you to configure the	net-
				working	or networking of virtual machines.

     --create name
	     Create a new virtual machine.

     --deldisk name
	     Delete the	disks in the virtual machine.

     --help  Show all options and descriptions.

     --login name
	     Login to a	running	virtual	machine	from console, the boot loader
	     of	this virtual machine must be grub, and the uefi	mode needs to
	     log in using the VNC client.

     --ls [byname|byos|bystatus]
	     Show a list and status of all virtual machines.  By default, the
	     output is sorted in ascending order by name, or one of the	fol-
	     lowing options is specified.

	     byname		Output list in ascending order by name.

	     byos		Output list in ascending order by OS.

	     bystatus		Output list in ascending order by virtual ma-
				chine status.

		   # bvm --ls byos
		   NAME	       GUEST	       CPU     MEMORY  DISK	   STATE
		   c	       Debian	       1       512M    [2]5.5G	   off
		   d	       Debian	       1       512M    [1]5G	   off *
		   abc	       Debian	       1       512M    [1]10G	   on
		   b	       FreeBSD	       1       1G      [1]10G	   off
		   bb	       FreeBSD	       1       1G      [1]10G	   off

		   # bvm --ls
		   NAME	       GUEST	       CPU     MEMORY  DISK	   STATE
		   abc	       Debian	       1       512M    [1]10G	   on
		   b	       FreeBSD	       1       1G      [1]10G	   off
		   bb	       FreeBSD	       1       1G      [1]10G	   off
		   c	       Debian	       1       512M    [2]5.5G	   off
		   d	       Debian	       1       512M    [1]5G	   off *

	     The meaning of the	list items is as follows:

	     NAME		The name of the	virtual	machine.

	     GUEST		Virtual	machine	operating system.

	     CPU		Number of CPUs.

	     MEMORY		Size of	memory.

	     DISK		Disk capacity, the number in square brackets
				represents the number of disks,	and the	capac-
				ity is the sum of all disk capacities.

	     STATE		The state of the virtual machine, off or on,
				if the virtual machine is locked, a symbol '*'
				is also	displayed.

     --ll [byname|byip|byos|bystatus]
	     Show a list and status of all virtual machines in long format.
	     By	default, the output is sorted in ascending order by name, or
	     one of the	following options is specified.

	     byname		Output list in ascending order by name.

	     byip		Output list in ascending order by IP-addr.

	     byos		Output list in ascending order by OS.

	     bystatus		Output list in ascending order by virtual ma-
				chine status.

	     The added list items have the following meanings:

	     IP			The IP address of the virtual machine.

	     LOADER		The boot loader	for the	virtual	machine.

	     AUTOSTART		The state in which the virtual machine is au-
				tomatically started, "Yes" is automatically
				started, and the number	next to	it is the
				startup	sequence.

     --lock name
	     Locks the specified virtual machine, and can't --config ,
	     --remove ,	--start	, and so on.  Only simple read operations can
	     be	performed, such	as --vminfo , --ls , this option also prevents
	     the risk of virtual machine files being accidentally deleted.

     --lockall
	     Lock all virtual machines,	behaving the same as --lock.

     --os    Show a list of operating systems supported	by bvm.

     --poweroff	name
	     Force the virtual machine to power	off. When there	are some spe-
	     cial reasons that prevent the virtual machine from	shutting down
	     properly, you need	to use this option to force the	virtual	ma-
	     chine to power off.

     --reload-nat
	     Reload the	NAT port redirect. In general, you do not need to use
	     this option, bvm will automatically handle	port redirection, this
	     option is manual mode.

     --remove name
	     Destroy a virtual machine and it cannot be	recovered.  Note that
	     the virtual machine cannot	be running when	you run	this command.

     --rename name new-name
	     Rename the	virtual	machine.

     --restart name
	     Restart a virtual machine.

     --rollback	name
	     Roll back to the snapshot point.

     --setnat nat ip/mask
	     Set the IP	address	and mask of the	NAT.

		   # bvm --setnat nat0 172.16.1.1/24

     --setpr ip
	     Port redirection is set dynamically with immediate	effect.	 In
	     general, the virtual machine must be turned off to	set the	vir-
	     tual machine parameters, but this option can set the port redi-
	     rection at	any time in the	virtual	machine	on state, and take ef-
	     fect immediately.

		   # bvm --setpr 10.10.30.10

     --showpr
	     Show all list of port redirect.

		   # bvm --showpr
		   udp 192.168.1.254:53	   -> 9953 abc
		   tcp 10.10.30.10:22	   -> 3322 guo
		   tcp 172.16.1.3:622	   -> 2224 fb
		   tcp 172.16.1.3:80	   -> 8888 fb
		   tcp 172.16.1.3:23	   -> 2003 fb

     --setsw switch ip/mask
	     Set the ip	address	and mask of the	virtual	switch.	 The same
	     method as --setnat.

     --showdev
	     Select a network device and show its relationship to the virtual
	     machine NIC.

     --showdevall
	     Show a relationship table for all network devices.

     --showdevuse
	     Show a relational table of	all network devices in use.

     --showsnap	name
	     Show snapshots list of the	virtual	machine.

     --showsnapall
	     Show snapshots list of the	all virtual machines.

     --snapshot	name
	     Generating	snapshots for the virtual machine.

     --start name
	     Start a virtual machine.

     --stop name
	     Shut down a virtual machine.

     --unlock name
	     Unlock a virtual machine.

     --unlockall
	     Unlock all	virtual	machines.

     --unsetsw switch
	     Delete the	IP address of the virtual switch.

     --version
	     Show the version number of	bvm installed.

     --vminfo name
	     Shows the configuration of	the virtual machine.

CONFIGURE FILES
     /usr/local/etc/bvm/bvm.conf

	   This	file records the virtual machine's directory and a list	of all supported
	   operating systems.

     /usr/local/etc/bvm/nat.conf

	   This	file records the configuration information for all NAT.

	   nat0=172.16.1.1/24
	   nat1=10.10.30.1/24
	   nat2=192.168.1.1/24

     /usr/local/etc/bvm/switch.conf

	   This	file records the configuration information of all virtual switches.
	   The default 0-2 sets	the IP address,	and 3-7	is not set.

	   switch0=10.0.1.0/24
	   switch1=10.0.2.0/24
	   switch2=10.0.3.0/24
	   switch3=
	   switch4=
	   switch5=
	   switch6=
	   switch7=

SEE ALSO
     tmux(1), bridge(4), tap(4), bhyve(8), bhyveload(8), zfs(8)

BUGS
     Please report all bugs/issues/feature requests to the GitHub project at
     https://github.com/bigdragonsoft/bvm

AUTHORS
     Qiang Guo <guoqiang_cn@126.com>

FreeBSD	13.0		       February	27, 2019		  FreeBSD 13.0

NAME | SYNOPSIS | DESCRIPTION | BASIC SETUP | OPTIONS | CONFIGURE FILES | SEE ALSO | BUGS | AUTHORS

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=bvm&sektion=8&manpath=FreeBSD+13.0-RELEASE+and+Ports>

home | help