qemu-init

A virtual machine manager to make life with qemu more comfortable

User Tools

Site Tools


Overview: files
Basic configuration (rc-file)        Advanced configuration (cfg-file)


qemu-init files

This is the same content like the man page qemu-init(5). See naming conventions for abbreviations.


qemu-init(5)

October 9, 2021

NAME

qemu-init configuration, status and other files.

TERMS

The term  qemu-init  is the name of the package. It is NOT related to the library file  LIBDIR/qemud-init .

The term  <name>  is the unique identifier used to determine all files which belongs to one dedicated virtual machine called  <name> .

DESCRIPTION

 qemu-init  uses several files which could be classified. These files are described below:

CONFIG FILES

 qemu-init  uses several config files. Files in  ETCDIR  are global for  qemu-init . The files  <name>-qemud.rc  and  <name>-qemu.cfg  are specific for the related virtual machine  <name>  only.

 ETCDIR/registered \ This file contains all virtual machines registered by  qemu-adm  including the absolute path. Path is the location where all files which belongs to a registered virtual machine of  <name>  have to be located.

 ETCDIR/autostart \ This file contains all virtual machines which will be started automatically by  qemud .

 ETCDIR/vncoffset \ This file contains an offset for the first vnc port. The offset will be increased by 1 for each virtual machine with vnc enabled through  qemud-init . The number have to be in the first line. If the file doesn't exist the internal offset 50000 will be used.

 <name>-qemud.rc \ This file contains the default parameters of  qemu-init . It will be created at registration time. It MUST exist for each  <name> . The format is KEY=VALUE. All after an '#' will be treated as comment. Most of the entries will be converted and passed as option to qemu. Some entries does control the behavior of the virtual machine  <name> , used by  qemud-init  only:

 BOOTDELAY \ At boot time of the host it could be required to wait some time before a virtual machine  <name>  could be started w/o an error. The  BOOTDELAY  option delays the start of the virtual machine by n seconds. The start process of  <name>  will be put into the background.

 STOPDELAY \ The timeout in seconds  qemud-init  will wait that the virtual machine does shutdown (default: 40). Some times a clean shutdown can take longer. Increasing  STOPDELAY  prevents a false positive error. Values smaller than the default will be ignored.

 PRECMD, POSTCMD \ Some times it is required to run one or multiple commands immediately before a virtual machine starts ( PRECMD ) and/or after ( POSTCMD ) a virtual machine was started. These options could be used to define a single command or batch file to execute the necessary commands. Maybe an absolute path is required as well appropriate access rights.

A value will be executed with the 'exec' command of the shell (default: bash). Thus, batch files must not have the executable bit set. If some thing went wrong  qemud-init  continues and may or may not print an error message.

 <name>-qemu.cfg \ This file can contain additional qemu options not covered by  <name>-qemud.rc . It will be created at registration time. It must not exist for each  <name>  and/or it doesn't have to contain valid entries. The format is flexible to a great possible extent. However, all after a '#' will be treated as comment. Entries will be converted and passed as option to qemu.

 qemu options style \ The file contains qemu command line options only. The file shall be work with the  -readfile  option.

 qemu shell script style \ The file is a qemu start script. It shall start a virtual machine with  sh </path/to/><name>-qemu.cfg . Shell variables could be used as well trailing backslashes at the end of lines.

Some variations/combinations of the two styles are possible. This could break the usage at the command line outside of  qemud-init .

STATUS FILES

 VARDIR/vncstatus \ This file contains information of all running virtual machines which have  DISPLAY=“vnc”  set in  <name>-qemud.rc . It is a colon delimited v3 file. Fields:

 <name>:host:vncport 

Host is the fqdn of the \qemu host. vncport is the port where the internal qemu vnc server is listening. The vncport will be calculated based on the tcp port for monitor redirection.

TEMPLATE FILES

 ETCDIR/template-qemud.rc \ This file will be used to create  <name>-qemud.rc  by  qemu-adm  at registration time. Some default values will be set automatically.

 ETCDIR/template-qemu.cfg \ This file will be used to create  <name>-qemu.cfg  by  qemu-adm  at registration time. By default it contains commented lines only.

OTHER FILES

 sudo-qemud \ By design  qemu-init  requires some root privileges for operation. These privileges are granted here. Usually it will be installed in the sudoers.d directory.

 VARDIR/<name>-error.log \ To log errors on start up of a virtual machine  <name> . Doesn't exists if no error occurs.

AUTHOR

Kai Peter (©2017-present)

SEE ALSO:

qemu-init(7), qemu-adm(1), qemud-init(8), qemud-reg(8), qemud-vnc(8), qemud(8)