From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Gibson To: passt-dev@passt.top Subject: [PATCH 2/5] Invoke specific qemu-system-* binaries Date: Thu, 23 Jun 2022 12:22:55 +1000 Message-ID: <20220623022258.4033116-3-david@gibson.dropbear.id.au> In-Reply-To: <20220623022258.4033116-1-david@gibson.dropbear.id.au> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0704337390666242298==" --===============0704337390666242298== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable A lot of tests and examples invoke qemu with the command "kvm". However, as far as I can tell, "kvm" being aliased to the appropriate qemu system binary is Debian specific. The binary names from qemu upstream - qemu-system-$ARCH - also aren't universal, but they are more common (they should be good for both Debian and Fedora at least). In order to still get KVM acceleration when available, we use the option "-M accel=3Dkvm:tcg" to tell qemu to try using either KVM or TCG in that order A number of the places we invoked "kvm" are expecting specifically an x86 guest, and so it's also safer to explicitly invoke qemu-system-x86_64. Some others appear to be independent of the target arch (just wanting the same arch as the host to allow KVM acceleration). Although I suspect there may be more subtle x86 specific options in the qemu command lines, attempt to preserve arch independence by using $(uname -m). Signed-off-by: David Gibson --- passt.1 | 6 +++--- test/demo/passt | 2 +- test/distro/debian | 12 ++++++------ test/distro/fedora | 22 +++++++++++----------- test/distro/opensuse | 10 +++++----- test/distro/ubuntu | 8 ++++---- test/lib/setup | 15 +++++++++++---- 7 files changed, 41 insertions(+), 34 deletions(-) diff --git a/passt.1 b/passt.1 index 3dccc63..c7c43be 100644 --- a/passt.1 +++ b/passt.1 @@ -616,16 +616,16 @@ NDP/DHCPv6: UNIX domain socket bound at /tmp/passt_1.socket =20 You can now start qrap: - ./qrap 5 kvm ... -net socket,fd=3D5 -net nic,model=3Dvirtio + ./qrap 5 qemu-system-x86_64 ... -net socket,fd=3D5 -net nic,model=3Dvirt= io or directly qemu, patched with: qemu/0001-net-Allow-also-UNIX-domain-sockets-to-be-used-as-net.patch as follows: - kvm ... -net socket,connect=3D/tmp/passt_1.socket -net nic,model=3Dvirtio + qemu-system-x86_64 ... -net socket,connect=3D/tmp/passt_1.socket -net ni= c,model=3Dvirtio =20 .fi .BR " [From another terminal]" .nf -$ ./qrap 5 kvm test.qcow2 -m 1024 -display none -nodefaults -nographic -net = socket,fd=3D5 -net nic,model=3Dvirtio +$ ./qrap 5 qemu-system-x86_64 test.qcow2 -m 1024 -display none -nodefaults -= nographic -net socket,fd=3D5 -net nic,model=3Dvirtio Connected to /tmp/passt_1.socket =20 .fi diff --git a/test/demo/passt b/test/demo/passt index ee4e7c2..0ece04f 100644 --- a/test/demo/passt +++ b/test/demo/passt @@ -103,7 +103,7 @@ nl say back-end to passt's UNIX domain socket. sleep 2 hout VMLINUZ echo "/boot/vmlinuz-$(uname -r)" -guest ../passt/qrap 5 kvm -m 4096 -cpu host -smp 4 -kernel __VMLINUZ__ -init= rd passt.img -nographic -serial stdio -nodefaults -append "console=3DttyS0 vi= rtio-net.napi_tx=3D1" -device virtio-net-pci,netdev=3Dhostnet0,x-txburst=3D16= 384 -netdev socket,fd=3D5,id=3Dhostnet0 +guest ../passt/qrap 5 qemu-system-x86_64 -enable-kvm -m 4096 -cpu host -smp = 4 -kernel __VMLINUZ__ -initrd passt.img -nographic -serial stdio -nodefaults = -append "console=3DttyS0 virtio-net.napi_tx=3D1" -device virtio-net-pci,netde= v=3Dhostnet0,x-txburst=3D16384 -netdev socket,fd=3D5,id=3Dhostnet0 sleep 10 =20 nl diff --git a/test/distro/debian b/test/distro/debian index 0ed541a..ce3b9e7 100644 --- a/test/distro/debian +++ b/test/distro/debian @@ -12,7 +12,7 @@ # Author: Stefano Brivio =20 temp PIDFILE -htools wget virt-edit guestfish head sed cat kill qemu-system-aarch64 qemu-s= ystem-ppc64 +htools wget virt-edit guestfish head sed cat kill qemu-system-x86_64 qemu-sy= stem-aarch64 qemu-system-ppc64 =20 # Quick pasta test: send message from init to ns, and from ns to init def distro_quick_pasta_test @@ -54,7 +54,7 @@ host guestfish --rw -a __IMG__ -i rm /etc/init.d/cloud-init host guestfish --rw -a __IMG__ -i rm /etc/init.d/cloud-init-local host guestfish --rw -a __IMG__ -i copy-in __GUEST_FILES__ /root/ =20 -host ./qrap 5 kvm -M pc -m 1024 -nographic -serial stdio -nodefaults -no-reb= oot -nographic -vga none -drive file=3D__IMG__,if=3Dvirtio -net socket,fd=3D5= -net nic,model=3Dvirtio +host ./qrap 5 qemu-system-x86_64 -M pc,accel=3Dkvm:tcg -m 1024 -nographic -s= erial stdio -nodefaults -no-reboot -nographic -vga none -drive file=3D__IMG__= ,if=3Dvirtio -net socket,fd=3D5 -net nic,model=3Dvirtio host PS1=3D'$ ' sleep 2 host apt-get update @@ -81,7 +81,7 @@ host virt-edit -a __IMG__ /etc/systemd/system/getty.target.= wants/getty(a)tty1.serv host guestfish --rw -a __IMG__ -i rm /lib/systemd/system/serial-getty(a).ser= vice host guestfish --rw -a __IMG__ -i copy-in __GUEST_FILES__ /root/ =20 -host ./qrap 5 kvm -M pc -m 1024 -nographic -serial stdio -nodefaults -no-reb= oot -nographic -vga none __IMG__ -net socket,fd=3D5 -net nic,model=3Dvirtio +host ./qrap 5 qemu-system-x86_64 -M pc,accel=3Dkvm:tcg -m 1024 -nographic -s= erial stdio -nodefaults -no-reboot -nographic -vga none __IMG__ -net socket,f= d=3D5 -net nic,model=3Dvirtio host PS1=3D'$ ' sleep 2 host apt-get update @@ -105,7 +105,7 @@ host virt-edit -a __IMG__ /etc/systemd/system/getty.targe= t.wants/getty(a)tty1.serv host guestfish --rw -a __IMG__ -i rm /lib/systemd/system/serial-getty(a).ser= vice host guestfish --rw -a __IMG__ -i copy-in __GUEST_FILES__ /root/ =20 -host ./qrap 5 kvm -M pc -m 1024 -nographic -serial stdio -nodefaults -no-reb= oot -nographic -vga none __IMG__ -net socket,fd=3D5 -net nic,model=3Dvirtio +host ./qrap 5 qemu-system-x86_64 -M pc,accel=3Dkvm:tcg -m 1024 -nographic -s= erial stdio -nodefaults -no-reboot -nographic -vga none __IMG__ -net socket,f= d=3D5 -net nic,model=3Dvirtio host PS1=3D'$ ' sleep 2 host apt-get update @@ -193,7 +193,7 @@ host virt-edit -a __IMG__ /etc/systemd/system/getty.targe= t.wants/getty(a)tty1.serv host guestfish --rw -a __IMG__ -i rm /lib/systemd/system/serial-getty(a).ser= vice host guestfish --rw -a __IMG__ -i copy-in __GUEST_FILES__ /root/ =20 -host ./qrap 5 kvm -M pc -m 1024 -nographic -serial stdio -nodefaults -no-reb= oot -nographic -vga none __IMG__ -net socket,fd=3D5 -net nic,model=3Dvirtio +host ./qrap 5 qemu-system-x86_64 -M pc,accel=3Dkvm:tcg -m 1024 -nographic -s= erial stdio -nodefaults -no-reboot -nographic -vga none __IMG__ -net socket,f= d=3D5 -net nic,model=3Dvirtio sleep 2 host apt-get update host apt-get -y install make gcc netcat-openbsd @@ -275,7 +275,7 @@ host virt-edit -a __IMG__ /etc/systemd/system/getty.targe= t.wants/getty(a)tty1.serv host guestfish --rw -a __IMG__ -i rm /lib/systemd/system/serial-getty(a).ser= vice host guestfish --rw -a __IMG__ -i copy-in __GUEST_FILES__ /root/ =20 -host ./qrap 5 kvm -M pc -m 1024 -nographic -serial stdio -nodefaults -no-reb= oot -nographic -vga none __IMG__ -net socket,fd=3D5 -net nic,model=3Dvirtio +host ./qrap 5 qemu-system-x86_64 -M pc,accel=3Dkvm:tcg -m 1024 -nographic -s= erial stdio -nodefaults -no-reboot -nographic -vga none __IMG__ -net socket,f= d=3D5 -net nic,model=3Dvirtio sleep 2 host apt-get update host apt-get -y install make gcc netcat-openbsd diff --git a/test/distro/fedora b/test/distro/fedora index c82d973..2a8e3e9 100644 --- a/test/distro/fedora +++ b/test/distro/fedora @@ -12,7 +12,7 @@ # Author: Stefano Brivio =20 temp PIDFILE -htools wget virt-edit guestfish head sed cat kill +htools wget virt-edit guestfish head sed cat kill qemu-system-x86_64 =20 # Quick pasta test: send message from init to ns, and from ns to init def distro_quick_pasta_test @@ -75,7 +75,7 @@ host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/syste= m/cloud-init-local.se host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-final.ser= vice host guestfish --rw -a __IMG__ -i copy-in __GUEST_FILES__ /root/ =20 -host ./qrap 5 kvm -M pc -m 1024 -nographic -serial stdio -nodefaults -no-reb= oot -nographic -vga none __IMG__ -net socket,fd=3D5 -net nic,model=3Dvirtio +host ./qrap 5 qemu-system-x86_64 -M pc,accel=3Dkvm:tcg -m 1024 -nographic -s= erial stdio -nodefaults -no-reboot -nographic -vga none __IMG__ -net socket,f= d=3D5 -net nic,model=3Dvirtio host PS1=3D'$ ' sleep 2 host yum -y install make gcc nmap-ncat @@ -105,7 +105,7 @@ host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/sys= tem/cloud-init-local.se host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-final.ser= vice host guestfish --rw -a __IMG__ -i copy-in __GUEST_FILES__ /root/ =20 -host ./qrap 5 kvm -M pc -m 1024 -nographic -serial stdio -nodefaults -no-reb= oot -nographic -vga none __IMG__ -net socket,fd=3D5 -net nic,model=3Dvirtio +host ./qrap 5 qemu-system-x86_64 -M pc,accel=3Dkvm:tcg -m 1024 -nographic -s= erial stdio -nodefaults -no-reboot -nographic -vga none __IMG__ -net socket,f= d=3D5 -net nic,model=3Dvirtio host PS1=3D'$ ' sleep 2 host yum -y install make gcc nmap-ncat @@ -132,7 +132,7 @@ host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/sys= tem/cloud-init-local.se host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-final.ser= vice host guestfish --rw -a __IMG__ -i copy-in __GUEST_FILES__ /root/ =20 -host ./qrap 5 kvm -M pc -m 1024 -nographic -serial stdio -nodefaults -no-reb= oot -nographic -vga none __IMG__ -net socket,fd=3D5 -net nic,model=3Dvirtio +host ./qrap 5 qemu-system-x86_64 -M pc,accel=3Dkvm:tcg -m 1024 -nographic -s= erial stdio -nodefaults -no-reboot -nographic -vga none __IMG__ -net socket,f= d=3D5 -net nic,model=3Dvirtio host PS1=3D'$ ' sleep 2 host yum -y install make gcc nmap-ncat @@ -187,7 +187,7 @@ host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/sys= tem/cloud-init-local.se host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-final.ser= vice host guestfish --rw -a __IMG__ -i copy-in __GUEST_FILES__ /root/ =20 -host ./qrap 5 kvm -M pc -m 1024 -nographic -serial stdio -nodefaults -no-reb= oot -nographic -vga none __IMG__ -net socket,fd=3D5 -net nic,model=3Dvirtio +host ./qrap 5 qemu-system-x86_64 -M pc,accel=3Dkvm:tcg -m 1024 -nographic -s= erial stdio -nodefaults -no-reboot -nographic -vga none __IMG__ -net socket,f= d=3D5 -net nic,model=3Dvirtio host PS1=3D'$ ' sleep 2 host yum -y install make gcc nmap-ncat @@ -242,7 +242,7 @@ host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/sys= tem/cloud-init-local.se host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-final.ser= vice host guestfish --rw -a __IMG__ -i copy-in __GUEST_FILES__ /root/ =20 -host ./qrap 5 kvm -M pc -m 1024 -nographic -serial stdio -nodefaults -no-reb= oot -nographic -vga none __IMG__ -net socket,fd=3D5 -net nic,model=3Dvirtio +host ./qrap 5 qemu-system-x86_64 -M pc,accel=3Dkvm:tcg -m 1024 -nographic -s= erial stdio -nodefaults -no-reboot -nographic -vga none __IMG__ -net socket,f= d=3D5 -net nic,model=3Dvirtio host PS1=3D'$ ' sleep 2 host yum -y install make gcc nmap-ncat @@ -297,7 +297,7 @@ host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/sys= tem/cloud-init-local.se host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-final.ser= vice host guestfish --rw -a __IMG__ -i copy-in __GUEST_FILES__ /root/ =20 -host ./qrap 5 kvm -M pc -m 1024 -nographic -serial stdio -nodefaults -no-reb= oot -nographic -vga none __IMG__ -net socket,fd=3D5 -net nic,model=3Dvirtio +host ./qrap 5 qemu-system-x86_64 -M pc,accel=3Dkvm:tcg -m 1024 -nographic -s= erial stdio -nodefaults -no-reboot -nographic -vga none __IMG__ -net socket,f= d=3D5 -net nic,model=3Dvirtio host PS1=3D'$ ' sleep 2 host yum -y install make gcc nmap-ncat @@ -352,7 +352,7 @@ host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/sys= tem/cloud-init-local.se host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-final.ser= vice host guestfish --rw -a __IMG__ -i copy-in __GUEST_FILES__ /root/ =20 -host ./qrap 5 kvm -M pc -m 1024 -nographic -serial stdio -nodefaults -no-reb= oot -nographic -vga none __IMG__ -net socket,fd=3D5 -net nic,model=3Dvirtio +host ./qrap 5 qemu-system-x86_64 -M pc,accel=3Dkvm:tcg -m 1024 -nographic -s= erial stdio -nodefaults -no-reboot -nographic -vga none __IMG__ -net socket,f= d=3D5 -net nic,model=3Dvirtio host PS1=3D'$ ' sleep 2 host yum -y install make gcc nmap-ncat @@ -407,7 +407,7 @@ host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/sys= tem/cloud-init-local.se host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-final.ser= vice host guestfish --rw -a __IMG__ -i copy-in __GUEST_FILES__ /root/ =20 -host ./qrap 5 kvm -M pc -m 1024 -nographic -serial stdio -nodefaults -no-reb= oot -nographic -vga none __IMG__ -net socket,fd=3D5 -net nic,model=3Dvirtio +host ./qrap 5 qemu-system-x86_64 -M pc,accel=3Dkvm:tcg -m 1024 -nographic -s= erial stdio -nodefaults -no-reboot -nographic -vga none __IMG__ -net socket,f= d=3D5 -net nic,model=3Dvirtio host PS1=3D'$ ' sleep 2 host yum -y install make gcc nmap-ncat @@ -462,7 +462,7 @@ host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/sys= tem/cloud-init-local.se host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-final.ser= vice host guestfish --rw -a __IMG__ -i copy-in __GUEST_FILES__ /root/ =20 -host ./qrap 5 kvm -M pc -m 1024 -nographic -serial stdio -nodefaults -no-reb= oot -nographic -vga none __IMG__ -net socket,fd=3D5 -net nic,model=3Dvirtio +host ./qrap 5 qemu-system-x86_64 -M pc,accel=3Dkvm:tcg -m 1024 -nographic -s= erial stdio -nodefaults -no-reboot -nographic -vga none __IMG__ -net socket,f= d=3D5 -net nic,model=3Dvirtio host PS1=3D'$ ' sleep 2 host yum -y install make gcc nmap-ncat @@ -517,7 +517,7 @@ host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/sys= tem/cloud-init-local.se host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-final.ser= vice host guestfish --rw -a __IMG__ -i copy-in __GUEST_FILES__ /root/ =20 -host ./qrap 5 kvm -M pc -m 1024 -nographic -serial stdio -nodefaults -no-reb= oot -nographic -vga none __IMG__ -net socket,fd=3D5 -net nic,model=3Dvirtio +host ./qrap 5 qemu-system-x86_64 -M pc,accel=3Dkvm:tcg -m 1024 -nographic -s= erial stdio -nodefaults -no-reboot -nographic -vga none __IMG__ -net socket,f= d=3D5 -net nic,model=3Dvirtio host PS1=3D'$ ' sleep 2 host yum -y install make gcc nmap-ncat diff --git a/test/distro/opensuse b/test/distro/opensuse index 2b49a5b..132474b 100644 --- a/test/distro/opensuse +++ b/test/distro/opensuse @@ -12,7 +12,7 @@ # Author: Stefano Brivio =20 temp PIDFILE -htools wget virt-edit guestfish head sed cat kill kvm qemu-system-aarch64 xz= cat tr +htools wget virt-edit guestfish head sed cat kill kvm qemu-system-x86_64 qem= u-system-aarch64 xzcat tr =20 # Quick pasta test: send message from init to ns, and from ns to init def distro_quick_pasta_test @@ -51,7 +51,7 @@ host guestfish --rw -a __IMG__ -i rm /etc/systemd/system/de= fault.target.wants/je host virt-edit -a __IMG__ /etc/systemd/system/getty.target.wants/getty(a)tty= 1.service -e 's/ExecStart=3D.*/ExecStart=3D\/sbin\/agetty --timeout 5000 --au= tologin root -i -8 --keep-baud 115200,38400,9600 ttyS0 $TERM/g' host guestfish --rw -a __IMG__ -i copy-in __GUEST_FILES__ /root/ =20 -host ./qrap 5 kvm -M pc -m 1024 -nographic -serial stdio -nodefaults -no-reb= oot -nographic -vga none __IMG__ -net socket,fd=3D5 -net nic,model=3Dvirtio +host ./qrap 5 qemu-system-x86_64 -M pc,accel=3Dkvm:tcg -m 1024 -nographic -s= erial stdio -nodefaults -no-reboot -nographic -vga none __IMG__ -net socket,f= d=3D5 -net nic,model=3Dvirtio host PS1=3D'$ ' host ip link set eth0 up sleep 2 @@ -79,7 +79,7 @@ host guestfish --rw -a __IMG__ -i rm /etc/systemd/system/de= fault.target.wants/je host virt-edit -a __IMG__ /etc/systemd/system/getty.target.wants/getty(a)tty= 1.service -e 's/ExecStart=3D.*/ExecStart=3D\/sbin\/agetty --timeout 5000 --au= tologin root -i -8 --keep-baud 115200,38400,9600 ttyS0 $TERM/g' host guestfish --rw -a __IMG__ -i copy-in __GUEST_FILES__ /root/ =20 -host ./qrap 5 kvm -M pc -m 1024 -nographic -serial stdio -nodefaults -no-reb= oot -nographic -vga none __IMG__ -net socket,fd=3D5 -net nic,model=3Dvirtio +host ./qrap 5 qemu-system-x86_64 -M pc,accel=3Dkvm:tcg -m 1024 -nographic -s= erial stdio -nodefaults -no-reboot -nographic -vga none __IMG__ -net socket,f= d=3D5 -net nic,model=3Dvirtio host PS1=3D'$ ' host ip link set eth0 up sleep 2 @@ -104,7 +104,7 @@ host guestfish --rw -a __IMG__ -i rm /etc/systemd/system/= default.target.wants/je host virt-edit -a __IMG__ /etc/systemd/system/getty.target.wants/getty(a)tty= 1.service -e 's/ExecStart=3D.*/ExecStart=3D\/sbin\/agetty --timeout 5000 --au= tologin root -i -8 --keep-baud 115200,38400,9600 ttyS0 $TERM/g' host guestfish --rw -a __IMG__ -i copy-in __GUEST_FILES__ /root/ =20 -host ./qrap 5 kvm -M pc -m 1024 -nographic -serial stdio -nodefaults -no-reb= oot -nographic -vga none __IMG__ -net socket,fd=3D5 -net nic,model=3Dvirtio +host ./qrap 5 qemu-system-x86_64 -M pc,accel=3Dkvm:tcg -m 1024 -nographic -s= erial stdio -nodefaults -no-reboot -nographic -vga none __IMG__ -net socket,f= d=3D5 -net nic,model=3Dvirtio # Multiple prompt logins might come up here sleep 10 host PS1=3D'$ ' @@ -186,7 +186,7 @@ host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/sys= tem/serial-getty(a).servi host virt-edit -a __IMG__ /etc/systemd/system/getty.target.wants/getty(a)tty= 1.service -e 's/ExecStart=3D.*/ExecStart=3D\/sbin\/agetty --timeout 5000 --au= tologin root -i -8 --keep-baud 115200,38400,9600 ttyS0 $TERM/g' host guestfish --rw -a __IMG__ -i copy-in __GUEST_FILES__ /root/ =20 -host ./qrap 5 kvm -M pc -m 1024 -nographic -serial stdio -nodefaults -no-reb= oot -nographic -vga none __IMG__ -net socket,fd=3D5 -net nic,model=3Dvirtio +host ./qrap 5 qemu-system-x86_64 -M pc,accel=3Dkvm:tcg -m 1024 -nographic -s= erial stdio -nodefaults -no-reboot -nographic -vga none __IMG__ -net socket,f= d=3D5 -net nic,model=3Dvirtio host PS1=3D'$ ' host ip link set ens2 up sleep 2 diff --git a/test/distro/ubuntu b/test/distro/ubuntu index 50ed727..20b861a 100644 --- a/test/distro/ubuntu +++ b/test/distro/ubuntu @@ -1,4 +1,4 @@ -# SPDX-License-Identifier: AGPL-3.0-or-later +<# SPDX-License-Identifier: AGPL-3.0-or-later # # PASST - Plug A Simple Socket Transport # for qemu/UNIX domain socket mode @@ -12,7 +12,7 @@ # Author: Stefano Brivio =20 temp PIDFILE -htools wget virt-edit guestfish head sed cat kill qemu-system-ppc64 qemu-sys= tem-s390x +htools wget virt-edit guestfish head sed cat kill qemu-system-x86_64 qemu-sy= stem-ppc64 qemu-system-s390x =20 # Quick pasta test: send message from init to ns, and from ns to init def distro_quick_pasta_test @@ -55,7 +55,7 @@ host guestfish --rw -a __IMG__ -i rm /etc/init/cloud-init.c= onf host guestfish --rw -a __IMG__ -i rm /etc/init/cloud-log-shutdown.conf host guestfish --rw -a __IMG__ -i copy-in __GUEST_FILES__ /root/ =20 -host ./qrap 5 kvm -M pc -m 1024 -nographic -serial stdio -nodefaults -no-reb= oot -nographic -vga none -drive file=3D__IMG__,if=3Dvirtio -net socket,fd=3D5= -net nic,model=3Dvirtio +host ./qrap 5 qemu-system-x86_64 -M pc,accel=3Dkvm:tcg -m 1024 -nographic -s= erial stdio -nodefaults -no-reboot -nographic -vga none -drive file=3D__IMG__= ,if=3Dvirtio -net socket,fd=3D5 -net nic,model=3Dvirtio host PS1=3D'$ ' sleep 2 host apt-get update @@ -88,7 +88,7 @@ host guestfish --rw -a __IMG__ -i rm /etc/init/cloud-init.c= onf host guestfish --rw -a __IMG__ -i rm /etc/init/cloud-log-shutdown.conf host guestfish --rw -a __IMG__ -i copy-in __GUEST_FILES__ /root/ =20 -host ./qrap 5 kvm -M pc -m 1024 -nographic -serial stdio -nodefaults -no-reb= oot -nographic -vga none -drive file=3D__IMG__,if=3Dvirtio -net socket,fd=3D5= -net nic,model=3Dvirtio +host ./qrap 5 qemu-system-x86_64 -M pc,accel=3Dkvm:tcg -m 1024 -nographic -s= erial stdio -nodefaults -no-reboot -nographic -vga none -drive file=3D__IMG__= ,if=3Dvirtio -net socket,fd=3D5 -net nic,model=3Dvirtio host PS1=3D'$ ' sleep 2 host apt-get update diff --git a/test/lib/setup b/test/lib/setup index e57d97c..0b6d915 100755 --- a/test/lib/setup +++ b/test/lib/setup @@ -58,7 +58,8 @@ setup_passt() { pane_run PASST "valgrind --max-stackframe=3D$((4 * 1024 * 1024)) --trace-ch= ildren=3Dyes --vgdb=3Dno --error-exitcode=3D1 --suppressions=3Dtest/valgrind.= supp ./passt ${__opts} -f -t 10001 -u 10001 -P passt.pid" sleep 5 =20 - pane_run GUEST './qrap 5 kvm -m '${VMEM}' -cpu host -smp '${VCPUS} \ + pane_run GUEST './qrap 5 qemu-system-$(uname -m)' \ + '-m '${VMEM}' -cpu host -smp '${VCPUS} \ ' -kernel ' "/boot/vmlinuz-$(uname -r)" \ ' -initrd mbuto.img -nographic -serial stdio' \ ' -nodefaults' \ @@ -170,7 +171,9 @@ setup_passt_in_ns() { fi sleep 5 =20 - pane_run GUEST './qrap 5 kvm -m '${VMEM}' -cpu host -smp '${VCPUS} \ + pane_run GUEST './qrap 5 qemu-system-$(uname -m)' \ + ' -M accel=3Dkvm:tcg' \ + ' -m '${VMEM}' -cpu host -smp '${VCPUS} \ ' -kernel ' "/boot/vmlinuz-$(uname -r)" \ ' -initrd mbuto.img -nographic -serial stdio' \ ' -nodefaults' \ @@ -259,7 +262,9 @@ setup_two_guests() { pane_run GUEST_2 'cp mbuto.img mbuto_2.img' pane_status GUEST_2 =20 - pane_run GUEST_1 './qrap 5 kvm -m '${VMEM}' -cpu host -smp '${VCPUS} \ + pane_run GUEST_1 './qrap 5 qemu-system-$(uname -m)' \ + ' -M accel=3Dkvm:tcg' \ + ' -m '${VMEM}' -cpu host -smp '${VCPUS} \ ' -kernel ' "/boot/vmlinuz-$(uname -r)" \ ' -initrd mbuto.img -nographic -serial stdio' \ ' -nodefaults' \ @@ -267,7 +272,9 @@ setup_two_guests() { 'virtio-net.napi_tx=3D1"' \ " -device virtio-net-pci,netdev=3Dhostnet0,x-txburst=3D16384" \ " -netdev socket,fd=3D5,id=3Dhostnet0" - pane_run GUEST_2 './qrap 5 kvm -m '${VMEM}' -cpu host -smp '${VCPUS} \ + pane_run GUEST_2 './qrap 5 qemu-system-$(uname -m)' \ + ' -M accel=3Dkvm:tcg' \ + ' -m '${VMEM}' -cpu host -smp '${VCPUS} \ ' -kernel ' "/boot/vmlinuz-$(uname -r)" \ ' -initrd mbuto_2.img -nographic -serial stdio' \ ' -nodefaults' \ --=20 2.36.1 --===============0704337390666242298==--