qusal/salt/fedora/create.sls
Ben Grande 040594ae74 fix: do not remove created dvm
The removal was first implemented to get a clean state of the qube, but
there are side effects, it fails if the user created a named disposable
based on the dvm and also removes the (dvm) entry from the appmenu.

The sys-usb case is a workaround in case the user selected a
non-disposable, an appvm sys-usb during system installation.
2024-01-10 14:27:44 +01:00

63 lines
1.4 KiB
Plaintext

{#
SPDX-FileCopyrightText: 2023 Benjamin Grande M. S. <ben.grande.b@gmail.com>
SPDX-License-Identifier: AGPL-3.0-or-later
#}
{%- from "qvm/template.jinja" import load -%}
{%- import slsdotpath ~ "/template.jinja" as template -%}
include:
- .clone
"dvm-{{ template.template }}-absent":
qvm.absent:
- names:
- {{ template.template_clean }}-dvm
- {{ template.template }}-dvm
{% load_yaml as defaults -%}
name: dvm-{{ template.template_clean }}
force: True
require:
- sls: {{ template.template_clean }}.clone
present:
- template: {{ template.template }}
- label: red
prefs:
- template: {{ template.template }}
- label: red
- memory: 300
- maxmem: 400
- vcpus: 1
- template_for_dispvms: True
- include_in_backups: False
features:
- enable:
- appmenus-dispvm
- set:
- menu-items: "qubes-open-file-manager.desktop qubes-run-terminal.desktop qubes-start.desktop"
{%- endload %}
{{ load(defaults) }}
{% load_yaml as defaults -%}
name: {{ template.template }}
force: True
require:
- sls: {{ template.template_clean }}.clone
present:
- label: black
prefs:
- label: black
- memory: 300
- maxmem: 600
- vcpus: 1
- include_in_backups: False
features:
- set:
- menu-items: "qubes-open-file-manager.desktop qubes-run-terminal.desktop qubes-start.desktop"
- default-menu-items: "qubes-open-file-manager.desktop qubes-run-terminal.desktop qubes-start.desktop"
{%- endload %}
{{ load(defaults) }}