Fix QEMU Version for compatibility with PVE 7.3

This commit is contained in:
Gabriel 2022-12-12 18:53:25 -03:00
parent a42d7909c0
commit 42eb0b4c5f

24
setup
View File

@ -334,7 +334,7 @@ do
--ide2 local:iso/recovery-highsierra.iso,cache=unsafe,size=800M > ${LOGFILE} 2>> ${LOGFILE} --ide2 local:iso/recovery-highsierra.iso,cache=unsafe,size=800M > ${LOGFILE} 2>> ${LOGFILE}
## Fix for QEMU 6.1 for PCI Passthrough ## Fix for QEMU 6.1 for PCI Passthrough
if [ `qemu-system-x86_64 --version | grep -e "6.1" -e "6.2" | wc -l` -eq 1 ] if [ `qemu-system-x86_64 --version | grep -e "6.1" -e "6.2" -e "7.1" | wc -l` -eq 1 ]
then then
sed -i 's/+bmi2,+xsave,+xsaveopt,check/+bmi2,+xsave,+xsaveopt,check -global ICH9-LPC.acpi-pci-hotplug-with-bridge-support=off/g' /etc/pve/qemu-server/${VM_ID}.conf sed -i 's/+bmi2,+xsave,+xsaveopt,check/+bmi2,+xsave,+xsaveopt,check -global ICH9-LPC.acpi-pci-hotplug-with-bridge-support=off/g' /etc/pve/qemu-server/${VM_ID}.conf
fi fi
@ -374,7 +374,7 @@ do
--ide2 local:iso/recovery-highsierra.iso,cache=unsafe,size=800M > ${LOGFILE} 2>> ${LOGFILE} --ide2 local:iso/recovery-highsierra.iso,cache=unsafe,size=800M > ${LOGFILE} 2>> ${LOGFILE}
## Fix for QEMU 6.1 for PCI Passthrough ## Fix for QEMU 6.1 for PCI Passthrough
if [ `qemu-system-x86_64 --version | grep -e "6.1" -e "6.2" | wc -l` -eq 1 ] if [ `qemu-system-x86_64 --version | grep -e "6.1" -e "6.2" -e "7.1" | wc -l` -eq 1 ]
then then
sed -i 's/+kvm_pv_eoi,+hypervisor,+invtsc/+kvm_pv_eoi,+hypervisor,+invtsc -global ICH9-LPC.acpi-pci-hotplug-with-bridge-support=off/g' /etc/pve/qemu-server/${VM_ID}.conf sed -i 's/+kvm_pv_eoi,+hypervisor,+invtsc/+kvm_pv_eoi,+hypervisor,+invtsc -global ICH9-LPC.acpi-pci-hotplug-with-bridge-support=off/g' /etc/pve/qemu-server/${VM_ID}.conf
fi fi
@ -525,7 +525,7 @@ do
--ide2 local:iso/recovery-mojave.iso,cache=unsafe,size=800M > ${LOGFILE} 2>> ${LOGFILE} --ide2 local:iso/recovery-mojave.iso,cache=unsafe,size=800M > ${LOGFILE} 2>> ${LOGFILE}
## Fix for QEMU 6.1 for PCI Passthrough ## Fix for QEMU 6.1 for PCI Passthrough
if [ `qemu-system-x86_64 --version | grep -e "6.1" -e "6.2" | wc -l` -eq 1 ] if [ `qemu-system-x86_64 --version | grep -e "6.1" -e "6.2" -e "7.1" | wc -l` -eq 1 ]
then then
sed -i 's/+bmi2,+xsave,+xsaveopt,check/+bmi2,+xsave,+xsaveopt,check -global ICH9-LPC.acpi-pci-hotplug-with-bridge-support=off/g' /etc/pve/qemu-server/${VM_ID}.conf sed -i 's/+bmi2,+xsave,+xsaveopt,check/+bmi2,+xsave,+xsaveopt,check -global ICH9-LPC.acpi-pci-hotplug-with-bridge-support=off/g' /etc/pve/qemu-server/${VM_ID}.conf
fi fi
@ -565,7 +565,7 @@ do
--ide2 local:iso/recovery-mojave.iso,cache=unsafe,size=800M > ${LOGFILE} 2>> ${LOGFILE} --ide2 local:iso/recovery-mojave.iso,cache=unsafe,size=800M > ${LOGFILE} 2>> ${LOGFILE}
## Fix for QEMU 6.1 for PCI Passthrough ## Fix for QEMU 6.1 for PCI Passthrough
if [ `qemu-system-x86_64 --version | grep -e "6.1" -e "6.2" | wc -l` -eq 1 ] if [ `qemu-system-x86_64 --version | grep -e "6.1" -e "6.2" -e "7.1" | wc -l` -eq 1 ]
then then
sed -i 's/+kvm_pv_eoi,+hypervisor,+invtsc/+kvm_pv_eoi,+hypervisor,+invtsc -global ICH9-LPC.acpi-pci-hotplug-with-bridge-support=off/g' /etc/pve/qemu-server/${VM_ID}.conf sed -i 's/+kvm_pv_eoi,+hypervisor,+invtsc/+kvm_pv_eoi,+hypervisor,+invtsc -global ICH9-LPC.acpi-pci-hotplug-with-bridge-support=off/g' /etc/pve/qemu-server/${VM_ID}.conf
fi fi
@ -716,7 +716,7 @@ do
--ide2 local:iso/recovery-catalina.iso,cache=unsafe,size=800M > ${LOGFILE} 2>> ${LOGFILE} --ide2 local:iso/recovery-catalina.iso,cache=unsafe,size=800M > ${LOGFILE} 2>> ${LOGFILE}
## Fix for QEMU 6.1 for PCI Passthrough ## Fix for QEMU 6.1 for PCI Passthrough
if [ `qemu-system-x86_64 --version | grep -e "6.1" -e "6.2" | wc -l` -eq 1 ] if [ `qemu-system-x86_64 --version | grep -e "6.1" -e "6.2" -e "7.1" | wc -l` -eq 1 ]
then then
sed -i 's/+bmi2,+xsave,+xsaveopt,check/+bmi2,+xsave,+xsaveopt,check -global ICH9-LPC.acpi-pci-hotplug-with-bridge-support=off/g' /etc/pve/qemu-server/${VM_ID}.conf sed -i 's/+bmi2,+xsave,+xsaveopt,check/+bmi2,+xsave,+xsaveopt,check -global ICH9-LPC.acpi-pci-hotplug-with-bridge-support=off/g' /etc/pve/qemu-server/${VM_ID}.conf
fi fi
@ -756,7 +756,7 @@ do
--ide2 local:iso/recovery-catalina.iso,cache=unsafe,size=800M > ${LOGFILE} 2>> ${LOGFILE} --ide2 local:iso/recovery-catalina.iso,cache=unsafe,size=800M > ${LOGFILE} 2>> ${LOGFILE}
## Fix for QEMU 6.1 for PCI Passthrough ## Fix for QEMU 6.1 for PCI Passthrough
if [ `qemu-system-x86_64 --version | grep -e "6.1" -e "6.2" | wc -l` -eq 1 ] if [ `qemu-system-x86_64 --version | grep -e "6.1" -e "6.2" -e "7.1" | wc -l` -eq 1 ]
then then
sed -i 's/+kvm_pv_eoi,+hypervisor,+invtsc/+kvm_pv_eoi,+hypervisor,+invtsc -global ICH9-LPC.acpi-pci-hotplug-with-bridge-support=off/g' /etc/pve/qemu-server/${VM_ID}.conf sed -i 's/+kvm_pv_eoi,+hypervisor,+invtsc/+kvm_pv_eoi,+hypervisor,+invtsc -global ICH9-LPC.acpi-pci-hotplug-with-bridge-support=off/g' /etc/pve/qemu-server/${VM_ID}.conf
fi fi
@ -907,7 +907,7 @@ do
--ide2 local:iso/recovery-bigsur.iso,cache=unsafe,size=800M > ${LOGFILE} 2>> ${LOGFILE} --ide2 local:iso/recovery-bigsur.iso,cache=unsafe,size=800M > ${LOGFILE} 2>> ${LOGFILE}
## Fix for QEMU 6.1 for PCI Passthrough ## Fix for QEMU 6.1 for PCI Passthrough
if [ `qemu-system-x86_64 --version | grep -e "6.1" -e "6.2" | wc -l` -eq 1 ] if [ `qemu-system-x86_64 --version | grep -e "6.1" -e "6.2" -e "7.1" | wc -l` -eq 1 ]
then then
sed -i 's/+bmi2,+xsave,+xsaveopt,check/+bmi2,+xsave,+xsaveopt,check -global ICH9-LPC.acpi-pci-hotplug-with-bridge-support=off/g' /etc/pve/qemu-server/${VM_ID}.conf sed -i 's/+bmi2,+xsave,+xsaveopt,check/+bmi2,+xsave,+xsaveopt,check -global ICH9-LPC.acpi-pci-hotplug-with-bridge-support=off/g' /etc/pve/qemu-server/${VM_ID}.conf
fi fi
@ -947,7 +947,7 @@ do
--ide2 local:iso/recovery-bigsur.iso,cache=unsafe,size=800M > ${LOGFILE} 2>> ${LOGFILE} --ide2 local:iso/recovery-bigsur.iso,cache=unsafe,size=800M > ${LOGFILE} 2>> ${LOGFILE}
## Fix for QEMU 6.1 for PCI Passthrough ## Fix for QEMU 6.1 for PCI Passthrough
if [ `qemu-system-x86_64 --version | grep -e "6.1" -e "6.2" | wc -l` -eq 1 ] if [ `qemu-system-x86_64 --version | grep -e "6.1" -e "6.2" -e "7.1" | wc -l` -eq 1 ]
then then
sed -i 's/+kvm_pv_eoi,+hypervisor,+invtsc/+kvm_pv_eoi,+hypervisor,+invtsc -global ICH9-LPC.acpi-pci-hotplug-with-bridge-support=off/g' /etc/pve/qemu-server/${VM_ID}.conf sed -i 's/+kvm_pv_eoi,+hypervisor,+invtsc/+kvm_pv_eoi,+hypervisor,+invtsc -global ICH9-LPC.acpi-pci-hotplug-with-bridge-support=off/g' /etc/pve/qemu-server/${VM_ID}.conf
fi fi
@ -1098,7 +1098,7 @@ do
--ide2 local:iso/recovery-monterey.iso,cache=unsafe,size=800M > ${LOGFILE} 2>> ${LOGFILE} --ide2 local:iso/recovery-monterey.iso,cache=unsafe,size=800M > ${LOGFILE} 2>> ${LOGFILE}
## Fix for QEMU 6.1 for PCI Passthrough ## Fix for QEMU 6.1 for PCI Passthrough
if [ `qemu-system-x86_64 --version | grep -e "6.1" -e "6.2" | wc -l` -eq 1 ] if [ `qemu-system-x86_64 --version | grep -e "6.1" -e "6.2" -e "7.1" | wc -l` -eq 1 ]
then then
sed -i 's/+bmi2,+xsave,+xsaveopt,check/+bmi2,+xsave,+xsaveopt,check -global ICH9-LPC.acpi-pci-hotplug-with-bridge-support=off/g' /etc/pve/qemu-server/${VM_ID}.conf sed -i 's/+bmi2,+xsave,+xsaveopt,check/+bmi2,+xsave,+xsaveopt,check -global ICH9-LPC.acpi-pci-hotplug-with-bridge-support=off/g' /etc/pve/qemu-server/${VM_ID}.conf
fi fi
@ -1138,7 +1138,7 @@ do
--ide2 local:iso/recovery-monterey.iso,cache=unsafe,size=800M > ${LOGFILE} 2>> ${LOGFILE} --ide2 local:iso/recovery-monterey.iso,cache=unsafe,size=800M > ${LOGFILE} 2>> ${LOGFILE}
## Fix for QEMU 6.1 for PCI Passthrough ## Fix for QEMU 6.1 for PCI Passthrough
if [ `qemu-system-x86_64 --version | grep -e "6.1" -e "6.2" | wc -l` -eq 1 ] if [ `qemu-system-x86_64 --version | grep -e "6.1" -e "6.2" -e "7.1" | wc -l` -eq 1 ]
then then
sed -i 's/+kvm_pv_eoi,+hypervisor,+invtsc/+kvm_pv_eoi,+hypervisor,+invtsc -global ICH9-LPC.acpi-pci-hotplug-with-bridge-support=off/g' /etc/pve/qemu-server/${VM_ID}.conf sed -i 's/+kvm_pv_eoi,+hypervisor,+invtsc/+kvm_pv_eoi,+hypervisor,+invtsc -global ICH9-LPC.acpi-pci-hotplug-with-bridge-support=off/g' /etc/pve/qemu-server/${VM_ID}.conf
fi fi
@ -1289,7 +1289,7 @@ do
--ide2 local:iso/recovery-ventura.iso,cache=unsafe,size=800M > ${LOGFILE} 2>> ${LOGFILE} --ide2 local:iso/recovery-ventura.iso,cache=unsafe,size=800M > ${LOGFILE} 2>> ${LOGFILE}
## Fix for QEMU 6.1 for PCI Passthrough ## Fix for QEMU 6.1 for PCI Passthrough
if [ `qemu-system-x86_64 --version | grep -e "6.1" -e "6.2" | wc -l` -eq 1 ] if [ `qemu-system-x86_64 --version | grep -e "6.1" -e "6.2" -e "7.1" | wc -l` -eq 1 ]
then then
sed -i 's/+invtsc,-pcid,-hle,-rtm,-avx512f,-avx512dq,-avx512cd,-avx512bw,-avx512vl,-avx512vnni,kvm=on,vmware-cpuid-freq=on/+invtsc,-pcid,-hle,-rtm,-avx512f,-avx512dq,-avx512cd,-avx512bw,-avx512vl,-avx512vnni,kvm=on,vmware-cpuid-freq=on -global ICH9-LPC.acpi-pci-hotplug-with-bridge-support=off/g' /etc/pve/qemu-server/${VM_ID}.conf sed -i 's/+invtsc,-pcid,-hle,-rtm,-avx512f,-avx512dq,-avx512cd,-avx512bw,-avx512vl,-avx512vnni,kvm=on,vmware-cpuid-freq=on/+invtsc,-pcid,-hle,-rtm,-avx512f,-avx512dq,-avx512cd,-avx512bw,-avx512vl,-avx512vnni,kvm=on,vmware-cpuid-freq=on -global ICH9-LPC.acpi-pci-hotplug-with-bridge-support=off/g' /etc/pve/qemu-server/${VM_ID}.conf
fi fi
@ -1329,7 +1329,7 @@ do
--ide2 local:iso/recovery-ventura.iso,cache=unsafe,size=800M > ${LOGFILE} 2>> ${LOGFILE} --ide2 local:iso/recovery-ventura.iso,cache=unsafe,size=800M > ${LOGFILE} 2>> ${LOGFILE}
## Fix for QEMU 6.1 for PCI Passthrough ## Fix for QEMU 6.1 for PCI Passthrough
if [ `qemu-system-x86_64 --version | grep -e "6.1" -e "6.2" | wc -l` -eq 1 ] if [ `qemu-system-x86_64 --version | grep -e "6.1" -e "6.2" -e "7.1" | wc -l` -eq 1 ]
then then
sed -i 's/+kvm_pv_eoi,+hypervisor,+invtsc/+kvm_pv_eoi,+hypervisor,+invtsc -global ICH9-LPC.acpi-pci-hotplug-with-bridge-support=off/g' /etc/pve/qemu-server/${VM_ID}.conf sed -i 's/+kvm_pv_eoi,+hypervisor,+invtsc/+kvm_pv_eoi,+hypervisor,+invtsc -global ICH9-LPC.acpi-pci-hotplug-with-bridge-support=off/g' /etc/pve/qemu-server/${VM_ID}.conf
fi fi