Last active
December 18, 2025 13:51
-
-
Save nrjdalal/e70249bb5d2e9d844cc203fd11f74c55 to your computer and use it in GitHub Desktop.
Revisions
-
nrjdalal revised this gist
Jun 28, 2022 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -50,7 +50,7 @@ sudo make install ## First run, close manually after installation aka first reboot. ```zsh curl https://cdimage.ubuntu.com/releases/20.04/release/ubuntu-20.04.4-live-server-arm64.iso -o ubuntu-lts.iso qemu-img create -f qcow2 virtual-disk.qcow2 8G -
nrjdalal revised this gist
Jun 7, 2021 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -94,7 +94,7 @@ qemu-system-aarch64 \ ``` 2. Login via SSH using - ```zsh ssh <username>@127.0.0.1 -p 9922 ``` 3. Visit http content at - ```zsh -
nrjdalal revised this gist
Jun 6, 2021 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -96,7 +96,7 @@ qemu-system-aarch64 \ ```zsh ssh <username>@<servername> -p 9922 ``` 3. Visit http content at - ```zsh open http://127.0.0.1:9980 ``` -
nrjdalal revised this gist
Jun 6, 2021 . 1 changed file with 21 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -49,7 +49,6 @@ sudo make install > # Create Ubuntu Server using QEMU on Silicon based Apple Macs ## First run, close manually after installation aka first reboot. ```zsh curl https://cdimage.ubuntu.com/releases/20.04/release/ubuntu-20.04.2-live-server-arm64.iso -o ubuntu-lts.iso @@ -69,7 +68,6 @@ qemu-system-aarch64 \ -drive "format=qcow2,file=virtual-disk.qcow2" \ -cdrom ubuntu-lts.iso ``` ## Second run, enjoy your Ubuntu Server. ```zsh qemu-system-aarch64 \ @@ -80,4 +78,25 @@ qemu-system-aarch64 \ -drive "format=raw,file=edk2-aarch64-code.fd,if=pflash,readonly=on" \ -drive "format=raw,file=ovmf_vars.fd,if=pflash" \ -drive "format=qcow2,file=virtual-disk.qcow2" ``` ## Bonus, connect via SSH and serve port 80 at localhost. 1. Start server using - ```zsh qemu-system-aarch64 \ -machine virt,accel=hvf,highmem=off \ -cpu cortex-a72 -smp 4 -m 4G \ -device virtio-gpu-pci \ -device virtio-keyboard-pci \ -drive "format=raw,file=edk2-aarch64-code.fd,if=pflash,readonly=on" \ -drive "format=raw,file=ovmf_vars.fd,if=pflash" \ -drive "format=qcow2,file=virtual-disk.qcow2" \ -nic hostfwd=tcp:127.0.0.1:9922-0.0.0.0:22,hostfwd=tcp:127.0.0.1:9980-0.0.0.0:80 & ``` 2. Login via SSH using - ```zsh ssh <username>@<servername> -p 9922 ``` 3. See http content at - ```zsh open http://127.0.0.1:9980 ``` -
nrjdalal revised this gist
Jun 6, 2021 . 1 changed file with 1 addition and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -79,6 +79,5 @@ qemu-system-aarch64 \ -device virtio-keyboard-pci \ -drive "format=raw,file=edk2-aarch64-code.fd,if=pflash,readonly=on" \ -drive "format=raw,file=ovmf_vars.fd,if=pflash" \ -drive "format=qcow2,file=virtual-disk.qcow2" ``` -
nrjdalal revised this gist
Jun 6, 2021 . 1 changed file with 15 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -48,6 +48,8 @@ sudo make install > # Create Ubuntu Server using QEMU on Silicon based Apple Macs ## First run, close manually after installation aka first reboot. ```zsh curl https://cdimage.ubuntu.com/releases/20.04/release/ubuntu-20.04.2-live-server-arm64.iso -o ubuntu-lts.iso @@ -57,6 +59,19 @@ cp $(dirname $(which qemu-img))/../share/qemu/edk2-aarch64-code.fd . dd if=/dev/zero conv=sync bs=1m count=64 of=ovmf_vars.fd qemu-system-aarch64 \ -machine virt,accel=hvf,highmem=off \ -cpu cortex-a72 -smp 4 -m 4G \ -device virtio-gpu-pci \ -device virtio-keyboard-pci \ -drive "format=raw,file=edk2-aarch64-code.fd,if=pflash,readonly=on" \ -drive "format=raw,file=ovmf_vars.fd,if=pflash" \ -drive "format=qcow2,file=virtual-disk.qcow2" \ -cdrom ubuntu-lts.iso ``` ## Second run, enjoy your Ubuntu Server. ```zsh qemu-system-aarch64 \ -machine virt,accel=hvf,highmem=off \ -cpu cortex-a72 -smp 4 -m 4G \ -
nrjdalal revised this gist
Jun 6, 2021 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -7,7 +7,7 @@ zsh -c "$(curl -fsSL https://raw.githubusercontent.com/nrjdalal/silicon-virtuali ## Option 2 - Manually * ### Install Xcode command line tools ```zsh xcode-select --install ``` * ### Install Homebrew arm64 ```zsh -
nrjdalal revised this gist
Jun 6, 2021 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ > # Install QEMU on Silicon based Apple Macs (June 2021) ## Option 1 - Automatically ```zsh -
nrjdalal renamed this gist
Jun 6, 2021 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
nrjdalal revised this gist
Jun 6, 2021 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ > # Install QEMU on Silicon based Apple Macs as of June 2021 ## Option 1 - Automatically ```zsh @@ -46,7 +46,7 @@ make -j8 sudo make install ``` > # Create Ubuntu Server using QEMU on Silicon based Apple Macs ```zsh curl https://cdimage.ubuntu.com/releases/20.04/release/ubuntu-20.04.2-live-server-arm64.iso -o ubuntu-lts.iso -
nrjdalal revised this gist
Jun 6, 2021 . 1 changed file with 22 additions and 22 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -15,28 +15,6 @@ xcode-select --install 2>/dev/null echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/$(logname)/.zprofile eval "$(/opt/homebrew/bin/brew shellenv)" ``` * ### Install necessary packages for building ```zsh brew install libffi gettext glib pkg-config autoconf automake pixman ninja @@ -66,4 +44,26 @@ make -j8 * ### Install qemu ```zsh sudo make install ``` # Create Ubuntu Server using QEMU on Silicon based Apple Macs ```zsh curl https://cdimage.ubuntu.com/releases/20.04/release/ubuntu-20.04.2-live-server-arm64.iso -o ubuntu-lts.iso qemu-img create -f qcow2 virtual-disk.qcow2 8G cp $(dirname $(which qemu-img))/../share/qemu/edk2-aarch64-code.fd . dd if=/dev/zero conv=sync bs=1m count=64 of=ovmf_vars.fd qemu-system-aarch64 \ -machine virt,accel=hvf,highmem=off \ -cpu cortex-a72 -smp 4 -m 4G \ -device virtio-gpu-pci \ -device virtio-keyboard-pci \ -drive "format=raw,file=edk2-aarch64-code.fd,if=pflash,readonly=on" \ -drive "format=raw,file=ovmf_vars.fd,if=pflash" \ -drive "format=qcow2,file=virtual-disk.qcow2" \ -cdrom ubuntu-lts.iso ``` -
nrjdalal revised this gist
Jun 6, 2021 . 2 changed files with 22 additions and 21 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,21 +0,0 @@ This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -15,6 +15,28 @@ xcode-select --install 2>/dev/null echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/$(logname)/.zprofile eval "$(/opt/homebrew/bin/brew shellenv)" ``` # Create Ubuntu Server using QEMU on Silicon based Apple Macs ```zsh curl https://cdimage.ubuntu.com/releases/20.04/release/ubuntu-20.04.2-live-server-arm64.iso -o ubuntu-lts.iso qemu-img create -f qcow2 virtual-disk.qcow2 8G cp $(dirname $(which qemu-img))/../share/qemu/edk2-aarch64-code.fd . dd if=/dev/zero conv=sync bs=1m count=64 of=ovmf_vars.fd qemu-system-aarch64 \ -machine virt,accel=hvf,highmem=off \ -cpu cortex-a72 -smp 4 -m 4G \ -device virtio-gpu-pci \ -device virtio-keyboard-pci \ -drive "format=raw,file=edk2-aarch64-code.fd,if=pflash,readonly=on" \ -drive "format=raw,file=ovmf_vars.fd,if=pflash" \ -drive "format=qcow2,file=virtual-disk.qcow2" \ -cdrom ubuntu-lts.iso ``` * ### Install necessary packages for building ```zsh brew install libffi gettext glib pkg-config autoconf automake pixman ninja -
nrjdalal revised this gist
Jun 6, 2021 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ # Install QEMU on Silicon based Apple Macs as of June 2021 ## Option 1 - Automatically ```zsh -
nrjdalal revised this gist
Jun 6, 2021 . 1 changed file with 21 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,21 @@ # Create Ubuntu Server using QEMU on Silicon based Apple Macs ```zsh curl https://cdimage.ubuntu.com/releases/20.04/release/ubuntu-20.04.2-live-server-arm64.iso -o ubuntu-lts.iso qemu-img create -f qcow2 virtual-disk.qcow2 8G cp $(dirname $(which qemu-img))/../share/qemu/edk2-aarch64-code.fd . dd if=/dev/zero conv=sync bs=1m count=64 of=ovmf_vars.fd qemu-system-aarch64 \ -machine virt,accel=hvf,highmem=off \ -cpu cortex-a72 -smp 4 -m 4G \ -device virtio-gpu-pci \ -device virtio-keyboard-pci \ -drive "format=raw,file=edk2-aarch64-code.fd,if=pflash,readonly=on" \ -drive "format=raw,file=ovmf_vars.fd,if=pflash" \ -drive "format=qcow2,file=virtual-disk.qcow2" \ -cdrom ubuntu-lts.iso ``` -
nrjdalal revised this gist
Jun 6, 2021 . 1 changed file with 10 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,6 +5,16 @@ zsh -c "$(curl -fsSL https://raw.githubusercontent.com/nrjdalal/silicon-virtualizer/master/install-qemu.sh)" ``` ## Option 2 - Manually * ### Install Xcode command line tools ```zsh xcode-select --install 2>/dev/null ``` * ### Install Homebrew arm64 ```zsh /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/$(logname)/.zprofile eval "$(/opt/homebrew/bin/brew shellenv)" ``` * ### Install necessary packages for building ```zsh brew install libffi gettext glib pkg-config autoconf automake pixman ninja -
nrjdalal revised this gist
Jun 6, 2021 . No changes.There are no files selected for viewing
-
nrjdalal revised this gist
Jun 6, 2021 . 1 changed file with 4 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,6 +5,10 @@ zsh -c "$(curl -fsSL https://raw.githubusercontent.com/nrjdalal/silicon-virtualizer/master/install-qemu.sh)" ``` ## Option 2 - Manually * ### Install necessary packages for building ```zsh brew install libffi gettext glib pkg-config autoconf automake pixman ninja ``` * ### Clone qemu ```zsh git clone https://github.com/qemu/qemu -
nrjdalal revised this gist
Jun 6, 2021 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,7 +5,7 @@ zsh -c "$(curl -fsSL https://raw.githubusercontent.com/nrjdalal/silicon-virtualizer/master/install-qemu.sh)" ``` ## Option 2 - Manually * ### Clone qemu ```zsh git clone https://github.com/qemu/qemu ``` -
nrjdalal created this gist
Jun 6, 2021 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,33 @@ # Latest way to install QEMU on Silicon based Apple Macs as of June 2021 ## Option 1 - Automatically ```zsh zsh -c "$(curl -fsSL https://raw.githubusercontent.com/nrjdalal/silicon-virtualizer/master/install-qemu.sh)" ``` ## Option 2 - Manually * ### Install qemu ```zsh git clone https://github.com/qemu/qemu ``` * ### Change directory to qemu repository ```zsh cd qemu ``` * ### Checkout to commit dated June 03, 2021 v6.0.0 ```zsh git checkout 3c93dfa42c394fdd55684f2fbf24cf2f39b97d47 ``` * ### Apply patch series v8 by Alexander Graf ```zsh curl https://patchwork.kernel.org/series/485309/mbox/ | git am ``` * ### Building qemu installer ```zsh mkdir build && cd build ../configure --target-list=aarch64-softmmu make -j8 ``` * ### Install qemu ```zsh sudo make install ```