From 08233d033387502106c7f0fd9db2da79269df036 Mon Sep 17 00:00:00 2001 From: Raghavendra Talur Date: Fri, 8 Sep 2023 06:39:55 -0400 Subject: [PATCH 1/2] qemu: increase the timeout for detecting the IP address Signed-off-by: Raghavendra Talur --- pkg/drivers/qemu/qemu.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/drivers/qemu/qemu.go b/pkg/drivers/qemu/qemu.go index f9c1059f8849..c3772bab9504 100644 --- a/pkg/drivers/qemu/qemu.go +++ b/pkg/drivers/qemu/qemu.go @@ -510,7 +510,7 @@ func (d *Driver) Start() error { return nil } // Implement a retry loop because IP address isn't added to dhcp leases file immediately - for i := 0; i < 30; i++ { + for i := 0; i < 60; i++ { log.Debugf("Attempt %d", i) err = getIP() if err == nil { From 8716ac0c8da6d39536faafa0827bebe41e78f6a6 Mon Sep 17 00:00:00 2001 From: Raghavendra Talur Date: Fri, 8 Sep 2023 06:40:00 -0400 Subject: [PATCH 2/2] qemu: set the cpu type to max RHEL9 and therefore the dependent distributions and base containers have a minimum microarchitechture level of x86-64-v2.[1] The default cpu level of the qemu driver on an Intel Mac is x86-64-v1 even if the host cpu has the x86-64-v2 capability. Using the cpu type of max allows qemu to use all the host cpu capabilities that is also supported by the hypervisor framework.[2] This was fixed for linux host by changing the default within qemu but it wasn't changed for MacOS. [1] https://developers.redhat.com/blog/2021/01/05/building-red-hat-enterprise-linux-9-for-the-x86-64-v2-microarchitecture-level [2] https://gitlab.com/qemu-project/qemu/-/issues/1686#note_1417714887 [3] https://lists.gnu.org/archive/html/qemu-devel/2022-08/msg04066.html Signed-off-by: Raghavendra Talur --- pkg/minikube/registry/drvs/qemu2/qemu2.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/minikube/registry/drvs/qemu2/qemu2.go b/pkg/minikube/registry/drvs/qemu2/qemu2.go index 2fb43a8e5325..c23765b18893 100644 --- a/pkg/minikube/registry/drvs/qemu2/qemu2.go +++ b/pkg/minikube/registry/drvs/qemu2/qemu2.go @@ -125,7 +125,9 @@ func configure(cc config.ClusterConfig, n config.Node) (interface{}, error) { switch runtime.GOARCH { case "amd64": qemuMachine = "" // default - qemuCPU = "" // default + // set cpu type to max to enable higher microarchitecture levels + // see https://lists.gnu.org/archive/html/qemu-devel/2022-08/msg04066.html for details + qemuCPU = "max" case "arm64": qemuMachine = "virt" qemuCPU = "cortex-a72"