parent
ba267839d1
commit
1d64f5f41b
@ -13,6 +13,9 @@ let
|
|||||||
auth_unix_rw = "none"
|
auth_unix_rw = "none"
|
||||||
${cfg.extraConfig}
|
${cfg.extraConfig}
|
||||||
'';
|
'';
|
||||||
|
qemuConfigFile = pkgs.writeText "qemu.conf" ''
|
||||||
|
${cfg.qemuVerbatimConfig}
|
||||||
|
'';
|
||||||
|
|
||||||
in {
|
in {
|
||||||
|
|
||||||
@ -48,6 +51,18 @@ in {
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
virtualisation.libvirtd.qemuVerbatimConfig = mkOption {
|
||||||
|
type = types.lines;
|
||||||
|
default = ''
|
||||||
|
namespaces = []
|
||||||
|
'';
|
||||||
|
description = ''
|
||||||
|
Contents written to the qemu configuration file, qemu.conf.
|
||||||
|
Make sure to include a proper namespace configuration when
|
||||||
|
supplying custom configuration.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
virtualisation.libvirtd.extraOptions = mkOption {
|
virtualisation.libvirtd.extraOptions = mkOption {
|
||||||
type = types.listOf types.str;
|
type = types.listOf types.str;
|
||||||
default = [ ];
|
default = [ ];
|
||||||
@ -119,6 +134,9 @@ in {
|
|||||||
cp -npd ${pkgs.libvirt}/var/lib/$i /var/lib/$i
|
cp -npd ${pkgs.libvirt}/var/lib/$i /var/lib/$i
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# Copy generated qemu config to libvirt directory
|
||||||
|
cp -f ${qemuConfigFile} /var/lib/libvirt/qemu.conf
|
||||||
|
|
||||||
# libvirtd puts the full path of the emulator binary in the machine
|
# libvirtd puts the full path of the emulator binary in the machine
|
||||||
# config file. But this path can unfortunately be garbage collected
|
# config file. But this path can unfortunately be garbage collected
|
||||||
# while still being used by the virtual machine. So update the
|
# while still being used by the virtual machine. So update the
|
||||||
|
Loading…
Reference in New Issue
Block a user