wip
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
installerIsoPath = "${installerIsoDeriv}/iso/${installerIsoDeriv.name}";
|
||||
bootInstaller = false;
|
||||
tapdev = "qemu-devver";
|
||||
tapdev-int = "qemu-devver-int";
|
||||
commonArgs = [
|
||||
"${qemu-pkg}/bin/qemu-kvm"
|
||||
"-name" "devver"
|
||||
@@ -41,9 +42,10 @@
|
||||
"-device" "virtio-9p-pci,fsdev=fs0,mount_tag=boot"
|
||||
|
||||
"-netdev" "tap,id=vm-devver,ifname=${tapdev},script=no,downscript=no"
|
||||
#"-netdev" "bridge,id=vm-devver,br=${config.vacu.network.lan_bridge},helper=/run/wrappers/bin/qemu-bridge-helper"
|
||||
#Why 34? No idea! Best hint I could find is in the mailing list about the serial driver: https://lists.nongnu.org/archive/html/qemu-devel/2013-01/msg05952.html
|
||||
"-device" "virtio-net-pci,netdev=vm-devver,mac=02:19:07:A2:15:72,romfile=,mq=on,vectors=34"
|
||||
"-netdev" "tap,id=vm-devver2,ifname=${tapdev-int},script=no,downscript=no"
|
||||
"-device" "virtio-net-pci,netdev=vm-devver2,romfile=,mq=on,vectors=34"
|
||||
];
|
||||
installerArgs = [
|
||||
# "-boot" "once=d"
|
||||
@@ -90,6 +92,18 @@ in {
|
||||
# KeepCarrier = true;
|
||||
};
|
||||
};
|
||||
systemd.network.netdevs.${tapdev-int} = {
|
||||
netdevConfig = {
|
||||
Kind = "tap";
|
||||
Name = tapdev-int;
|
||||
};
|
||||
tapConfig = {
|
||||
User = config.users.users.devver.name;
|
||||
Group = config.users.groups.devver.name;
|
||||
PacketInfo = true;
|
||||
# KeepCarrier = true;
|
||||
};
|
||||
};
|
||||
systemd.network.networks."02-vm-devver".extraConfig = ''
|
||||
Bridge = ${config.vacu.network.lan_bridge}
|
||||
|
||||
@@ -99,4 +113,28 @@ in {
|
||||
[Link]
|
||||
RequiredForOnline = no
|
||||
'';
|
||||
systemd.network.networks."02-vm-devver-int".extraConfig = ''
|
||||
Address = 10.110.171.204/31
|
||||
DHCP = no
|
||||
DNS = no
|
||||
LLDP = no
|
||||
|
||||
[Match]
|
||||
Name = ${tapdev-int}
|
||||
|
||||
[Link]
|
||||
RequiredForOnline = no
|
||||
'';
|
||||
|
||||
# networking.firewall.extraCommands = ''
|
||||
# if ! (iptables -t nat -n --list devver-prerouting > /dev/null 2>&1); then
|
||||
# iptables -t nat -N devver-prerouting
|
||||
# fi
|
||||
# iptables -t nat -F devver-prerouting
|
||||
# iptables -t nat -A devver-prerouting -p tcp -m tcp --dport 5022 -j DNAT --to-destination 10.78.79.10
|
||||
# iptables -t nat -I PREROUTING 1 -j devver-prerouting
|
||||
# '';
|
||||
# networking.firewall.extraStopCommands = ''
|
||||
# iptables -t nat -D PREROUTING -j devver-prerouting || true
|
||||
# '';
|
||||
}
|
||||
|
Reference in New Issue
Block a user