sts-sponsors team mailing list archive
-
sts-sponsors team
-
Mailing list archive
-
Message #08792
[Merge] ~alexsander-souza/maas:lp2006497_fix_virsh_dom_templates into maas:master
Alexsander de Souza has proposed merging ~alexsander-souza/maas:lp2006497_fix_virsh_dom_templates into maas:master.
Commit message:
fix virsh domain templates
PS/2 bus exists only in some systems (PC), and in these cases QEMU automatically (and unconditionally) adds a compatible mouse and keyboard. In non compatible systems, declaring a PS/2 mouse or keyboard triggers an error in QEMU.
This fix removes PS/2 devices from incompatible templates and add a more generic keyboard when needed.
Requested reviews:
MAAS Lander (maas-lander): unittests
MAAS Maintainers (maas-maintainers)
Related bugs:
Bug #2006497 in MAAS: "unsupported configuration in virsh command"
https://bugs.launchpad.net/maas/+bug/2006497
For more details, see:
https://code.launchpad.net/~alexsander-souza/maas/+git/maas/+merge/443690
--
Your team MAAS Maintainers is requested to review the proposed merge of ~alexsander-souza/maas:lp2006497_fix_virsh_dom_templates into maas:master.
diff --git a/src/provisioningserver/drivers/pod/virsh.py b/src/provisioningserver/drivers/pod/virsh.py
index e211f6c..a5445d3 100644
--- a/src/provisioningserver/drivers/pod/virsh.py
+++ b/src/provisioningserver/drivers/pod/virsh.py
@@ -135,8 +135,6 @@ DOM_TEMPLATE_AMD64 = dedent(
<graphics type="spice" autoport="yes">
<image compression="off"/>
</graphics>
- <input type="mouse" bus="ps2"/>
- <input type="keyboard" bus="ps2"/>
</devices>
</domain>
"""
@@ -175,8 +173,7 @@ DOM_TEMPLATE_ARM64 = dedent(
<console type="pty">
<target type="serial" port="0"/>
</console>
- <input type="mouse" bus="ps2"/>
- <input type="keyboard" bus="ps2"/>
+ <input type="keyboard" bus="virtio">
</devices>
</domain>
"""
@@ -208,8 +205,7 @@ DOM_TEMPLATE_PPC64 = dedent(
<console type="pty">
<target type="serial" port="0"/>
</console>
- <input type="mouse" bus="ps2"/>
- <input type="keyboard" bus="ps2"/>
+ <input type="keyboard" bus="virtio">
</devices>
</domain>
"""
@@ -237,6 +233,7 @@ DOM_TEMPLATE_S390X = dedent(
<target type="sclp" port="0"/>
<alias name="console0"/>
</console>
+ <input type="keyboard" bus="virtio">
</devices>
</domain>
"""