# Basic Administration
# Copy files from dom0 to domU (qubes)
qvm-copy-to-vm
# Copy files between domU (qubes)
qvm-copy
# Execute a command in minimal qubes as root
In minimal template, only user user is created, without any kind of
right. To install/upgrade software or configure sudo you will need
to have shell with root access. Here an example:
qube=debian-11-minimal
qvm-run --user=root ${qube} xterm
# or with short flags -u
# qvm-run -u root ${qube} xterm
# Xen Store
Xen store is a shared environment between virtual machines (qubes).
# Dom0 view
xenstore-ls
xenstore-read
xenstore-write
# DomU view
# return local vm information based on uuid
xenstore-ls /vm/${uuid}
# return global domain information
xenstore-ls /local/domain/${domain}
# return vbd information
xenstore-ls /local/domain/${vbd}/backend/vif/${domain}/0
# information can be read/write using:
xenstore-read
xenstore-write
# Qubesdb
Qubesdb is an interface to xenstore, it gives you all required
information by using only / key without looking for other
keys/values in the store. You can get ip address, netmask or gateway.
qubesdb-list /
qubesdb-read /type
qubesdb-read /qubes-ip
qubesdb-read /qubes-netmask
# Network Administration
# Restarting Networking
Network interfaces are isolated from other qubes in dedicated virtual
machine called sys-net. Sometime, wireless interfaces can be stuck
due to NetworkManager application. In this case, you can run this
command to restart the service from dom0:
qvm-run -u root sys-net "systemctl restart NetworkManager"
This will also restart XFCE widgets and should solve simple network issues.
# Local Network Script with rc.local
You can set a local network configuration using /rw/rc.local. This
script will be executed at startup ONLY for your current qubes.
# set network stack
ip set link dev eth0 up
qubesdb-read /qubes-ip \
| xargs -I%d ip address add %d/32 dev eth0
qubesdb-read /qubes-gateway\
| xargs -I%g \
sh -c 'ip route add %g dev eth0 scope link; \
ip route add default via %g'
# Global Network Script with rc.local
You can also enable /etc/rc.local with systemd. Take the previous
script and enable it following this procedure:
chmod +x /etc/rc.local
systemctl daemon-reload
systemctl start rc-local
systemctl enable rc-local
# Upgrading QubeOS
TODO
# Building QubeOS
TODO
# Programming QubeOS
TODO
# Creating Template
# Creating Ubuntu Template
Note: you will need to execute these commands in a qube set with fedora.
# install required dependencies
dnf install gnupg git createrepo rpm-build make wget rpmdevtools python3-sh dialog rpm-sign dpkg-dev debootstrap python3-pyyaml devscripts perl-Digest-MD5 perl-Digest-SHA
# clone qubes-builder repository from QubeOS official repository
git clone https://github.com/QubesOS/qubes-builder
cd qubes-builder
# install dependencies
./setup
make install-deps
make get-sources
make qubes-vm
make template
You will need to edit few of the generated packages due to missing
dependencies. In my case, qubes-src/meta-packages/debian/control
required to be edited and some dependencies needed to be removed.
It is now possible to install this template on dom0.
qubes-src/meta-packages/debian/control
- https://www.qubes-os.org/doc/templates/ (opens new window)
- https://www.qubes-os.org/doc/template-implementation/ (opens new window)
- https://www.qubes-os.org/doc/disposable-customization/ (opens new window)
# Creating Minimal Templates
# Alpine Linux Template
TODO
# Void Linux Template
TODO
# Upgrade
# 4.1 to 4.2
No big problem, just took a while (~2h)
# FAQ
# How to set a disposable VM?
You can set it directly from Qube Manager in advanced section or use
qvm-prefs commands.
# How to start a disposable VM from another VM?
qvm-run-vm --disp ${disp_vm} xterm
# How to start a disposable VM from Dom0?
qvm-run --disp ${disp_vm} xterm
# Where are XFCE menu items stored?
Menu items are stored in dom0 in ${HOME}/.local directory. You can
find all elements from XFCE stored there.
# Where can I find template repository?
Official Repository: https://yum.qubes-os.org/ (opens new window)
Official repository (tor): http://yum.qubesosfasa4zl44o4tws22di6kepyzfeqv3tg4e3ztknltfxqrymdad.onion/ (opens new window)