some cloud-hypervisor network fuckery, back to qemu
This commit is contained in:
parent
bd44fc6fcb
commit
3771c9295b
2 changed files with 13 additions and 10 deletions
|
@ -2,15 +2,15 @@
|
||||||
{
|
{
|
||||||
# TODO: make a module
|
# TODO: make a module
|
||||||
systemd.network = {
|
systemd.network = {
|
||||||
netdevs."10-uvm-br" = {
|
netdevs."10-microvm" = {
|
||||||
netdevConfig = {
|
netdevConfig = {
|
||||||
Kind = "bridge";
|
Kind = "bridge";
|
||||||
Name = "uvm-br";
|
Name = "microvm";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
networks."10-uvm-br" = {
|
networks."10-microvm" = {
|
||||||
matchConfig.Name = "uvm-br";
|
matchConfig.Name = "microvm";
|
||||||
networkConfig = {
|
networkConfig = {
|
||||||
DHCPServer = false;
|
DHCPServer = false;
|
||||||
IPv6SendRA = true;
|
IPv6SendRA = true;
|
||||||
|
@ -30,9 +30,9 @@
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
networks."11-uvm-br" = {
|
networks."11-microvm" = {
|
||||||
matchConfig.Name = "uvm-*";
|
matchConfig.Name = "uvm-*";
|
||||||
networkConfig.Bridge = "uvm-br";
|
networkConfig.Bridge = "microvm";
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -40,6 +40,6 @@
|
||||||
enable = true;
|
enable = true;
|
||||||
enableIPv6 = true;
|
enableIPv6 = true;
|
||||||
externalInterface = "enp90s0";
|
externalInterface = "enp90s0";
|
||||||
internalInterfaces = [ "uvm-br" ];
|
internalInterfaces = [ "microvm" ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ config, lib, ... }:
|
{ config, lib, ... }:
|
||||||
let
|
let
|
||||||
mac = "c0:ff:ee:00:00:00";
|
mac = "02:00:00:00:00:01";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
|
@ -18,7 +18,7 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
microvm = {
|
microvm = {
|
||||||
hypervisor = "cloud-hypervisor";
|
hypervisor = "qemu";
|
||||||
mem = 2 * 1024;
|
mem = 2 * 1024;
|
||||||
vcpu = 2;
|
vcpu = 2;
|
||||||
interfaces = [
|
interfaces = [
|
||||||
|
@ -60,7 +60,10 @@ in
|
||||||
enable = true;
|
enable = true;
|
||||||
networks."11-host" = {
|
networks."11-host" = {
|
||||||
matchConfig.MACAddress = mac;
|
matchConfig.MACAddress = mac;
|
||||||
networkConfig.Address = "10.99.99.10/24";
|
networkConfig = {
|
||||||
|
Address = "10.99.99.10/24";
|
||||||
|
DHCP = "no";
|
||||||
|
};
|
||||||
routes = [
|
routes = [
|
||||||
{
|
{
|
||||||
Gateway = "10.99.99.1";
|
Gateway = "10.99.99.1";
|
||||||
|
|
Loading…
Add table
Reference in a new issue