diff mbox

[OSSTEST,v2,11/19] ts-debian-hvm-install: disable new nic naming scheme

Message ID 20171031135203.11537-12-wei.liu2@citrix.com (mailing list archive)
State New, archived
Headers show

Commit Message

Wei Liu Oct. 31, 2017, 1:51 p.m. UTC
This is required to fix nested hvm test. The L1 host is installed by
this script. We want the L1 host to not use the new nic naming scheme.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
---
 ts-debian-hvm-install | 13 +++++++++++++
 1 file changed, 13 insertions(+)
diff mbox

Patch

diff --git a/ts-debian-hvm-install b/ts-debian-hvm-install
index 54d5d1c..afe8dc9 100755
--- a/ts-debian-hvm-install
+++ b/ts-debian-hvm-install
@@ -114,6 +114,19 @@  set -ex
 in-target sed -i 's/^deb *cdrom/#&/g' /etc/apt/sources.list
 END
 
+    # Do not use "Predictable Network Interface Names" -- this can break
+    # nested HVM tests.
+    # https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/
+    #
+    # See also
+    # https://www.debian.org/releases/stretch/example-preseed.txt
+    my $netifnames = "";
+    $netifnames = <<END if $ho->{Suite} =~ m/stretch/;
+d-i debian-installer/add-kernel-opts string net.ifnames=0
+END
+
+    $preseed_file .= "$netifnames";
+
     $preseed_file .= preseed_hook_cmds();
 
     return $preseed_file;