add spice.vgamem option for QXL video memory
When spice.vgamem is set (e.g. 64), uses -device qxl-vga,vgamem_mb=N instead of -vga qxl (which defaults to 16MB). When null (default), uses -vga qxl for backwards compatibility. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
dd5aeafae9
commit
4226f6fdfd
2 changed files with 6 additions and 1 deletions
|
|
@ -178,7 +178,7 @@ let
|
|||
${optionalString vmCfg.vnc.enable "-vnc ${vncArgs}"} \
|
||||
${optionalString (vmCfg.spice.enable && vmCfg.spice.passwordFile != null) "-object secret,id=spice-pass-${vmCfg.name},file=${escapeShellArg vmCfg.spice.passwordFile}"} \
|
||||
${optionalString vmCfg.spice.enable "-spice addr=${vmCfg.spice.addr},port=${toString vmCfg.spice.port}${optionalString (vmCfg.spice.passwordFile == null) ",disable-ticketing=on"}${optionalString (vmCfg.spice.passwordFile != null) ",password-secret=spice-pass-${vmCfg.name}"}"} \
|
||||
${optionalString vmCfg.spice.enable "-vga ${vmCfg.spice.displayDevice}"} \
|
||||
${optionalString vmCfg.spice.enable (if vmCfg.spice.displayDevice == "qxl" && vmCfg.spice.vgamem != null then "-vga none -device qxl-vga,vgamem_mb=${toString vmCfg.spice.vgamem}" else "-vga ${vmCfg.spice.displayDevice}")} \
|
||||
${optionalString (vmCfg.spice.enable && vmCfg.spice.agent.enable) "-device virtio-serial-pci -chardev spicevmc,id=vdagent,debug=0,name=vdagent -device virtserialport,chardev=vdagent,name=com.redhat.spice.0"} \
|
||||
${# Guest agent channel — prevents qemu-ga from spinning when virtio-win guest tools are installed
|
||||
optionalString isWindows "${optionalString (!vmCfg.spice.enable || !vmCfg.spice.agent.enable) "-device virtio-serial-pci"} -chardev socket,path=/tmp/qga-${vmCfg.name}.sock,server=on,wait=off,id=qga0 -device virtserialport,chardev=qga0,name=org.qemu.guest_agent.0"} \
|
||||
|
|
|
|||
|
|
@ -97,6 +97,11 @@ with lib;
|
|||
default = "qxl";
|
||||
description = "QEMU -vga type to use with SPICE (qxl, virtio, std, none).";
|
||||
};
|
||||
vgamem = mkOption {
|
||||
type = types.nullOr types.int;
|
||||
default = null;
|
||||
description = "Video memory in MB for QXL device. When set, uses -device qxl-vga instead of -vga qxl.";
|
||||
};
|
||||
};
|
||||
nographic = mkOption {
|
||||
type = types.bool;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue