manage vcpus and memory of VMs

fix kitchenowl connectivity
This commit is contained in:
Pim Kunis 2024-02-08 23:44:36 +01:00
parent 8b8106fade
commit f38b9af075
8 changed files with 36 additions and 31 deletions

View file

@ -83,29 +83,30 @@
};
};
maestro2 = {
maestro = {
type = "virtual";
hypervisorName = "atlas";
nixosModule = { pkgs, lib, config, ... }: {
nixosModule = { config, ... }: {
microvm.balloonMem = 7680;
lab = {
dockerSwarm.enable = true;
vm = {
id = 1;
staticNetworking = true;
staticIPv4 = "192.168.30.42";
staticIPv6 = "2a0d:6e00:1a77:30::42";
};
};
};
};
bancomart2 = {
bancomart = {
type = "virtual";
hypervisorName = "jefke";
nixosModule = { pkgs, lib, config, ... }: {
nixosModule = {
microvm.balloonMem = 7680;
lab = {
dockerSwarm.enable = true;
vm.id = 2;
@ -113,11 +114,13 @@
};
};
vpay2 = {
vpay = {
type = "virtual";
hypervisorName = "lewis";
nixosModule = { pkgs, lib, config, ... }: {
nixosModule = {
microvm.balloonMem = 5632;
lab = {
dockerSwarm.enable = true;
vm.id = 3;

View file

@ -17,7 +17,7 @@ in
port = "5353";
host-record = [
"hermes.dmz,${cfg.dmz.ipv4.services},${cfg.dmz.ipv6.services}"
"ipv4.hermes.dmz,${cfg.dmz.ipv4.services}"
"ipv4.hermes.dmz,${cfg.dmz.ipv4.services}" # TODO: Do we need these?
"ipv6.hermes.dmz,${cfg.dmz.ipv6.services}"
];
@ -34,7 +34,7 @@ in
dhcp-host = [
"b8:27:eb:b9:ab:e2,esrom"
"ca:fe:c0:ff:ee:08,maestro,${cfg.dmz.ipv4.dockerSwarm}"
"ba:db:ee:f0:00:01,maestro,${cfg.dmz.ipv4.dockerSwarm}"
];
dhcp-option = [

View file

@ -85,6 +85,9 @@
};
microvm = {
# TODO: make this dependent on the host CPU
vcpu = 4;
shares = [{
source = "/nix/store";
mountPoint = "/nix/.ro-store";