public inbox for kdevops@lists.linux.dev
 help / color / mirror / Atom feed
From: Luis Chamberlain <mcgrof@kernel.org>
To: kdevops@lists.linux.dev
Cc: Luis Chamberlain <mcgrof@kernel.org>
Subject: [PATCH 1/3] scripts/bringup_guestfs.sh: start networking for system session
Date: Mon,  4 Mar 2024 16:56:42 -0800	[thread overview]
Message-ID: <20240305005645.2697081-2-mcgrof@kernel.org> (raw)
In-Reply-To: <20240305005645.2697081-1-mcgrof@kernel.org>

When the system session is used we need to ensure we start the
default networking, otherwise we will get a complaint about
not finding mtu for virb0, or virb1, etc. Fix this by ensuring
that if the default networking is off, we start it.

Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
---
 scripts/bringup_guestfs.sh | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/scripts/bringup_guestfs.sh b/scripts/bringup_guestfs.sh
index 34ad48cbe81f..19e636fc64f3 100755
--- a/scripts/bringup_guestfs.sh
+++ b/scripts/bringup_guestfs.sh
@@ -7,6 +7,15 @@ source ${TOPDIR}/scripts/lib.sh
 
 export LIBVIRT_DEFAULT_URI=$CONFIG_LIBVIRT_URI
 
+# On systems using system sesion, ensure that we start the default
+# libvirt network.
+if [[ "$CONFIG_LIBVIRT_URI_SYSTEM" == "y" ]]; then
+	 sudo virsh net-list | grep -q default
+	 if [[ $? -ne 0 ]]; then
+		 sudo virsh net-start default
+	 fi
+fi
+
 #
 # We use the NVMe setting for virtio too (go figure), but IDE
 # requires qcow2
-- 
2.43.0


  reply	other threads:[~2024-03-05  0:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-05  0:56 [PATCH 0/3] kdevops: add debian support Luis Chamberlain
2024-03-05  0:56 ` Luis Chamberlain [this message]
2024-03-05  0:56 ` [PATCH 2/3] scripts/bringup_guestfs.sh: allow libvirt user to modify extra disks Luis Chamberlain
2024-03-05  0:56 ` [PATCH 3/3] guestfs: add debian guest support Luis Chamberlain
2024-03-06  0:12 ` [PATCH 0/3] kdevops: add debian support Luis Chamberlain

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240305005645.2697081-2-mcgrof@kernel.org \
    --to=mcgrof@kernel.org \
    --cc=kdevops@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox