From 1d5f34d954cea4fe90dd40bf90d993be1a8f4799 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Mon, 16 Feb 2026 16:12:13 +0100 Subject: vmrz03 --- accounts/gkleen@sif/libvirt/default.nix | 87 +++++++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) diff --git a/accounts/gkleen@sif/libvirt/default.nix b/accounts/gkleen@sif/libvirt/default.nix index 4e5a9b90..7d0972b5 100644 --- a/accounts/gkleen@sif/libvirt/default.nix +++ b/accounts/gkleen@sif/libvirt/default.nix @@ -137,6 +137,82 @@ with flakeInputs.nixVirt.lib; }; }); } + { definition = domain.writeXML (recursiveUpdate (domain.templates.linux { + name = "vmrz03"; + uuid = "1250a47c-3199-478d-8cf3-ea4a64c0567a"; + memory = { count = 8; unit = "GiB"; }; + storage_vol = "/home/gkleen/.local/share/libvirt/images/vmrz03.qcow2"; + virtio_video = true; + }) { + os = { + loader = + { + readonly = true; + type = "pflash"; + path = "${pkgs.OVMFFull.fd}/FV/OVMF_CODE.ms.fd"; + }; + nvram = + { + template = "${pkgs.OVMFFull.fd}/FV/OVMF_VARS.ms.fd"; + path = "/home/gkleen/.local/share/libvirt/vmrz03.nvram"; + }; + bootmenu.enable = true; + }; + qemu-commandline.env = [ + { name = "SPICE_DEBUG_ALLOW_MC"; value = "1"; } + ]; + vcpu.count = 4; + cpu = { + mode = "host-model"; + feature = [ + { name = "vmx"; policy = "require"; } + ]; + }; + devices.graphics = { + listen.type = "address"; + gl.enable = false; + }; + devices.video.model.acceleration.accel3d = false; + devices.interface = [ + { + model.type = "virtio"; + type = "bridge"; + mac.address = "52:54:00:a1:f7:8a"; + source.bridge = "rz-0971"; + } + { + model.type = "virtio"; + type = "bridge"; + mac.address = "52:54:00:8d:d3:0b"; + source.bridge = "rz-2403"; + link.state = "down"; + } + ]; + devices.channel = [ + { + type = "unix"; + target = { type = "virtio"; name = "org.qemu.guest_agent.0"; }; + } + { + type = "spicevmc"; + target = { type = "virtio"; name = "com.redhat.spice.0"; }; + } + { + type = "spiceport"; + target = { type = "virtio"; name = "org.spice-space.webdav.0"; }; + source.channel = "org.spice-space.webdav.0"; + } + ]; + devices.tpm = { + model = "tpm-tis"; + backend = + { + type = "emulator"; + version = "2.0"; + }; + }; + }); + } ]; pools = [ { definition = pool.writeXML { @@ -171,6 +247,17 @@ with flakeInputs.nixVirt.lib; }; }; } + { definition = volume.writeXML { + type = "file"; + name = "vmrz03.qcow2"; + capacity = { count = 256; unit = "GB"; }; + target = { + path = "/home/gkleen/.local/share/libvirt/images/vmrz03.qcow2"; + format.type = "qcow2"; + features.lazy_refcounts = {}; + }; + }; + } ]; } ]; -- cgit v1.2.3