qemu-init

Some tools to make life with qemu more comfortable

User Tools

Site Tools


qemu-init library

The qemu-init package consists by the user tools qemu-adm and qemud. Both requires some programs which are not indented to be called directly. These library tools are described below shortly. For details refer to the related man pages.

Some functions will fail if these library tools will be invoked directly! This is desired behavior!

qemu-init

 qemu-init  is an enhanced boot script library.

The synopsis is:     qemu-init <name> [ start | stop | restart | status | config ] 

 <name>  is the unique identifier of a virtual machine, followed by on of the actions (see man qemu-init(8)).


qemu-cmd

 qemu-cmd  executes a qemu monitor command and exits.

The synopsis is:     qemu-cmd [ -q | -4 ] -c command <name> 

 <name>  is the unique identifier of a virtual machine,  command  is a qemu monitor command. If  command  contains spaces it have to be quoted properly.

Options:

  • -c command        execute an instruction of monitor given by command
  • -4                        Force usage of IPv4. By default  qemu-cmd  uses IPv6 and falls back to IPv4 on failure.
  • -q                        Be quiet. This option suppresses any output and could be useful in scripts

Examples: To get the name of a virtual machine called “pluto”:

$> qemu-cmd -c "info name" pluto
Pluto (Debian 8.7 Jessie)
$>

The output of  qemu-cmd  could be more qualified by piping it through grep. Example:

$> qemu-cmd -c info\ chardev | grep monitor | grep -v QEMU | sort
compat_monitor0: filename=disconnected:tcp:127.0.0.1:30320,server
compat_monitor1: filename=disconnected:tcp:::1:30320,server
compat_monitor2: filename=disconnected:tcp:127.0.0.1:30420,server
compat_monitor3: filename=tcp:[::1]:30420,server <-> [::1]:49590
$>

qemu-mon

 qemu-mon  connects to the qemu monitor of a virtual machine via tcp socket.

The synopsis is:     qemu-mon <name> 

 qemu-mon  is intended to administrate a virtual machine using the qemu monitor.

Attention! The qemu monitor command  quit  is dangerous! To exit the qemu monitor press  CTRL-C !

Example:

$> qemu-mon pluto
Connected! Press CTRL-C to exit qemu-monitor!
QEMU 2.11.0 monitor - type 'help' for more information
(qemu)

qemu-init doesn't use (a common)  telnet  program to connect! The  CTRL-C  disconnects from the monitor without killing the virtual machine.


qemu-vnc

 qemu-vnc  handles qemu-init vnc connections.

The synopsis is:     qemu-vnc [ -l | <name> ] 

Without any parameter  qemu-vnc  updates the temporarily list of running qemu-init vnc servers. If  <name>  is a virtual machine with vnc enabled,  qemu-vnc  starts a vncviewer for  <name>  - for sure only, if the preconditions to to so are fulfilled.

Options:

  • -l        list running qemu-init vnc servers

Do NOT confound the library tool  qemu-vnc  with the Windows VNC client.


qemu-netif

 qemu-netif  is a script to bring up a tap device and link it to a network bridge and vice versa. The symlinks  qemu-brup  and  qemu-brdown  are used by the network scripts option of qemu.

qtcpclient and qtcpconn-io

Both are forked from ucspi-tcp-0.88 and will be used for the communication with the qemu monitor tcp socket through qemu-mon .  qtcpclient  connects to the qemu monitor and calls  qtcpconn-io  to send and receive data.

Last modified: 2020/03/08 11:22

Page Tools