# Qemu for Mac M1

###   


### installation de Qemu :

```shell
brew install knazarov/qemu-virgl/qemu-virgl
```

###   


### Création du dossier et téléchargement de l'archive pour ArchLinux :

```shell
mkdir archlinuxKDE                                                                                                                       <br></br>cd archlinuxKDE<br></br>curl -L https://github.com/m-bers/Arch-Linux-Arm-M1/releases/latest/download/archlinux.tar.gz | tar xzf -    
```

### Lancement de la machine Qemu pour l'installation :

```shell
sudo qemu-system-aarch64 -L ~/bin/qemu/share/qemu \                                                                                      <br></br>        -smp 8 \<br></br>        -machine virt,accel=hvf,highmem=off \<br></br>        -cpu cortex-a72 -m 4096 \<br></br>        -drive "if=pflash,media=disk,id=drive0,file=flash0.img,cache=writethrough,format=raw" \<br></br>        -drive "if=pflash,media=disk,id=drive1,file=flash1.img,cache=writethrough,format=raw" \<br></br>        -drive "if=virtio,media=disk,id=drive2,file=archlinux.qcow2,cache=writethrough,format=qcow2" \<br></br>        -device virtio-net-pci,netdev=net \<br></br>        -netdev user,id=net,ipv6=off \<br></br>        -device virtio-rng-device -device virtio-balloon-device -device virtio-keyboard-device \<br></br>        -device virtio-mouse-device -device virtio-serial-device -device virtio-tablet-device \<br></br>        -object cryptodev-backend-builtin,id=cryptodev0 \<br></br>        -device virtio-crypto-pci,id=crypto0,cryptodev=cryptodev0 \<br></br>        -nographic<br></br><br></br>
```

### Dans la machine virtuelle :

se connecter en root :

<p class="callout success">user : root:root</p>

```
pacman-key --init<br></br>pacman-key --populate archlinuxarm<br></br>pacman -Suy<br></br>pacman -S nano git
```

editer le fichier pacman.conf et modifier :

<div id="bkmrk-color-paralleldownlo"><div>Color</div><div>ParallelDownloads = 8</div></div><div id="bkmrk--1"></div><div id="bkmrk-modifier-la-langue-%3A">Modifier la langue : </div><div id="bkmrk-nano-%2Fetc%2Flocale.gen"><div><div>nano /etc/locale.gen</div><div>locale-gen</div><div>echo “LANG=fr_FR.UTF-8” &gt;&gt; /etc/locale.conf</div></div></div><div id="bkmrk--2"></div><div id="bkmrk--3"></div>### Installation de endeavouros :

```shell
git clone https://github.com/endeavouros-arm/install-script.git <br></br>cd install-script<br></br>chmod 777 endeavour-ARM-install-V2.6.sh <br></br>./endeavour-ARM-install-V2.6.sh 
```

```shell
nano run.sh                                        <br></br>==== ajouter ceci ====<br></br>sudo /opt/homebrew/Cellar/qemu/6.2.0_1/bin/qemu-system-aarch64 \<br></br>	-smp 8 \<br></br>	-machine virt,accel=hvf,highmem=off \<br></br>	-cpu cortex-a72 -m 4096 \<br></br>	-drive "if=pflash,media=disk,id=drive0,file=flash0.img,cache=writethrough,format=raw" \<br></br>	-drive "if=pflash,media=disk,id=drive1,file=flash1.img,cache=writethrough,format=raw" \<br></br>	-drive "if=virtio,media=disk,id=drive2,file=archlinux.qcow2,cache=writethrough,format=qcow2" \<br></br>    -device virtio-net-pci,netdev=net \<br></br>    -netdev user,id=net,ipv6=off \<br></br>    -device intel-hda -device hda-output \<br></br>    -device qemu-xhci \<br></br>    -device usb-kbd \<br></br>    -device virtio-mouse-pci \<br></br>    -device virtio-tablet-pci \<br></br>	-object cryptodev-backend-builtin,id=cryptodev0 \<br></br>	-device virtio-crypto-pci,id=crypto0,cryptodev=cryptodev0 \<br></br>    -display cocoa,show-cursor=on  \<br></br> 	-device virtio-gpu-pci<br></br>    <br></br>  ======================<br></br><br></br>chmod +x run.sh
```