vm: remove bridge network interface, update vm xml, general cleanup
This commit is contained in:
parent
9030a12931
commit
227c761ebe
5 changed files with 43 additions and 53 deletions
39
nixos/vm.nix
39
nixos/vm.nix
|
@ -82,33 +82,33 @@ in {
|
|||
# the network bridge interface with systemctl start network-addresses-winvm0.service,
|
||||
# and potentially toggle the link state in the vm config
|
||||
# to get this working. would be good to fix it.
|
||||
networking.bridges = {
|
||||
"winvm0" = {
|
||||
interfaces = [ "eth0" ];
|
||||
};
|
||||
};
|
||||
# networking.bridges = {
|
||||
# "winvm0" = {
|
||||
# interfaces = [ "eth0" ];
|
||||
# };
|
||||
# };
|
||||
|
||||
networking.dhcpcd.denyInterfaces = [ "winvm0" ];
|
||||
# networking.dhcpcd.denyInterfaces = [ "winvm0" ];
|
||||
|
||||
# TODO: the below doesn't actually work, so I just
|
||||
# disable wait-online entirely.
|
||||
# ensure the bridge network doesn't cause us to wait
|
||||
# on boot
|
||||
# systemd.network.wait-online.ignoredInterfaces = [ "eth0" "winvm0" ];
|
||||
systemd.network.wait-online.anyInterface = true;
|
||||
boot.initrd.systemd.network.wait-online.ignoredInterfaces = [ "eth0" "winvm0" ];
|
||||
# systemd.network.wait-online.anyInterface = true;
|
||||
# boot.initrd.systemd.network.wait-online.ignoredInterfaces = [ "eth0" "winvm0" ];
|
||||
|
||||
# These are needed, since I'm not currently trying to
|
||||
# reserve a static IP for the bridge interface
|
||||
networking.defaultGateway = { address = "10.0.0.1"; interface = "eth0"; };
|
||||
networking.interfaces.winvm0 = {
|
||||
useDHCP = false;
|
||||
ipv4 = {
|
||||
addresses = [
|
||||
{ address = "10.0.5.1"; prefixLength = 32; }
|
||||
];
|
||||
};
|
||||
};
|
||||
# networking.defaultGateway = { address = "10.0.0.1"; interface = "eth0"; };
|
||||
# networking.interfaces.winvm0 = {
|
||||
# useDHCP = false;
|
||||
# ipv4 = {
|
||||
# addresses = [
|
||||
# { address = "10.0.5.1"; prefixLength = 32; }
|
||||
# ];
|
||||
# };
|
||||
# };
|
||||
|
||||
environment.systemPackages = [
|
||||
# For sharing filesystems
|
||||
|
@ -135,7 +135,10 @@ in {
|
|||
hardware.graphics.enable = true; # needed for display spice opengl
|
||||
virtualisation.libvirtd = {
|
||||
enable = true;
|
||||
qemu.swtpm.enable = true; # for TPM 2.0 support
|
||||
qemu = {
|
||||
swtpm.enable = true; # for TPM 2.0 support
|
||||
ovmf.packages = [ pkgs.OVMFFull.fd ];
|
||||
};
|
||||
|
||||
onBoot = "ignore"; # only start autostart vms, not just ones that were running
|
||||
onShutdown = "shutdown"; # always shut down the vm's cleanly
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue