From 6238736bff1deb2e785860eeaf5b5205478baef0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20=C5=A0urda?= Date: Sat, 16 Mar 2024 13:31:27 +0800 Subject: [PATCH] Improve kvm performance --- virt-install-all.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/virt-install-all.sh b/virt-install-all.sh index c0739ee..0b2a4eb 100755 --- a/virt-install-all.sh +++ b/virt-install-all.sh @@ -14,6 +14,7 @@ trusty() xml=$(mktemp) virt-install -r "$mempercore" --vcpus=2,maxvcpus=2,sockets=1,cores=1,threads=2 \ + --cpu host \ -n trusty_libvirt_"${hostname}_${id}" -w network=default --nographics \ --disk path=/var/lib/libvirt/ephemeral/trusty_libvirt_"${hostname}_${id}".qcow2 \ --disk path=/var/lib/libvirt/ephemeral/trusty_libvirt_"${hostname}_${id}".iso,device=cdrom \ @@ -40,6 +41,7 @@ xenial() xml=$(mktemp) virt-install -r "$mempercore" --vcpus=2,maxvcpus=2,sockets=1,cores=1,threads=2 \ + --cpu host \ -n xenial_libvirt_"${hostname}_${id}" -w network=default --nographics \ --disk path=/var/lib/libvirt/ephemeral/xenial_libvirt_"${hostname}_${id}".qcow2 \ --disk path=/var/lib/libvirt/ephemeral/xenial_libvirt_"${hostname}_${id}".iso,device=cdrom \ @@ -66,6 +68,7 @@ bionic() xml=$(mktemp) virt-install -r "$mempercore" --vcpus=2,maxvcpus=2,sockets=1,cores=1,threads=2 \ + --cpu host \ -n bionic_libvirt_"${hostname}_${id}" -w network=default --nographics \ --disk path=/var/lib/libvirt/ephemeral/bionic_libvirt_"${hostname}_${id}".qcow2 \ --disk path=/var/lib/libvirt/ephemeral/bionic_libvirt_"${hostname}_${id}".iso,device=cdrom \ @@ -92,6 +95,7 @@ focal() xml=$(mktemp) virt-install -r "$mempercore" --vcpus=2,maxvcpus=2,sockets=1,cores=1,threads=2 \ + --cpu host \ -n focal_libvirt_"${hostname}_${id}" -w network=default --nographics \ --disk path=/var/lib/libvirt/ephemeral/focal_libvirt_"${hostname}_${id}".qcow2 \ --disk path=/var/lib/libvirt/ephemeral/focal_libvirt_"${hostname}_${id}".iso,device=cdrom \