Add prompts to all code blocks with bash session

This commit is contained in:
qubedmaiska 2025-08-15 16:49:01 -04:00
parent b0395e618c
commit 2d2bcb06a6
No known key found for this signature in database
GPG key ID: 204BCE0FD52C0501
72 changed files with 513 additions and 497 deletions

View file

@ -30,7 +30,7 @@ In this example, we want to make ``/var/lib/tor`` persistent. Enter all of the f
.. code:: console
sudo mkdir -p /rw/config/qubes-bind-dirs.d
$ sudo mkdir -p /rw/config/qubes-bind-dirs.d
@ -38,7 +38,7 @@ In this example, we want to make ``/var/lib/tor`` persistent. Enter all of the f
.. code:: console
sudo touch /rw/config/qubes-bind-dirs.d/50_user.conf
$ sudo touch /rw/config/qubes-bind-dirs.d/50_user.conf
@ -56,7 +56,7 @@ In this example, we want to make ``/var/lib/tor`` persistent. Enter all of the f
.. code:: console
sudo mkdir -p /rw/bind-dirs/var/lib/tor
$ sudo mkdir -p /rw/bind-dirs/var/lib/tor
@ -157,7 +157,7 @@ To use this feature, first, enable it:
.. code:: console
qvm-service -e my-app-vm custom-persist
$ qvm-service -e my-app-vm custom-persist
@ -165,7 +165,7 @@ Then, configure a persistent directory with ``qvm-features``:
.. code:: console
qvm-features my-app-vm custom-persist.my_persistent_dir /var/my_persistent_dir
$ qvm-features my-app-vm custom-persist.my_persistent_dir /var/my_persistent_dir
@ -173,8 +173,8 @@ To re-enable ``/home`` and ``/usr/local`` persistence, just add them to the list
.. code:: console
qvm-features my-app-vm custom-persist.home /home
qvm-features my-app-vm custom-persist.usrlocal /usr/local
$ qvm-features my-app-vm custom-persist.home /home
$ qvm-features my-app-vm custom-persist.usrlocal /usr/local
@ -184,8 +184,8 @@ A user may want their bind-dirs to be automatically pre-created in ``/rw/bind-di
.. code:: console
qvm-features my-app-vm custom-persist.downloads dir:user:user:0755:/home/user/Downloads
qvm-features my-app-vm custom-persist.my_ssh_known_hosts_file file:user:user:0600:/home/user/.ssh/known_hosts
$ qvm-features my-app-vm custom-persist.downloads dir:user:user:0755:/home/user/Downloads
$ qvm-features my-app-vm custom-persist.my_ssh_known_hosts_file file:user:user:0600:/home/user/.ssh/known_hosts

View file

@ -95,11 +95,11 @@ To create one that has no PCI devices attached, such as for ``sys-firewall``:
.. code:: console
qvm-create -C DispVM -l green <SERVICE_QUBE>
qvm-prefs <SERVICE_QUBE> autostart true
qvm-prefs <SERVICE_QUBE> netvm <NET_QUBE>
qvm-prefs <SERVICE_QUBE> provides_network true
qvm-features <SERVICE_QUBE> appmenus-dispvm ''
$ qvm-create -C DispVM -l green <SERVICE_QUBE>
$ qvm-prefs <SERVICE_QUBE> autostart true
$ qvm-prefs <SERVICE_QUBE> netvm <NET_QUBE>
$ qvm-prefs <SERVICE_QUBE> provides_network true
$ qvm-features <SERVICE_QUBE> appmenus-dispvm ''
@ -111,13 +111,13 @@ To create one with a PCI device attached such as for ``sys-net`` or ``sys-usb``,
.. code:: console
qvm-create -C DispVM -l red <SERVICE_QUBE>
qvm-prefs <SERVICE_QUBE> virt_mode hvm
qvm-service <SERVICE_QUBE> meminfo-writer off
qvm-pci attach --persistent <SERVICE_QUBE> dom0:<BDF>
qvm-prefs <SERVICE_QUBE> autostart true
qvm-prefs <SERVICE_QUBE> netvm ''
qvm-features <SERVICE_QUBE> appmenus-dispvm ''
$ qvm-create -C DispVM -l red <SERVICE_QUBE>
$ qvm-prefs <SERVICE_QUBE> virt_mode hvm
$ qvm-service <SERVICE_QUBE> meminfo-writer off
$ qvm-pci attach --persistent <SERVICE_QUBE> dom0:<BDF>
$ qvm-prefs <SERVICE_QUBE> autostart true
$ qvm-prefs <SERVICE_QUBE> netvm ''
$ qvm-features <SERVICE_QUBE> appmenus-dispvm ''
@ -125,7 +125,7 @@ Optionally, if this disposable will also provide network access to other qubes:
.. code:: console
qvm-prefs <SERVICE_QUBE> provides_network true
$ qvm-prefs <SERVICE_QUBE> provides_network true
@ -133,7 +133,7 @@ Next, set the old service qubes autostart to false, and update any references
.. code:: console
qvm-prefs sys-firewall netvm <SERVICE_QUBE>
$ qvm-prefs sys-firewall netvm <SERVICE_QUBE>
@ -143,17 +143,17 @@ Here is an example of a complete ``sys-net`` replacement:
.. code:: console
qvm-create -C DispVM -l red sys-net2
qvm-prefs sys-net2 virt_mode hvm
qvm-service sys-net2 meminfo-writer off
qvm-pci attach --persistent sys-net2 dom0:00_1a.0
qvm-prefs sys-net2 autostart true
qvm-prefs sys-net2 netvm ''
qvm-features sys-net2 appmenus-dispvm ''
qvm-prefs sys-net2 provides_network true
qvm-prefs sys-net autostart false
qvm-prefs sys-firewall netvm sys-net2
qubes-prefs clockvm sys-net2
$ qvm-create -C DispVM -l red sys-net2
$ qvm-prefs sys-net2 virt_mode hvm
$ qvm-service sys-net2 meminfo-writer off
$ qvm-pci attach --persistent sys-net2 dom0:00_1a.0
$ qvm-prefs sys-net2 autostart true
$ qvm-prefs sys-net2 netvm ''
$ qvm-features sys-net2 appmenus-dispvm ''
$ qvm-prefs sys-net2 provides_network true
$ qvm-prefs sys-net autostart false
$ qvm-prefs sys-firewall netvm sys-net2
$ qubes-prefs clockvm sys-net2

View file

@ -16,8 +16,8 @@ To increase the minimum size of the video RAM buffer:
.. code:: console
qvm-features dom0 gui-videoram-min $(($WIDTH * $HEIGHT * 4 / 1024))
qvm-features dom0 gui-videoram-overhead 0
$ qvm-features dom0 gui-videoram-min $(($WIDTH * $HEIGHT * 4 / 1024))
$ qvm-features dom0 gui-videoram-overhead 0
Where ``$WIDTH`` × ``$HEIGHT`` is the maximum desktop size that you anticipate needing. For example, if you expect to use a 1080p display and a 4k display side-by-side, that is ``(1920 + 3840) × 2160 × 4 / 1024 = 48600``, or slightly more than 48 MiB per qube. After making these adjustments, the qubes need to be restarted.
@ -26,7 +26,7 @@ In the case of multiple display with different orientations or if you plug/unplu
.. code:: console
qvm-features dom0 gui-videoram-min $(xrandr --verbose | grep "Screen 0" | sed -e 's/.*current //' -e 's/\,.*//' | awk '{print $1*$3*4/1024}')
$ qvm-features dom0 gui-videoram-min $(xrandr --verbose | grep "Screen 0" | sed -e 's/.*current //' -e 's/\,.*//' | awk '{print $1*$3*4/1024}')
The amount of memory allocated per qube is the maximum of:

View file

@ -22,22 +22,22 @@ In ``dom0``, enable the formula for ``sys-gui`` with pillar data:
.. code:: console
sudo qubesctl top.enable qvm.sys-gui
sudo qubesctl top.enable qvm.sys-gui pillar=True
$ sudo qubesctl top.enable qvm.sys-gui
$ sudo qubesctl top.enable qvm.sys-gui pillar=True
then, execute it:
.. code:: console
sudo qubesctl --all state.highstate
$ sudo qubesctl --all state.highstate
You can now disable the ``sys-gui`` formula:
.. code:: console
sudo qubesctl top.disable qvm.sys-gui
$ sudo qubesctl top.disable qvm.sys-gui
At this point, you need to shutdown all your running qubes as the ``default_guivm`` qubes global property has been set to ``sys-gui``. In order to use ``sys-gui`` as GUI domain, you need to logout and, in the top right corner, select ``lightdm`` session type to **GUI domain (sys-gui)**. Once logged, you are running ``sys-gui`` as fullscreen window and you can perform any operation as if you would be in ``dom0`` desktop.
@ -58,29 +58,29 @@ In ``dom0``, enable the formula for ``sys-gui-gpu`` with pillar data:
.. code:: console
sudo qubesctl top.enable qvm.sys-gui-gpu
sudo qubesctl top.enable qvm.sys-gui-gpu pillar=True
$ sudo qubesctl top.enable qvm.sys-gui-gpu
$ sudo qubesctl top.enable qvm.sys-gui-gpu pillar=True
then, execute it:
.. code:: console
sudo qubesctl --all state.highstate
$ sudo qubesctl --all state.highstate
You can now disable the ``sys-gui-gpu`` formula:
.. code:: console
sudo qubesctl top.disable qvm.sys-gui-gpu
$ sudo qubesctl top.disable qvm.sys-gui-gpu
One more step is needed: attaching the actual GPU to ``sys-gui-gpu``. This can be done either manually via ``qvm-pci`` (remember to enable permissive option), or via:
.. code:: console
sudo qubesctl state.sls qvm.sys-gui-gpu-attach-gpu
$ sudo qubesctl state.sls qvm.sys-gui-gpu-attach-gpu
The latter option assumes Intel graphics card (it has hardcoded PCI address). If you dont have Intel graphics card, please use the former method with ``qvm-pci`` (see :doc:`How to use PCI devices </user/how-to-guides/how-to-use-pci-devices>`).
@ -105,29 +105,29 @@ In ``dom0``, enable the formula for ``sys-gui-vnc`` with pillar data:
.. code:: console
sudo qubesctl top.enable qvm.sys-gui-vnc
sudo qubesctl top.enable qvm.sys-gui-vnc pillar=True
$ sudo qubesctl top.enable qvm.sys-gui-vnc
$ sudo qubesctl top.enable qvm.sys-gui-vnc pillar=True
then, execute it:
.. code:: console
sudo qubesctl --all state.highstate
$ sudo qubesctl --all state.highstate
You can now disable the ``sys-gui-vnc`` formula:
.. code:: console
sudo qubesctl top.disable qvm.sys-gui-vnc
$ sudo qubesctl top.disable qvm.sys-gui-vnc
At this point, you need to shutdown all your running qubes as the ``default_guivm`` qubes global property has been set to ``sys-gui-vnc``. Then, you can start ``sys-gui-vnc``:
.. code:: console
qvm-start sys-gui-vnc
$ qvm-start sys-gui-vnc
A VNC server session is running on ``localhost:5900`` in ``sys-gui-vnc``. In order to reach the ``VNC`` server, we encourage to not connect ``sys-gui-vnc`` to a ``NetVM`` but rather to use another qube for remote access, say ``sys-remote``. First, you need to bind port 5900 of ``sys-gui-vnc`` into a ``sys-remote`` local port (you may want to use another port than 5900 to reach ``sys-remote`` from the outside). For that, use ``qubes.ConnectTCP`` RPC service (see :doc:`Firewall </user/security-in-qubes/firewall>`. Then, you can use any ``VNC`` client to connect to you ``sys-remote`` on the chosen local port (5900 if you kept the default one). For the first connection, you will reach ``lightdm`` for which you can log as ``user`` where ``user`` refers to the first ``dom0`` user in ``qubes`` group and with corresponding ``dom0`` password.
@ -195,14 +195,14 @@ and for every selected qubes not using default value for GUI domain property, fo
.. code:: console
qvm-prefs personal guivm dom0
$ qvm-prefs personal guivm dom0
You are now able to delete the GUI domain, for example ``sys-gui-gpu``:
.. code:: console
qvm-remove -f sys-gui-gpu
$ qvm-remove -f sys-gui-gpu
.. |sys-gui| image:: /attachment/posts/guivm-hybrid.png

View file

@ -48,7 +48,7 @@ To downgrade a specific package in dom0:
.. code:: console
sudo qubes-dom0-update --action=downgrade package-version
$ sudo qubes-dom0-update --action=downgrade package-version
@ -60,7 +60,7 @@ To re-install a package in dom0:
.. code:: console
sudo qubes-dom0-update --action=reinstall package
$ sudo qubes-dom0-update --action=reinstall package
@ -72,7 +72,7 @@ If youve installed a package such as anti-evil-maid, you can remove it with t
.. code:: console
sudo dnf remove anti-evil-maid
$ sudo dnf remove anti-evil-maid
@ -96,9 +96,9 @@ To temporarily enable any of these repos, use the ``--enablerepo=<repo-name>`` o
.. code:: console
sudo qubes-dom0-update --enablerepo=qubes-dom0-current-testing
sudo qubes-dom0-update --enablerepo=qubes-dom0-security-testing
sudo qubes-dom0-update --enablerepo=qubes-dom0-unstable
$ sudo qubes-dom0-update --enablerepo=qubes-dom0-current-testing
$ sudo qubes-dom0-update --enablerepo=qubes-dom0-security-testing
$ sudo qubes-dom0-update --enablerepo=qubes-dom0-unstable
@ -154,7 +154,7 @@ Example
.. code:: console
sudo qubes-dom0-update --enablerepo=qubes-dom0-unstable kernel kernel-qubes-vm
$ sudo qubes-dom0-update --enablerepo=qubes-dom0-unstable kernel kernel-qubes-vm
@ -168,7 +168,7 @@ Replace the example version numbers with the one you are upgrading to.
.. code:: console
sudo dracut -f /boot/efi/EFI/qubes/initramfs-4.14.35-1.pvops.qubes.x86_64.img 4.14.35-1.pvops.qubes.x86_64
$ sudo dracut -f /boot/efi/EFI/qubes/initramfs-4.14.35-1.pvops.qubes.x86_64.img 4.14.35-1.pvops.qubes.x86_64
@ -178,7 +178,7 @@ Grub2
.. code:: console
sudo grub2-mkconfig -o /boot/grub2/grub.cfg
$ sudo grub2-mkconfig -o /boot/grub2/grub.cfg
@ -192,14 +192,25 @@ Changing default kernel
This section describes changing the default kernel in dom0. It is sometimes needed if you have upgraded to a newer kernel and are having problems booting, for example. On the next kernel update, the default will revert to the newest.
.. code:: console
sudo nano /etc/default/grub
[update the following two lines, add if needed]
$ sudo nano /etc/default/grub
Update the following two lines, add if needed:
.. code:: bash
GRUB_DISABLE_SUBMENU=false
GRUB_SAVEDEFAULT=true
[save and exit nano]
sudo grub2-mkconfig -o /boot/grub2/grub.cfg
Save and exit nano. Regenerate the GRUB 2 configuration.
.. code:: console
$ sudo grub2-mkconfig -o /boot/grub2/grub.cfg

View file

@ -22,7 +22,7 @@ In dom0, use ``qubes-dom0-update``:
.. code:: console
sudo qubes-dom0-update qubes-repo-contrib
$ sudo qubes-dom0-update qubes-repo-contrib
In a Fedora-based template, use ``dnf``:
@ -31,7 +31,7 @@ In a Fedora-based template, use ``dnf``:
.. code:: console
sudo dnf install qubes-repo-contrib
$ sudo dnf install qubes-repo-contrib
In a Debian-based template, use ``apt``:
@ -40,7 +40,7 @@ In a Debian-based template, use ``apt``:
.. code:: console
sudo apt update && sudo apt install qubes-repo-contrib
$ sudo apt update && sudo apt install qubes-repo-contrib
The new repository definition will be in the usual location for your distro, and it will follow the naming pattern ``qubes-contrib-*``, depending on your Qubes release and whether it is in dom0 or a template. For example, in a Fedora template on Qubes 4.0, the new repository definition would be:
@ -65,7 +65,7 @@ For example, to install ``qvm-screenshot-tool`` in dom0:
.. code:: console
sudo qubes-dom0-update --clean qvm-screenshot-tool
$ sudo qubes-dom0-update --clean qvm-screenshot-tool
Please see the packages README for specific installation and setup instructions.

View file

@ -117,6 +117,6 @@ The safest way to remove (most of) KDE is:
.. code:: console
sudo dnf remove kdelibs plasma-workspace
$ sudo dnf remove kdelibs plasma-workspace

View file

@ -246,8 +246,8 @@ Both debian-9 and fedora-26 templates already have grub and related tools preins
.. code:: console
qvm-prefs <clonetemplatename> virt_mode hvm
qvm-prefs <clonetemplatename> kernel ''
$ qvm-prefs <clonetemplatename> virt_mode hvm
$ qvm-prefs <clonetemplatename> kernel ''
@ -263,7 +263,7 @@ If you are using a distribution kernel package (``kernel`` package), the initram
.. code:: console
sudo dracut -f /boot/initramfs-4.15.14-200.fc26.x86_64.img 4.15.14-200.fc26.x86_64
$ sudo dracut -f /boot/initramfs-4.15.14-200.fc26.x86_64.img 4.15.14-200.fc26.x86_64
@ -271,7 +271,7 @@ Once the kernel is installed, you need to setup ``grub2`` by running:
.. code:: console
sudo grub2-install /dev/xvda
$ sudo grub2-install /dev/xvda
@ -279,7 +279,7 @@ Finally, you need to create a GRUB configuration. You may want to adjust some se
.. code:: console
sudo grub2-mkconfig -o /boot/grub2/grub.cfg
$ sudo grub2-mkconfig -o /boot/grub2/grub.cfg
@ -321,7 +321,7 @@ Install distribution kernel image, kernel headers and the grub.
.. code:: console
sudo apt install linux-image-amd64 linux-headers-amd64 grub2 qubes-kernel-vm-support
$ sudo apt install linux-image-amd64 linux-headers-amd64 grub2 qubes-kernel-vm-support
@ -329,7 +329,7 @@ If you are doing that on a qube based on “Debian Minimal” template, a grub g
.. code:: console
sudo grub-install /dev/xvda
$ sudo grub-install /dev/xvda
@ -383,7 +383,7 @@ Run DKMS. Replace this with actual kernel version.
.. code:: console
sudo dkms autoinstall -k <kernel-version>
$ sudo dkms autoinstall -k <kernel-version>
For example.
@ -392,7 +392,7 @@ For example.
.. code:: console
sudo dkms autoinstall -k 4.19.0-6-amd64
$ sudo dkms autoinstall -k 4.19.0-6-amd64
Update initramfs.
@ -401,7 +401,7 @@ Update initramfs.
.. code:: console
sudo update-initramfs -u
$ sudo update-initramfs -u
The output should look like this:

View file

@ -42,7 +42,7 @@ Use either GUI tool Qube Settings (``qubes-vm-settings``) or the CLI tool ``qvm-
.. code:: console
qvm-volume extend <vm_name>:root <size>
$ qvm-volume extend <vm_name>:root <size>
@ -50,7 +50,7 @@ OR
.. code:: console
qvm-volume extend <vm_name>:private <size>
$ qvm-volume extend <vm_name>:private <size>
@ -117,8 +117,8 @@ Or you can take the risk of reducing the size of the disk. For example, to reduc
.. code:: console
qvm-shutdown qube1
sudo lvresize --size 1024M /dev/qubes_dom0/vm-qube1-private
$ qvm-shutdown qube1
$ sudo lvresize --size 1024M /dev/qubes_dom0/vm-qube1-private

View file

@ -22,7 +22,7 @@ You can query qvm-pool to list available storage drivers:
.. code:: console
qvm-pool --help-drivers
$ qvm-pool --help-drivers
qvm-pool driver explanation:
@ -50,8 +50,8 @@ First, collect some information in a dom0 terminal:
.. code:: console
sudo pvs
sudo lvs
$ sudo pvs
$ sudo lvs
Take note of the VG and thin pool names for your second drive., then register it with Qubes:
@ -61,7 +61,7 @@ Take note of the VG and thin pool names for your second drive., then register it
# <pool_name> is a freely chosen pool name
# <vg_name> is LVM volume group name
# <thin_pool_name> is LVM thin pool name
qvm-pool --add <pool_name> lvm_thin -o volume_group=<vg_name>,thin_pool=<thin_pool_name>,revisions_to_keep=2
$ qvm-pool --add <pool_name> lvm_thin -o volume_group=<vg_name>,thin_pool=<thin_pool_name>,revisions_to_keep=2
@ -85,7 +85,7 @@ To register the storage to qubes:
# <pool_name> is a freely chosen pool name
# <dir_path> is the mounted path to the second btrfs storage
qvm-pool --add <pool_name> file-reflink -o dir_path=<dir_path>,revisions_to_keep=2
$ qvm-pool --add <pool_name> file-reflink -o dir_path=<dir_path>,revisions_to_keep=2
Using the new pool
@ -96,22 +96,22 @@ Now, you can create qubes in that pool:
.. code:: console
qvm-create -P <pool_name> --label red <vmname>
$ qvm-create -P <pool_name> --label red <vmname>
It isnt possible to directly migrate an existing qube to the new pool, but you can clone it there, then remove the old one:
.. code:: console
qvm-clone -P <pool_name> <sourceVMname> <cloneVMname>
qvm-remove <sourceVMname>
$ qvm-clone -P <pool_name> <sourceVMname> <cloneVMname>
$ qvm-remove <sourceVMname>
If that was a template, or other qube referenced elsewhere (netVM or such), you will need to adjust those references manually after moving. For example:
.. code:: console
qvm-prefs <appvmname_based_on_old_template> template <new_template_name>
$ qvm-prefs <appvmname_based_on_old_template> template <new_template_name>
Example setup of second drive.
@ -122,8 +122,8 @@ Assuming the secondary hard disk is at /dev/sdb , you can encrypt the drive as f
.. code:: console
sudo cryptsetup luksFormat --sector-size=512 /dev/sdb
sudo blkid /dev/sdb
$ sudo cryptsetup luksFormat --sector-size=512 /dev/sdb
$ sudo blkid /dev/sdb
@ -146,28 +146,28 @@ First create the physical volume:
.. code:: console
sudo pvcreate /dev/mapper/luks-b20975aa-8318-433d-8508-6c23982c6cde
$ sudo pvcreate /dev/mapper/luks-b20975aa-8318-433d-8508-6c23982c6cde
Then create the LVM volume group, we will use for example “qubes” as the :
.. code:: console
sudo vgcreate qubes /dev/mapper/luks-b20975aa-8318-433d-8508-6c23982c6cde
$ sudo vgcreate qubes /dev/mapper/luks-b20975aa-8318-433d-8508-6c23982c6cde
And then use “poolhd0” as the (LVM thin pool name):
.. code:: console
sudo lvcreate -T -n poolhd0 -l +100%FREE qubes
$ sudo lvcreate -T -n poolhd0 -l +100%FREE qubes
Finally we will tell Qubes to add a new pool on the just created thin pool:
.. code:: console
qvm-pool --add poolhd0_qubes lvm_thin -o volume_group=qubes,thin_pool=poolhd0,revisions_to_keep=2
$ qvm-pool --add poolhd0_qubes lvm_thin -o volume_group=qubes,thin_pool=poolhd0,revisions_to_keep=2
For Btrfs
@ -179,22 +179,22 @@ First create the physical volume:
.. code:: console
# <label> Btrfs Label
sudo mkfs.btrfs -L <label> /dev/mapper/luks-b20975aa-8318-433d-8508-6c23982c6cde
$ sudo mkfs.btrfs -L <label> /dev/mapper/luks-b20975aa-8318-433d-8508-6c23982c6cde
Then mount the new Btrfs to a temporary path:
.. code:: console
sudo mkdir -p /mnt/new_qube_storage
sudo mount /dev/mapper/luks-b20975aa-8318-433d-8508-6c23982c6cde /mnt/new_qube_storage
$ sudo mkdir -p /mnt/new_qube_storage
$ sudo mount /dev/mapper/luks-b20975aa-8318-433d-8508-6c23982c6cde /mnt/new_qube_storage
Create a subvolume to hold the data:
.. code:: console
sudo btrfs subvolume create /mnt/new_qube_storage/qubes
$ sudo btrfs subvolume create /mnt/new_qube_storage/qubes
@ -202,8 +202,8 @@ Unmount the temporary Btrfs filesystem:
.. code:: console
sudo umount /mnt/new_qube_storage
rmdir /mnt/new_qube_storage
$ sudo umount /mnt/new_qube_storage
$ rmdir /mnt/new_qube_storage
Mount the subvolume with compression enabled if desired:
@ -212,21 +212,21 @@ Mount the subvolume with compression enabled if desired:
# <compression> zlib|lzo|zstd
# <subvol> btrfs subvolume "qubes" in this example
sudo mount /dev/mapper/luks-b20975aa-8318-433d-8508-6c23982c6cde /var/lib/qubes_newpool -o compress=<compression>,subvol=qubes
$ sudo mount /dev/mapper/luks-b20975aa-8318-433d-8508-6c23982c6cde /var/lib/qubes_newpool -o compress=<compression>,subvol=qubes
Finally we will tell Qubes to add a new pool on the just created Btrfs subvolume:
.. code:: console
qvm-pool --add poolhd0_qubes file-reflink -o dir_path=/var/lib/qubes_newpool,revisions_to_keep=2
$ qvm-pool --add poolhd0_qubes file-reflink -o dir_path=/var/lib/qubes_newpool,revisions_to_keep=2
By default VMs will be created on the main Qubes disk (i.e. a small SSD), to create them on this secondary drive do the following on a dom0 terminal:
.. code:: console
qvm-create -P poolhd0_qubes --label red unstrusted-hdd
$ qvm-create -P poolhd0_qubes --label red unstrusted-hdd
Verify that corresponding lines were added to /etc/fstab and /etc/cryptab to enable auto mounting of the new pool.

View file

@ -46,7 +46,7 @@ Alternatively, to create an empty standalone from the dom0 command line:
.. code:: console
qvm-create --class StandaloneVM --label <YOUR_COLOR> --property virt_mode=hvm <NEW_STANDALONE_NAME>
$ qvm-create --class StandaloneVM --label <YOUR_COLOR> --property virt_mode=hvm <NEW_STANDALONE_NAME>
@ -54,7 +54,7 @@ Or to create a standalone copied from a template:
.. code:: console
qvm-create --class StandaloneVM --label <YOUR_COLOR> --property virt_mode=hvm --template <TEMPLATE_QUBE_NAME> <NEW_STANDALONE_NAME>
$ qvm-create --class StandaloneVM --label <YOUR_COLOR> --property virt_mode=hvm --template <TEMPLATE_QUBE_NAME> <NEW_STANDALONE_NAME>
@ -90,7 +90,7 @@ Qubes are template-based (i.e., :ref:`app qubes <user/reference/glossary:app qub
.. code:: console
qvm-create my-new-vm --class StandaloneVM --property virt_mode=hvm --property kernel='' --label=green
$ qvm-create my-new-vm --class StandaloneVM --property virt_mode=hvm --property kernel='' --label=green
@ -114,7 +114,7 @@ You will have to boot the qube with the installation media “attached” to it.
.. code:: console
qvm-start <YOUR_HVM> --cdrom=/dev/cdrom
$ qvm-start <YOUR_HVM> --cdrom=/dev/cdrom
@ -122,7 +122,7 @@ You will have to boot the qube with the installation media “attached” to it.
.. code:: console
qvm-start <YOUR_HVM> --cdrom=dom0:/usr/local/iso/<YOUR_INSTALLER.ISO>
$ qvm-start <YOUR_HVM> --cdrom=dom0:/usr/local/iso/<YOUR_INSTALLER.ISO>
@ -130,7 +130,7 @@ You will have to boot the qube with the installation media “attached” to it.
.. code:: console
qvm-start <YOUR_HVM> --cdrom=<YOUR_OTHER_QUBE>:/home/user/<YOUR_INSTALLER.ISO>
$ qvm-start <YOUR_HVM> --cdrom=<YOUR_OTHER_QUBE>:/home/user/<YOUR_INSTALLER.ISO>
@ -201,7 +201,7 @@ In order to create an HVM template, you use the following command, suitably adap
.. code:: console
qvm-create --class TemplateVM <YOUR_HVM_TEMPLATE_NAME> --property virt_mode=HVM --property kernel='' -l <YOUR_COLOR>
$ qvm-create --class TemplateVM <YOUR_HVM_TEMPLATE_NAME> --property virt_mode=HVM --property kernel='' -l <YOUR_COLOR>
@ -377,7 +377,7 @@ In a Debian app qube, install ``qemu-utils`` and ``unzip``:
.. code:: console
sudo apt install qemu-utils unzip
$ sudo apt install qemu-utils unzip
@ -385,7 +385,7 @@ In a Fedora app qube:
.. code:: console
sudo dnf install qemu-img
$ sudo dnf install qemu-img
@ -417,7 +417,7 @@ Copy the root image file from the originating qube (here called ``untrusted``) t
.. code:: console
qvm-run --pass-io untrusted 'cat "/media/user/externalhd/win10.raw"' > /home/user/win10-root.img
$ qvm-run --pass-io untrusted 'cat "/media/user/externalhd/win10.raw"' > /home/user/win10-root.img
@ -425,7 +425,7 @@ From within dom0, create a new HVM (here called ``win10``) with the root image w
.. code:: console
qvm-create --property=virt_mode=hvm --property=memory=4096 --property=kernel='' --label red --standalone --root-move-from /home/user/win10-root.img win10
$ qvm-create --property=virt_mode=hvm --property=memory=4096 --property=kernel='' --label red --standalone --root-move-from /home/user/win10-root.img win10
@ -433,7 +433,7 @@ Start ``win10``:
.. code:: console
qvm-start win10
$ qvm-start win10

View file

@ -30,7 +30,7 @@ First, make sure you have the latest ``qubes-mgmt-salt-dom0-virtual-machines`` p
.. code:: console
sudo qubesctl state.sls qvm.usb-keyboard
$ sudo qubesctl state.sls qvm.usb-keyboard
@ -148,7 +148,7 @@ You can create a USB qube using the management stack by executing the following
.. code:: console
sudo qubesctl state.sls qvm.sys-usb
$ sudo qubesctl state.sls qvm.sys-usb

View file

@ -14,7 +14,7 @@ For the private volume associated with a VM named *vmname*, you may inspect the
.. code:: console
qvm-volume info vmname:private
$ qvm-volume info vmname:private
@ -22,7 +22,7 @@ The output of the above command will also display the “Available revisions (fo
.. code:: console
qvm-volume config vmname:private revisions_to_keep 2
$ qvm-volume config vmname:private revisions_to_keep 2
@ -30,6 +30,6 @@ With the VM stopped, you may revert to an older snapshot of the private volume f
.. code:: console
qvm-volume revert vmname:private <revision>
$ qvm-volume revert vmname:private <revision>