diff --git a/src/config.rs b/src/config.rs index 0540b80..382ec92 100644 --- a/src/config.rs +++ b/src/config.rs @@ -35,8 +35,6 @@ pub struct Config { gpu: Box, #[serde(default, deserialize_with = "default_when_missing")] spice: Option, - //#[serde(default, deserialize_with = "default_when_missing")] - //looking_glass: Option, #[serde(default, deserialize_with = "default_when_missing")] host: Option, #[serde(default, deserialize_with = "default_when_missing")] @@ -145,7 +143,6 @@ mod tests { name: wakiza system: - chipset: { type: "q35", version: "8.1" } bios: { type: "ovmf", uuid: "04d064c3-66a1-4aa7-9589-f8b3ecf91cd7", file: "/dev/vm1/vm-108-efidisk" } cpu: { model: "qemu64", sockets: 1, cores: 8, flags: "+aes,+pni,+popcnt,+sse4.1,+sse4.2,+ssse3,enforce" } memory: { max: 16384, balloon: false } @@ -242,10 +239,7 @@ mod tests { name: gyndine system: - chipset: { type: "q35", version: "8.1" } bios: { type: "ovmf", uuid: "c0e240a5-859a-4378-a2d9-95088f531142", file: "/dev/vm1/vm-950-disk-0" } - cpu: { model: "qemu64", sockets: 1, cores: 8, flags: "+aes,+pni,+popcnt,+sse4.1,+sse4.2,+ssse3,enforce" } - memory: { max: 16384, balloon: false } gpu: type: "virtio-vga-gl" @@ -287,7 +281,7 @@ mod tests { "-drive", "if=pflash,unit=0,format=raw,readonly=on,file=/usr/share/ezkvm/OVMF_CODE.secboot.4m.fd", "-drive", "if=pflash,unit=1,id=drive-efidisk0,format=raw,file=/dev/vm1/vm-950-disk-0,size=540672", "-m", "16384", - "-smp", "8,sockets=1,cores=8,maxcpus=8", + "-smp", "4,sockets=1,cores=4,maxcpus=4", "-cpu", "qemu64,+aes,+pni,+popcnt,+sse4.1,+sse4.2,+ssse3,enforce", "-display", "gtk,gl=on", "-audiodev", "pipewire,id=audiodev0", diff --git a/src/config/display/looking_glass.rs b/src/config/display/looking_glass.rs index a7532e5..18cb37d 100644 --- a/src/config/display/looking_glass.rs +++ b/src/config/display/looking_glass.rs @@ -155,7 +155,14 @@ mod tests { window: None, input: None, }; - let expected: Vec = vec![]; + let expected: Vec = vec![ + "-vga none".to_string(), + "-nographic".to_string(), + "-device virtio-mouse".to_string(), + "-device virtio-keyboard".to_string(), + "-device ivshmem-plain,memdev=ivshmem0,bus=pcie.0".to_string(), + "-object memory-backend-file,id=ivshmem0,share=on,mem-path=,size=".to_string(), + ]; assert_eq!(display.get_qemu_args(0), expected); } } diff --git a/src/config/system/memory.rs b/src/config/system/memory.rs index 68a9f3c..a9668f7 100644 --- a/src/config/system/memory.rs +++ b/src/config/system/memory.rs @@ -16,7 +16,7 @@ impl Memory { impl Default for Memory { fn default() -> Self { Self { - max: 2048, + max: 16384, balloon: None, } }