aboutgitcodebugslistschat
path: root/test/distro/fedora
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2022-07-06 17:28:58 +1000
committerStefano Brivio <sbrivio@redhat.com>2022-07-14 01:32:42 +0200
commit7bcc5930a66ed8d6ba692a2463547d17390531e7 (patch)
tree5e02a9a14eb0b365b0899185cac55bfc4c20e15a /test/distro/fedora
parentc4d8a77512bf7e8224f3aff930ed48a680b4ea53 (diff)
downloadpasst-7bcc5930a66ed8d6ba692a2463547d17390531e7.tar
passt-7bcc5930a66ed8d6ba692a2463547d17390531e7.tar.gz
passt-7bcc5930a66ed8d6ba692a2463547d17390531e7.tar.bz2
passt-7bcc5930a66ed8d6ba692a2463547d17390531e7.tar.lz
passt-7bcc5930a66ed8d6ba692a2463547d17390531e7.tar.xz
passt-7bcc5930a66ed8d6ba692a2463547d17390531e7.tar.zst
passt-7bcc5930a66ed8d6ba692a2463547d17390531e7.zip
Invoke specific qemu-system-* binaries
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=kvm: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 <david@gibson.dropbear.id.au>
Diffstat (limited to 'test/distro/fedora')
-rw-r--r--test/distro/fedora22
1 files changed, 11 insertions, 11 deletions
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 <sbrivio@redhat.com>
temp PIDFILE
-htools wget virt-edit guestfish head sed cat kill
+htools wget virt-edit guestfish head sed cat kill qemu-system-x86_64
# 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/system/cloud-init-local.se
host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-final.service
host guestfish --rw -a __IMG__ -i copy-in __GUEST_FILES__ /root/
-host ./qrap 5 kvm -M pc -m 1024 -nographic -serial stdio -nodefaults -no-reboot -nographic -vga none __IMG__ -net socket,fd=5 -net nic,model=virtio
+host ./qrap 5 qemu-system-x86_64 -M pc,accel=kvm:tcg -m 1024 -nographic -serial stdio -nodefaults -no-reboot -nographic -vga none __IMG__ -net socket,fd=5 -net nic,model=virtio
host PS1='$ '
sleep 2
host yum -y install make gcc nmap-ncat
@@ -105,7 +105,7 @@ host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-init-local.se
host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-final.service
host guestfish --rw -a __IMG__ -i copy-in __GUEST_FILES__ /root/
-host ./qrap 5 kvm -M pc -m 1024 -nographic -serial stdio -nodefaults -no-reboot -nographic -vga none __IMG__ -net socket,fd=5 -net nic,model=virtio
+host ./qrap 5 qemu-system-x86_64 -M pc,accel=kvm:tcg -m 1024 -nographic -serial stdio -nodefaults -no-reboot -nographic -vga none __IMG__ -net socket,fd=5 -net nic,model=virtio
host PS1='$ '
sleep 2
host yum -y install make gcc nmap-ncat
@@ -132,7 +132,7 @@ host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-init-local.se
host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-final.service
host guestfish --rw -a __IMG__ -i copy-in __GUEST_FILES__ /root/
-host ./qrap 5 kvm -M pc -m 1024 -nographic -serial stdio -nodefaults -no-reboot -nographic -vga none __IMG__ -net socket,fd=5 -net nic,model=virtio
+host ./qrap 5 qemu-system-x86_64 -M pc,accel=kvm:tcg -m 1024 -nographic -serial stdio -nodefaults -no-reboot -nographic -vga none __IMG__ -net socket,fd=5 -net nic,model=virtio
host PS1='$ '
sleep 2
host yum -y install make gcc nmap-ncat
@@ -187,7 +187,7 @@ host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-init-local.se
host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-final.service
host guestfish --rw -a __IMG__ -i copy-in __GUEST_FILES__ /root/
-host ./qrap 5 kvm -M pc -m 1024 -nographic -serial stdio -nodefaults -no-reboot -nographic -vga none __IMG__ -net socket,fd=5 -net nic,model=virtio
+host ./qrap 5 qemu-system-x86_64 -M pc,accel=kvm:tcg -m 1024 -nographic -serial stdio -nodefaults -no-reboot -nographic -vga none __IMG__ -net socket,fd=5 -net nic,model=virtio
host PS1='$ '
sleep 2
host yum -y install make gcc nmap-ncat
@@ -242,7 +242,7 @@ host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-init-local.se
host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-final.service
host guestfish --rw -a __IMG__ -i copy-in __GUEST_FILES__ /root/
-host ./qrap 5 kvm -M pc -m 1024 -nographic -serial stdio -nodefaults -no-reboot -nographic -vga none __IMG__ -net socket,fd=5 -net nic,model=virtio
+host ./qrap 5 qemu-system-x86_64 -M pc,accel=kvm:tcg -m 1024 -nographic -serial stdio -nodefaults -no-reboot -nographic -vga none __IMG__ -net socket,fd=5 -net nic,model=virtio
host PS1='$ '
sleep 2
host yum -y install make gcc nmap-ncat
@@ -297,7 +297,7 @@ host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-init-local.se
host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-final.service
host guestfish --rw -a __IMG__ -i copy-in __GUEST_FILES__ /root/
-host ./qrap 5 kvm -M pc -m 1024 -nographic -serial stdio -nodefaults -no-reboot -nographic -vga none __IMG__ -net socket,fd=5 -net nic,model=virtio
+host ./qrap 5 qemu-system-x86_64 -M pc,accel=kvm:tcg -m 1024 -nographic -serial stdio -nodefaults -no-reboot -nographic -vga none __IMG__ -net socket,fd=5 -net nic,model=virtio
host PS1='$ '
sleep 2
host yum -y install make gcc nmap-ncat
@@ -352,7 +352,7 @@ host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-init-local.se
host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-final.service
host guestfish --rw -a __IMG__ -i copy-in __GUEST_FILES__ /root/
-host ./qrap 5 kvm -M pc -m 1024 -nographic -serial stdio -nodefaults -no-reboot -nographic -vga none __IMG__ -net socket,fd=5 -net nic,model=virtio
+host ./qrap 5 qemu-system-x86_64 -M pc,accel=kvm:tcg -m 1024 -nographic -serial stdio -nodefaults -no-reboot -nographic -vga none __IMG__ -net socket,fd=5 -net nic,model=virtio
host PS1='$ '
sleep 2
host yum -y install make gcc nmap-ncat
@@ -407,7 +407,7 @@ host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-init-local.se
host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-final.service
host guestfish --rw -a __IMG__ -i copy-in __GUEST_FILES__ /root/
-host ./qrap 5 kvm -M pc -m 1024 -nographic -serial stdio -nodefaults -no-reboot -nographic -vga none __IMG__ -net socket,fd=5 -net nic,model=virtio
+host ./qrap 5 qemu-system-x86_64 -M pc,accel=kvm:tcg -m 1024 -nographic -serial stdio -nodefaults -no-reboot -nographic -vga none __IMG__ -net socket,fd=5 -net nic,model=virtio
host PS1='$ '
sleep 2
host yum -y install make gcc nmap-ncat
@@ -462,7 +462,7 @@ host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-init-local.se
host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-final.service
host guestfish --rw -a __IMG__ -i copy-in __GUEST_FILES__ /root/
-host ./qrap 5 kvm -M pc -m 1024 -nographic -serial stdio -nodefaults -no-reboot -nographic -vga none __IMG__ -net socket,fd=5 -net nic,model=virtio
+host ./qrap 5 qemu-system-x86_64 -M pc,accel=kvm:tcg -m 1024 -nographic -serial stdio -nodefaults -no-reboot -nographic -vga none __IMG__ -net socket,fd=5 -net nic,model=virtio
host PS1='$ '
sleep 2
host yum -y install make gcc nmap-ncat
@@ -517,7 +517,7 @@ host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-init-local.se
host guestfish --rw -a __IMG__ -i rm /usr/lib/systemd/system/cloud-final.service
host guestfish --rw -a __IMG__ -i copy-in __GUEST_FILES__ /root/
-host ./qrap 5 kvm -M pc -m 1024 -nographic -serial stdio -nodefaults -no-reboot -nographic -vga none __IMG__ -net socket,fd=5 -net nic,model=virtio
+host ./qrap 5 qemu-system-x86_64 -M pc,accel=kvm:tcg -m 1024 -nographic -serial stdio -nodefaults -no-reboot -nographic -vga none __IMG__ -net socket,fd=5 -net nic,model=virtio
host PS1='$ '
sleep 2
host yum -y install make gcc nmap-ncat