qemu-init

Some tools to make life with qemu more comfortable

User Tools

Site Tools



qemu-adm

 qemu-adm  is the administration tool of qemu-init. It is designed to do all the tasks which are implemented in the (external) libraries of qemu-init.

Synopsis:     qemu-adm action [<name>] [options] 

 action  is one action with argument  <name>  (which is the unique identifier of a virtual machine).  options  are one or multiple getopt style parameters depending on  action . See  man qemu-adm .

Examples

We use pluto as <name> (unique identifier) in the examples below.

Register a virtual machine

To register a virtual machine located in  /path/to/vm  run

 $> qemu-adm -r /path/to/vm/pluto [-f]

Afterwards the virtual machine could be called by it's name “pluto”. Inside the folder  /path/to/vm  the files pluto-qemud.rc (rc-file), pluto-qemu.cfg (cfg-file) and optional (-f) a default (empty) disk image pluto-qemu.img will be created if not exists. The folder will be created if not exists.

Un-register a virtual machine

The opposite is to un-register a virtual machine:

 $> qemu-adm -u pluto 

This action removes pluto from registered virtual machines. It does not remove any files!

Start a virtual machine

 $> qemu-adm -S pluto

Similar  -D  stops a and  -R  restarts a virtual machine.

Change AUTOSTART option

This command reverts the autostart option of pluto (used by qemud):

 $> qemu-adm -a pluto

If AUTOSTART is OFF it will be set to ON and vice versa. This option requires root privileges.

List registered virtual machines

To show all registered machines run:

 $> qemu-adm -l

Show status

This shows the actual status of a virtual machine:

 $> qemu-adm -s pluto

If the virtual machine is up and running the actual runtime configuration will be printed additional.

To get the status of all registered virtual machines run:

 $> qemu-adm -s [all]

This executes internal  sudo qemud status  - thus the user have to be in the qemu-init group (default:  kvm ).

Remote access

qemu-init is designed to work at the host system local only. For remote access  ssh  is recommended. More complex commands needs to be quoted properly. Example:

 $> ssh <remote_host> 'qemu-adm -c "info name" pluto'

Especially a remote connection to the monitor requires that  ssh  have to be used with the  -t  option.

 $> ssh -t <remote_host> 'qemu-adm -m pluto'

It is important to use  ssh -t  here to be able to pipe  CTRL-C  through the  ssh  command (to disconnect from the monitor)!

Last modified: 2020/08/27 11:22

Page Tools