tor: enable hot-adding memory
This commit is contained in:
parent
3007e31d45
commit
e0ab5f5af3
1 changed files with 13 additions and 1 deletions
|
@ -9,7 +9,7 @@
|
|||
(modulesPath + "/profiles/qemu-guest.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = ["ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" "sr_mod" "virtio_blk"];
|
||||
boot.initrd.availableKernelModules = ["ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" "sd_mod"];
|
||||
boot.initrd.kernelModules = ["dm-snapshot"];
|
||||
boot.kernelModules = [];
|
||||
boot.extraModulePackages = [];
|
||||
|
@ -37,5 +37,17 @@
|
|||
}
|
||||
];
|
||||
|
||||
# Enable hot-adding memory
|
||||
# https://pve.proxmox.com/wiki/Hotplug_(qemu_disk,nic,cpu,memory)
|
||||
# Nix code inspired by (this isn't hyperv):
|
||||
# https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/virtualisation/hyperv-guest.nix
|
||||
services.udev.packages = lib.singleton (pkgs.writeTextFile {
|
||||
name = "proxmox-memory-hotadd-udev-rules";
|
||||
destination = "/etc/udev/rules.d/80-hotplug-mem.rules";
|
||||
text = ''
|
||||
SUBSYSTEM=="memory", ACTION=="add", TEST=="state", ATTR{state}=="offline", ATTR{state}="online"
|
||||
'';
|
||||
});
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue