mirror of
https://github.com/QubesOS/qubes-doc.git
synced 2025-02-22 15:59:56 -05:00
Deduplicate content
This section appears to largely duplicate the content in a previous section.
This commit is contained in:
parent
c6964e8a32
commit
37e5e1503a
@ -152,214 +152,6 @@ In order to do that, select "Qube settings" entry in selected base app qube, go
|
||||
|
||||
Note that currently only applications whose main process keeps running until you close the application (i.e. do not start a background process instead) will work. One of known examples of incompatible applications is GNOME Terminal (shown on the list as "Terminal"). Choose different terminal emulator (like XTerm) instead.
|
||||
|
||||
## Create Custom sys-net sys-firewall and sys-usb disposables
|
||||
|
||||
Users have the option of creating customized disposables for the `sys-net`, `sys-firewall` and `sys-usb` VMs. In this configuration, a fresh VM instance is created each time a disposable is launched. Functionality is near-identical to the default VMs created following a new Qubes’ installation, except the user benefits from a non-persistent filesystem.
|
||||
|
||||
Functionality is not limited, users can:
|
||||
|
||||
- Set custom firewall rule sets and run Qubes VPN scripts.
|
||||
- Set disposables to autostart at system boot.
|
||||
- Attach PCI devices with the `--persistent` option.
|
||||
|
||||
Using disposables in this manner is ideal for untrusted qubes which require persistent PCI devices, such as USB VMs and NetVMs.
|
||||
|
||||
>_**Note:**_ Users who want customized VPN or firewall rule sets must create a separate disposable template for use by each disposable. If disposable template customization is not needed, then a single disposable template is used as a template for all disposables.
|
||||
|
||||
### Create and configure the disposable template on which the disposable will be based
|
||||
|
||||
1. Create the disposable template:
|
||||
|
||||
```shell_session
|
||||
[user@dom0 ~]$ qvm-create --class AppVM --label gray <disposable-Template-Name>
|
||||
```
|
||||
|
||||
2. _(optional)_ In the disposable template, add custom firewall rule sets, Qubes VPN scripts, etc.
|
||||
|
||||
Firewall rules sets and Qubes VPN scripts can be added just like any other VM.
|
||||
|
||||
3. Set the disposable template as template for disposables:
|
||||
|
||||
```shell_session
|
||||
[user@dom0 ~]$ qvm-prefs <disposable-Template-Name> template_for_dispvms true
|
||||
```
|
||||
|
||||
### Create the sys-net disposable
|
||||
|
||||
1. Create `sys-net` disposable based on the disposable template:
|
||||
|
||||
```shell_session
|
||||
[user@dom0 ~]$ qvm-create --template <disposable-Template-Name> --class DispVM --label red disp-sys-net
|
||||
```
|
||||
|
||||
2. Set `disp-sys-net` virtualization mode to [hvm](/doc/hvm/):
|
||||
|
||||
```shell_session
|
||||
[user@dom0 ~]$ qvm-prefs disp-sys-net virt_mode hvm
|
||||
```
|
||||
|
||||
3. Set `disp-sys-net` to provide network for other VMs:
|
||||
|
||||
```shell_session
|
||||
[user@dom0 ~]$ qvm-prefs disp-sys-net provides_network true
|
||||
```
|
||||
|
||||
4. Set `disp-sys-net` NetVM to none:
|
||||
|
||||
```shell_session
|
||||
[user@dom0 ~]$ qvm-prefs disp-sys-net netvm ""
|
||||
```
|
||||
|
||||
5. List all available PCI devices to determine the correct _backend:BDF_ address(es) to assign to `disp-sys-net`:
|
||||
|
||||
```shell_session
|
||||
[user@dom0 ~]$ qvm-pci
|
||||
```
|
||||
|
||||
6. Attach the network PCI device(s) to `disp-sys-net` (finding and assigning PCI devices can be found [here](/doc/how-to-use-pci-devices/):
|
||||
|
||||
```shell_session
|
||||
[user@dom0 ~]$ qvm-pci attach --persistent disp-sys-net <backend>:<bdf>
|
||||
```
|
||||
|
||||
7. _(recommended)_ Set `disp-sys-net` to start automatically when Qubes boots:
|
||||
|
||||
```shell_session
|
||||
[user@dom0 ~]$ qvm-prefs disp-sys-net autostart true
|
||||
```
|
||||
|
||||
8. _(recommended)_ Disable the `appmenus-dispvm` feature, as disp-sys-net is not itself a disposable template (Note: this is only necessary if you enabled the `appmenus-dispvm` feature for the disposable template):
|
||||
|
||||
```shell_session
|
||||
[user@dom0 ~]$ qvm-features disp-sys-net appmenus-dispvm ''
|
||||
```
|
||||
|
||||
9. _(optional)_ Set `disp-sys-net` as the dom0 time source:
|
||||
|
||||
```shell_session
|
||||
[user@dom0 ~]$ qubes-prefs clockvm disp-sys-net
|
||||
```
|
||||
|
||||
10. _(recommended)_ Allow templates to be updated via `disp-sys-net`. In dom0, edit `/etc/qubes-rpc/policy/qubes.UpdatesProxy` to change the target from `sys-net` to `disp-sys-net`.
|
||||
|
||||
### Create the sys-firewall disposable
|
||||
|
||||
1. Create `sys-firewall` disposable:
|
||||
|
||||
```shell_session
|
||||
[user@dom0 ~]$ qvm-create --template <disposable-Template-Name> --class DispVM --label green disp-sys-firewall
|
||||
```
|
||||
|
||||
2. Set `disp-sys-firewall` to provide network for other VMs:
|
||||
|
||||
```shell_session
|
||||
[user@dom0 ~]$ qvm-prefs disp-sys-firewall provides_network true
|
||||
```
|
||||
|
||||
3. Set `disp-sys-net` as the NetVM for `disp-sys-firewall`:
|
||||
|
||||
```shell_session
|
||||
[user@dom0 ~]$ qvm-prefs disp-sys-firewall netvm disp-sys-net
|
||||
```
|
||||
|
||||
4. Set `disp-sys-firewall` as NetVM for other app qubes:
|
||||
|
||||
```shell_session
|
||||
[user@dom0 ~]$ qvm-prefs <vm_name> netvm disp-sys-firewall
|
||||
```
|
||||
|
||||
5. _(recommended)_ Set `disp-sys-firewall` to auto-start when Qubes boots:
|
||||
|
||||
```shell_session
|
||||
[user@dom0 ~]$ qvm-prefs disp-sys-firewall autostart true
|
||||
```
|
||||
|
||||
6. _(recommended)_ Disable the `appmenus-dispvm` feature, as disp-sys-firewall is not itself a disposable template (Note: this is only necessary if you enabled the `appmenus-dispvm` feature for the disposable template):
|
||||
|
||||
```shell_session
|
||||
[user@dom0 ~]$ qvm-features disp-sys-firewall appmenus-dispvm ''
|
||||
```
|
||||
|
||||
7. _(optional)_ Set `disp-sys-firewall` as the default NetVM:
|
||||
|
||||
```shell_session
|
||||
[user@dom0 ~]$ qubes-prefs default_netvm disp-sys-firewall
|
||||
```
|
||||
|
||||
### Create the sys-usb disposable
|
||||
|
||||
1. Create the `disp-sys-usb`:
|
||||
|
||||
```shell_session
|
||||
[user@dom0 ~]$ qvm-create --template <disposable-template-name> --class DispVM --label red disp-sys-usb
|
||||
```
|
||||
|
||||
2. Set the `disp-sys-usb` virtualization mode to hvm:
|
||||
|
||||
```shell_session
|
||||
[user@dom0 ~]$ qvm-prefs disp-sys-usb virt_mode hvm
|
||||
```
|
||||
|
||||
3. Set `disp-sys-usb` NetVM to none:
|
||||
|
||||
```shell_session
|
||||
[user@dom0 ~]$ qvm-prefs disp-sys-usb netvm ""
|
||||
```
|
||||
|
||||
4. List all available PCI devices:
|
||||
|
||||
```shell_session
|
||||
[user@dom0 ~]$ qvm-pci
|
||||
```
|
||||
|
||||
5. Attach the USB controller to the `disp-sys-usb`:
|
||||
>_**Note:**_ Most of the commonly used USB controllers (all Intel integrated controllers) require the `-o no-strict-reset=True` option to be set. Instructions detailing how this option is set can be found [here](/doc/how-to-use-pci-devices/#no-strict-reset).
|
||||
|
||||
```shell_session
|
||||
[user@dom0 ~]$ qvm-pci attach --persistent disp-sys-usb <backined>:<bdf>
|
||||
```
|
||||
|
||||
6. _(optional)_ Set `disp-sys-usb` to auto-start when Qubes boots:
|
||||
|
||||
```shell_session
|
||||
[user@dom0 ~]$ qvm-prefs disp-sys-usb autostart true
|
||||
```
|
||||
|
||||
7. _(recommended)_ Disable the `appmenus-dispvm` feature, as disp-sys-usb is not itself a disposable template (Note: this is only necessary if you enabled the `appmenus-dispvm` feature for the disposable template):
|
||||
|
||||
```shell_session
|
||||
[user@dom0 ~]$ qvm-features disp-sys-usb appmenus-dispvm ''
|
||||
```
|
||||
|
||||
8. Users should now follow instructions on [How to hide USB controllers from dom0](/doc/usb-qubes/#how-to-hide-usb-controllers-from-dom0).
|
||||
|
||||
9. At this point, your mouse may not work.
|
||||
Edit the `qubes.InputMouse` policy file in dom0, which is located here:
|
||||
|
||||
```
|
||||
/etc/qubes-rpc/policy/qubes.InputMouse
|
||||
```
|
||||
|
||||
Add a line like this to the top of the file:
|
||||
|
||||
```
|
||||
disp-sys-usb dom0 allow,user=root
|
||||
```
|
||||
|
||||
### Starting the disposables
|
||||
|
||||
Prior to starting the new VMs, users should ensure that no other VMs such as the old `sys-net` and `sys-usb` VMs are running. This is because no two VMs can share the same PCI device while both running. It is recommended that users detach the PCI devices from the old VMs without deleting them. This will allow users to reattach the PCI devices if the newly created disposables fail to start.
|
||||
|
||||
Detach PCI device from VM:
|
||||
|
||||
```shell_session
|
||||
[user@dom0~]$ qvm-pci detach <vm_name> <backend>:<bdf>
|
||||
```
|
||||
|
||||
### Troubleshooting
|
||||
|
||||
If the `disp-sys-usb` does not start, it could be due to a PCI passthrough problem. For more details on this issue along with possible solutions, users can look [here](/doc/pci-troubleshooting/#pci-passthrough-issues).
|
||||
|
||||
## Deleting disposables
|
||||
|
||||
While working in a disposable, you may want to open a document in another disposable.
|
||||
|
Loading…
x
Reference in New Issue
Block a user