| 40 | * 安裝必要的套件 Install QEMU and other packages. |
| 41 | * 由於 qemu 在 Ubuntu 22.04 LTS 是 dummy package, 在 Ubuntu 24.04 LTS 已經沒有這個套件。先拿掉再來看到底程式會用到什麼 QEMU 指令。 |
| 42 | {{{ |
| 43 | ubuntu@ip-172-31-18-147:~$ sudo apt-get update |
| 44 | ubuntu@ip-172-31-18-147:~$ sudo apt-get install uml-utilities virt-manager git \ |
| 45 | wget libguestfs-tools p7zip-full make dmg2img tesseract-ocr \ |
| 46 | tesseract-ocr-eng genisoimage vim net-tools screen -y |
| 47 | }}} |
| 48 | {{{ |
| 49 | ubuntu@ip-172-31-18-147:~$ cd ~; git clone --depth 1 --recursive https://github.com/kholia/OSX-KVM.git; cd OSX-KVM |
| 50 | Cloning into 'OSX-KVM'... |
| 51 | remote: Enumerating objects: 639, done. |
| 52 | remote: Counting objects: 100% (639/639), done. |
| 53 | remote: Compressing objects: 100% (563/563), done. |
| 54 | remote: Total 639 (delta 46), reused 611 (delta 37), pack-reused 0 |
| 55 | Receiving objects: 100% (639/639), 30.11 MiB | 31.63 MiB/s, done. |
| 56 | Resolving deltas: 100% (46/46), done. |
| 57 | Submodule 'resources/OcBinaryData' (https://github.com/acidanthera/OcBinaryData.git) registered for path 'resources/OcBinaryData' |
| 58 | Cloning into '/home/ubuntu/OSX-KVM/resources/OcBinaryData'... |
| 59 | remote: Enumerating objects: 1190, done. |
| 60 | remote: Counting objects: 100% (398/398), done. |
| 61 | remote: Compressing objects: 100% (381/381), done. |
| 62 | remote: Total 1190 (delta 23), reused 32 (delta 16), pack-reused 792 |
| 63 | Receiving objects: 100% (1190/1190), 67.73 MiB | 25.41 MiB/s, done. |
| 64 | Resolving deltas: 100% (149/149), done. |
| 65 | Submodule path 'resources/OcBinaryData': checked out '4e7e1b7465aae297d706afe5de5c4d1572d86917' |
| 66 | }}} |
| 67 | * 啟用 KVM 模組。 KVM may need the following tweak on the host machine to work. |
| 68 | {{{ |
| 69 | ubuntu@ip-172-31-18-147:~/OSX-KVM$ git pull --rebase |
| 70 | Already up to date. |
| 71 | ubuntu@ip-172-31-18-147:~/OSX-KVM$ sudo modprobe kvm; echo 1 | sudo tee /sys/module/kvm/parameters/ignore_msrs |
| 72 | 1 |
| 73 | }}} |
| 74 | * 由於確認過 CPU 是 Intel 的,就複製 kvm.conf |
| 75 | {{{ |
| 76 | ubuntu@ip-172-31-18-147:~/OSX-KVM$ head /proc/cpuinfo |
| 77 | processor : 0 |
| 78 | vendor_id : GenuineIntel |
| 79 | cpu family : 6 |
| 80 | model : 85 |
| 81 | model name : Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz |
| 82 | stepping : 7 |
| 83 | microcode : 0x5003605 |
| 84 | cpu MHz : 2499.996 |
| 85 | cache size : 36608 KB |
| 86 | physical id : 0 |
| 87 | ubuntu@ip-172-31-18-147:~/OSX-KVM$ sudo cp kvm.conf /etc/modprobe.d/kvm.conf |
| 88 | }}} |