| 1 |
--- |
| 2 |
date: July 2026 |
| 3 |
section: 1 |
| 4 |
title: QEMU-WEB-DESKTOP.PL |
| 5 |
--- |
| 6 |
|
| 7 |
# NAME |
| 8 |
|
| 9 |
qemu-web-desktop.pl - control qemu-web-desktop |
| 10 |
|
| 11 |
# SYNOPSIS |
| 12 |
|
| 13 |
**qwdctl** \[*help\|download\|refresh\|status\|start |
| 14 |
VM\|stop\|gpu\|gpu-unlock\|enable\|disable\|purge\|edit*\] \... |
| 15 |
|
| 16 |
# DESCRIPTION |
| 17 |
|
| 18 |
> controls the availability of virtual machines for the |
| 19 |
> qemu-web-desktop. In addition, the status of the running sessions can |
| 20 |
> be displayed and it is possible to start virtual machines manually and |
| 21 |
> display them in a browser. |
| 22 |
|
| 23 |
## OPTIONS: |
| 24 |
|
| 25 |
**\--help**\|help\|-h |
| 26 |
|
| 27 |
> show this help. |
| 28 |
|
| 29 |
**\--disable**\|disable VM\|one-shot\|gpu |
| 30 |
|
| 31 |
> deactivate a \[VM\] entry. \'qwdctl **\--disable** one-shot\' disables |
| 32 |
> the one-shot section in |
| 33 |
> */usr/share/qemu-web-desktop/html/desktop/index.html*. \'qwdctl |
| 34 |
> **\--disable** gpu\' disables the GPU support (same as |
| 35 |
> **\--gpu-unlock**). |
| 36 |
|
| 37 |
**\--download**\|download\|update |
| 38 |
|
| 39 |
> scan the */etc/qemu-web-desktop/machines.conf* file for \[name.ext\] |
| 40 |
> and download them when URL are given. a \'qwdctl **\--refresh**\' is |
| 41 |
> then performed. Virtual machine images are stored into |
| 42 |
> */var/lib/qemu-web-desktop/machines*. Additional machine descriptions |
| 43 |
> can be given in */etc/qemu-web-desktop/config*.d/\*.ini files. |
| 44 |
|
| 45 |
**\--edit**\|edit \[machines\|config\|web\|VM\] |
| 46 |
|
| 47 |
> edit the machines list, the service configuration file or the service |
| 48 |
> web page. In the case of the machines list, the \'qwdctl |
| 49 |
> **\--download**\' command is triggered automatically after edit. When |
| 50 |
> given a VM name, the file holding the \[VM\] entry is edited. Set the |
| 51 |
> \$EDITOR variable to select the text editor to use. In case the |
| 52 |
> \'qwdctl edit machines\' has no effect on the index.html service |
| 53 |
> landing page, specify set \'QWDCTL_INSERT=yes\' or option |
| 54 |
> **\--machine-insert**. It is recommended to use the **\--enable** and |
| 55 |
> **\--disable** to manage the VM/machine list. |
| 56 |
|
| 57 |
**\--enable**\|enable VM\|FILE\|URL\|one-shot\|gpu {\'DESCRIPTION\'} |
| 58 |
|
| 59 |
> add or (re)activate a \[VM\] entry, file or URL. Optional description |
| 60 |
> is given as a string. \'qwdctl **\--enable** one-shot\' activates the |
| 61 |
> one-shot section in |
| 62 |
> */usr/share/qemu-web-desktop/html/desktop/index.html*. \'qwdctl |
| 63 |
> **\--enable** gpu\' activates the GPU support (same as **\--gpu**). |
| 64 |
|
| 65 |
**\--gpu**\|gpu VENDOR:MODEL |
| 66 |
|
| 67 |
> configure GPU for pass-through. The GPU_ids are e.g. \'10de:1d01\'. |
| 68 |
|
| 69 |
**\--gpu-unlock**\|gpu-unlock |
| 70 |
|
| 71 |
> unlock/re-attach all GPU\'s to server (uninstall pass-through). |
| 72 |
|
| 73 |
**\--machine-insert** |
| 74 |
|
| 75 |
> used with **\--download**/\--refresh, force to modify the |
| 76 |
> */usr/share/qemu-web-desktop/html/desktop/index.html* landing page |
| 77 |
> instead of using an include. Same as QWDCTL_INSERT=yes shell variable. |
| 78 |
|
| 79 |
**\--refresh**\|refresh |
| 80 |
|
| 81 |
> scan the */etc/qemu-web-desktop/machines.conf* file, and generate the |
| 82 |
> */var/lib/qemu-web-desktop/machines.html* that lists available images |
| 83 |
> to show in the qemu-web-desktop main form. Additional machine |
| 84 |
> descriptions can be given in */etc/qemu-web-desktop/config*.d/\*.ini |
| 85 |
> files. |
| 86 |
|
| 87 |
**\--status**\|status |
| 88 |
|
| 89 |
> list running sessions, as well as enabled and disabled machines. |
| 90 |
|
| 91 |
**\--start**\|start VM \... |
| 92 |
|
| 93 |
> start the given VM or ISO file (full path) in a browser. Connect to it |
| 94 |
> with the displayed URL. Further arguments are passed to the service |
| 95 |
> (see config.pl) e.g. **\--snapshot_alloc_mem**=*1* (in GB) and |
| 96 |
> **\--snapshot_alloc_cpu**=*2*. Changes are lost except when specifying |
| 97 |
> option **\--snapshot_use_master**=*1*, requiring write access. When |
| 98 |
> running ISO\'s you may also specify **\--snapshot_alloc_disk**=*40* |
| 99 |
> (in GB). Use \'qwdctl **\--start**\' to get the full list of default |
| 100 |
> VM settings. |
| 101 |
|
| 102 |
**\--stop**\|stop TOKEN |
| 103 |
|
| 104 |
> stop sessions matching TOKEN. Some snapshot files may be left-over. |
| 105 |
|
| 106 |
**\--purge**\|purge {VMNAME} |
| 107 |
|
| 108 |
> remove VM files which are inactive and not used. When VM argument is |
| 109 |
> given, only files starting by \'VM\' are checked. |
| 110 |
|
| 111 |
**\--version**\|version\|-v |
| 112 |
|
| 113 |
> show qwdctl version. |
| 114 |
|
| 115 |
**\--yes**\|-y |
| 116 |
|
| 117 |
> assume yes to questions. Same as QWDCTL_YES=1 shell variable. |
| 118 |
|
| 119 |
## AUTHOR: |
| 120 |
|
| 121 |
> Written by Roland Mas and Emmanuel Farhi. |
| 122 |
|
| 123 |
## FILES: |
| 124 |
|
| 125 |
> The QWD service configuration is defined in: - |
| 126 |
> */etc/qemu-web-desktop/config.pl* - |
| 127 |
> */etc/qemu-web-desktop/config*.d/\*.pl |
| 128 |
|
| 129 |
> The QWD available VM\'s are defined in: - |
| 130 |
> */var/lib/qemu-web-desktop/machines* - |
| 131 |
> */etc/qemu-web-desktop/machines.conf* - |
| 132 |
> */etc/qemu-web-desktop/config*.d/\*.ini Entries should contain lines: |
| 133 |
|
| 134 |
> \[name.ext or URL\] description=\<name of machine to appear in the |
| 135 |
> form\> |
| 136 |
|
| 137 |
> In addition, any line with: |
| 138 |
|
| 139 |
> url=\<link\> |
| 140 |
|
| 141 |
> will retrieve the given file with: qwdctl download When the |
| 142 |
> description is missing, the VM file name is used. Supported virtual |
| 143 |
> machine formats: ISO, QCOW2, VDI, VMDK, RAW, VHD/VHDX, QED |
| 144 |
|
| 145 |
> The QWD landing/login page is in: - |
| 146 |
> */usr/share/qemu-web-desktop/html/desktop/index.html* - |
| 147 |
> */var/lib/qemu-web-desktop/machines.html* |
| 148 |
|
| 149 |
> The QWD service script is in: - |
| 150 |
> */home/farhi/src/qemu-web-desktop.gitlab/cgi-bin/qemu-web-desktop.pl* |
| 151 |
|
| 152 |
> \- |
| 153 |
> https://gitlab.com/soleil-data-treatment/soleil-software-projects/qemu-web-desktop |
| 154 |
|
| 155 |
## ENVIRONMENT VARIABLES: |
| 156 |
|
| 157 |
EDITOR |
| 158 |
|
| 159 |
: Set the text editor to use, e.g. nano. Default is to use \'nano\' or |
| 160 |
\$EDITOR. |
| 161 |
|
| 162 |
QWDCTL_INSERT=yes is equivalent to setting **\--machine-insert**. |
| 163 |
QWDCTL_YES=1 is equivalent to setting **\--yes** (skip confirm). |
| 164 |
|
| 165 |
# AUTHOR |
| 166 |
|
| 167 |
Written by Emmanuel Farhi \<[email protected]\> |
| 168 |
|
| 169 |
# COPYRIGHT |
| 170 |
|
| 171 |
Copyright © 2020- Synchrotron Soleil, AGPL3.\ |
| 172 |
This is free software; see the source for copying conditions. There is |
| 173 |
NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR |
| 174 |
PURPOSE. |
| 175 |
|
| 176 |
# SEE ALSO |
| 177 |
|
| 178 |
The full documentation for **qemu-web-desktop.pl** is maintained as a |
| 179 |
Texinfo manual. If the **info** and **qemu-web-desktop.pl** programs are |
| 180 |
properly installed at your site, the command |
| 181 |
|
| 182 |
> **info qemu-web-desktop.pl** |
| 183 |
|
| 184 |
should give you access to the complete manual. |