[gnome-build-meta.wiki] Update Bootable images in virtual machines - note that `-cpu host` is required
- From: Sam Thursfield <sthursfield src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-build-meta.wiki] Update Bootable images in virtual machines - note that `-cpu host` is required
- Date: Wed, 11 Aug 2021 12:37:41 +0000 (UTC)
commit 534f73e7195b36ad57ebfb654de1c988ee606559
Author: Sam Thursfield <sam afuera me uk>
Date: Wed Aug 11 12:37:40 2021 +0000
Update Bootable images in virtual machines - note that `-cpu host` is required
Bootable-images-in-virtual-machines.md | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/Bootable-images-in-virtual-machines.md b/Bootable-images-in-virtual-machines.md
index 8f4e04f..1d16aa0 100644
--- a/Bootable-images-in-virtual-machines.md
+++ b/Bootable-images-in-virtual-machines.md
@@ -70,7 +70,7 @@ Then, run with QEMU:
```
qemu-system-x86_64 \
- -enable-kvm -m 4G -smp 4 -machine q35,accel=kvm \
+ -enable-kvm -m 4G -smp 4 -machine q35,accel=kvm -cpu host \
-drive if=pflash,format=raw,unit=0,file=/usr/share/OVMF/OVMF_CODE.fd,readonly=on \
-drive if=pflash,format=raw,unit=1,file=OVMF_VARS.fd \
-display gtk,gl=on -vga virtio \
@@ -101,7 +101,7 @@ Then run with QEMU:
```
qemu-system-x86_64 \
- -enable-kvm -m 4G -smp 4 -machine q35,accel=kvm \
+ -enable-kvm -m 4G -smp 4 -machine q35,accel=kvm -cpu host \
-drive if=pflash,format=raw,unit=0,file=/usr/share/OVMF/OVMF_CODE.fd,readonly=on \
-drive if=pflash,format=raw,unit=1,file=OVMF_VARS.fd \
-display gtk,gl=on -vga virtio \
@@ -116,7 +116,7 @@ After installation re-launch QEMU, but remove the last drive (CD-ROM).
```
qemu-system-x86_64 \
- -enable-kvm -m 4G -smp 4 -machine q35,accel=kvm \
+ -enable-kvm -m 4G -smp 4 -machine q35,accel=kvm -cpu host \
-drive if=pflash,format=raw,unit=0,file=/usr/share/OVMF/OVMF_CODE.fd,readonly=on \
-drive if=pflash,format=raw,unit=1,file=OVMF_VARS.fd \
-display gtk,gl=on -vga virtio \
@@ -162,6 +162,8 @@ qemu-img create -f qcow2 disk.qcow2 64G
For x86_64 with KVM: `-enable-kvm -machine q35,accel=kvm`
+Use same CPU architecture as host: `-cpu host` (the default can be a basic one that doesn't support all
instructions modern compilers use, leading to SIGILL crashes)
+
UEFI boot:
```
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]