From 8167dec3203cc5e9751b799f751fe56ea2d655b7 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Wed, 30 Oct 2024 09:13:11 +0100 Subject: ... --- accounts/gkleen@sif/libvirt/default.nix | 38 ++++- accounts/gkleen@sif/libvirt/lmmirzm-vmrz01.xml | 176 +++++++++++++++++++++ accounts/gkleen@sif/libvirt/pool-default.xml | 18 +++ accounts/gkleen@sif/libvirt/vol-lmmirzm-vmrz01.xml | 17 ++ 4 files changed, 248 insertions(+), 1 deletion(-) create mode 100644 accounts/gkleen@sif/libvirt/lmmirzm-vmrz01.xml create mode 100644 accounts/gkleen@sif/libvirt/pool-default.xml create mode 100644 accounts/gkleen@sif/libvirt/vol-lmmirzm-vmrz01.xml (limited to 'accounts/gkleen@sif/libvirt') diff --git a/accounts/gkleen@sif/libvirt/default.nix b/accounts/gkleen@sif/libvirt/default.nix index a93a2266..54d971c4 100644 --- a/accounts/gkleen@sif/libvirt/default.nix +++ b/accounts/gkleen@sif/libvirt/default.nix @@ -1,5 +1,6 @@ -{ flakeInputs, ... }: +{ flakeInputs, lib, ... }: +with lib; with flakeInputs.nixVirt.lib; { @@ -7,6 +8,41 @@ with flakeInputs.nixVirt.lib; virtualisation.libvirt = { enable = true; connections."qemu:///session" = { + domains = [ + { definition = domain.writeXML (recursiveUpdate (domain.templates.windows { + name = "lmmirzm-vmrz01"; + uuid = "9e1dab2e-7986-4cb3-88af-6fad8969e15f"; + memory = { count = 16; unit = "GiB"; }; + storage_vol = "/home/gkleen/.local/share/libvirt/images/lmmirzm-vmrz01.qcow2"; + nvram_path = "/home/gkleen/.local/share/libvirt/lmmirzm-vmrz01.nvram"; + virtio_net = true; + virtio_drive = true; + virtio_video = false; + install_virtio = true; + }) { + vcpu.count = 4; + os.bootmenu.enable = true; + devices.graphics = { + listen.type = "address"; + # gl.enable = true; + }; + devices.interface = { + type = "bridge"; + mac.address = "52:54:00:b9:f3:ed"; + source.bridge = "gre-0971"; + }; + }); + } + ]; + pools = [ + { definition = ./pool-default.xml; + active = true; + volumes = [ + { definition = ./vol-lmmirzm-vmrz01.xml; + } + ]; + } + ]; }; }; }; diff --git a/accounts/gkleen@sif/libvirt/lmmirzm-vmrz01.xml b/accounts/gkleen@sif/libvirt/lmmirzm-vmrz01.xml new file mode 100644 index 00000000..fc7cec2c --- /dev/null +++ b/accounts/gkleen@sif/libvirt/lmmirzm-vmrz01.xml @@ -0,0 +1,176 @@ + + lmmirzm-vmrz01 + 9e1dab2e-7986-4cb3-88af-6fad8969e15f + + + + + + 16777216 + 16777216 + 8 + + hvm + + + + + + + + + + + + + + + + + + + + + destroy + restart + destroy + + + + + + /run/current-system/sw/bin/qemu-system-x86_64 + + + + +
+ + +
+ + + + + +
+ + + + +
+ + + + +
+ + + + +
+ + + + +
+ + + + +
+ + + + +
+ + + + +
+ + + + +
+ + + + +
+ + + + +
+ + + + +
+ + + + +
+ + + + +
+ + +
+ + +
+ + + + + +
+ + + + + + + + + + + +
+ + +
+ + + + + + + + +
+ +