From nobody Thu May 15 03:29:03 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1518055528182515.5072431761789; Wed, 7 Feb 2018 18:05:28 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0D2B9C065F88; Thu, 8 Feb 2018 02:05:27 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id DD03F609C0; Thu, 8 Feb 2018 02:05:26 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id AA8AB18033E0; Thu, 8 Feb 2018 02:05:26 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w1825594023188 for ; Wed, 7 Feb 2018 21:05:06 -0500 Received: by smtp.corp.redhat.com (Postfix) id 6269F2156A30; Thu, 8 Feb 2018 02:05:05 +0000 (UTC) Received: from tlap.laine.org.com (ovpn-120-186.rdu2.redhat.com [10.10.120.186]) by smtp.corp.redhat.com (Postfix) with ESMTP id 39BB82166BB3; Thu, 8 Feb 2018 02:05:05 +0000 (UTC) From: Laine Stump To: libvir-list@redhat.com Date: Wed, 7 Feb 2018 21:04:51 -0500 Message-Id: <20180208020459.16928-2-laine@laine.org> In-Reply-To: <20180208020459.16928-1-laine@laine.org> References: <20180208020459.16928-1-laine@laine.org> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com Subject: [libvirt] [tck PATCH 1/9] create vms that use virt-builder images with no graphics and virtio-net X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Thu, 08 Feb 2018 02:05:27 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" This is consistent with what is used to create the disk image supplied by virt-builder. It doesn't currently affect the outcome of the test, but it's possible that in the future it could. In particular, the network device name changes depending on whether or not there is a graphics device (due to change in PCI address). The virt-builder image is create by installing Fedora on a guest that has no graphics card, so it sees the network device as "ens2" and creates an appropriate ifcfg-ens2, but if you boot the image with a graphics card, then the network device will be named "ens3". It turns out that NetworkManager is enabled by default on the virt-builder images, and NetworkManager will listen for dhcp on *all* interfaces (not just those with a configuration file), so networking still functions on the guest, but if a test script were to try to use "ifdown ens3" (for example) that wouldn't work. The best solution may be to have the image set "biosdevnames=3D0 net.ifnames=3D0" on the kernel commandline (so that the netdev is always called "eth0" regardless of its PCI address), but that would also need to be done in the kickstart file used to create the image, which is done offline by libguestfs people, so it's not something we have control over here. Reviewed-by: Daniel P. Berrange --- lib/Sys/Virt/TCK.pm | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/lib/Sys/Virt/TCK.pm b/lib/Sys/Virt/TCK.pm index b39f578..ce8e81b 100644 --- a/lib/Sys/Virt/TCK.pm +++ b/lib/Sys/Virt/TCK.pm @@ -781,11 +781,6 @@ sub generic_machine_domain { =20 $b->boot_disk(); =20 - $b->graphics(type =3D> "vnc", - port =3D> "-1", - autoport =3D> "yes", - listen =3D> "127.0.0.1"); - $b->disk(src =3D> $config{root}, dst =3D> $config{dev}, type =3D> "file"); @@ -795,6 +790,7 @@ sub generic_machine_domain { =20 $b->interface(type =3D> "network", source =3D> "default", + model =3D> "virtio", mac =3D> "52:54:00:11:11:11", filterref =3D> "clean-traffic"); my $xml =3D $b->as_xml(); @@ -840,11 +836,6 @@ sub generic_machine_domain { # XXX boot CDROM or vroot for other HVs $b->boot_kernel($config{kernel}, $config{initrd}); =20 - $b->graphics(type =3D> "vnc", - port =3D> "-1", - autoport =3D> "yes", - listen =3D> "127.0.0.1"); - $b->disk(src =3D> $config{root}, dst =3D> $config{dev}, type =3D> "file"); @@ -930,6 +921,7 @@ sub generic_domain { if ($netmode eq "vepa") { $b->interface(type =3D> "direct", source =3D> "default", + model =3D> "virtio", mac =3D> "52:54:00:11:11:11", dev =3D> $self->get_host_network_device(), mode =3D> "vepa", @@ -937,6 +929,7 @@ sub generic_domain { } else { $b->interface(type =3D> "network", source =3D> "default", + model =3D> "virtio", mac =3D> "52:54:00:11:11:11", filterref =3D> "clean-traffic"); } --=20 2.13.6 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list