diff --git a/lisa/sut_orchestrator/libvirt/platform.py b/lisa/sut_orchestrator/libvirt/platform.py index 2946385686..0686de2a7b 100644 --- a/lisa/sut_orchestrator/libvirt/platform.py +++ b/lisa/sut_orchestrator/libvirt/platform.py @@ -406,6 +406,16 @@ def _deploy_nodes(self, environment: Environment, log: Logger) -> None: ): self._delete_nodes(environment, log) + self._log.debug("Capturing libvirtd log from host...") + self.host_node.execute( + cmd="journalctl -u libvirtd --no-page", + sudo=True, + ) + self.host_node.execute( + cmd="cat /var/log/libvirt/libvirtd.log", + sudo=True, + ) + raise ex # Pre-determine all the nodes' properties, including the name of all the resouces diff --git a/lisa/sut_orchestrator/libvirt/transformers.py b/lisa/sut_orchestrator/libvirt/transformers.py index 99cb2cc0a3..690710bbbb 100644 --- a/lisa/sut_orchestrator/libvirt/transformers.py +++ b/lisa/sut_orchestrator/libvirt/transformers.py @@ -561,6 +561,18 @@ def _install_libvirt(runbook: schema.TypedSchema, node: Node, log: Logger) -> No log.info("Enabled libvirtd and virtnetworkd services") node.reboot(time_out=900) _wait_for_libvirtd(node) + if isinstance(node.os, CBLMariner): + # Some time we have seen 'default' nw of libvirt is not started + # start it in that case and mark it auto-start + node.execute( + cmd="virsh net-start default", + sudo=True, + ) + node.execute( + cmd="virsh net-autostart default", + sudo=True, + ) + log.info("Marked 'default' libvirt network as auto-start") def _wait_for_libvirtd(node: Node) -> None: