# Vorbereiten der VM

### Beschreibung

Es ist unter Proxmox dank Qemu/KVM auch möglich eine arm64 CPU zu emulieren. Z.b Für ein Raspberry System oder einen UniFi Videorekorder als Beispiel.

#### Vorbereitung

ISO Download in den Proxmox Storage. Unter Version 7 geht das direkt über die GUI ansonsten per WGET  
Die aktuellen Dieban ARM64 ISOs findet man hier : [https://cdimage.debian.org/debian-cd/current/arm64/iso-cd/](https://cdimage.debian.org/debian-cd/current/arm64/iso-cd/)

##### Ab Version 8.0 :

Muss das Efi Image in Proxmox nachinstalliert werden.  
per ssh auf Proxmox gehen und

```
apt install pve-edk2-firmware-aarch64
```

##### GUI-Methode wer sie noch nicht kennt:

AUf den gewünschten Speicher klicken wo die ISO heruntergeladen werden soll

[![Auswahl_074.png](https://wiki.hacker-net.de/uploads/images/gallery/2023-03/scaled-1680-/EMAEG9iy1XZylrh8-auswahl-074.png)](https://wiki.hacker-net.de/uploads/images/gallery/2023-03/EMAEG9iy1XZylrh8-auswahl-074.png)

Dann im Menü ISO Images auswählen

[![Auswahl_075.png](https://wiki.hacker-net.de/uploads/images/gallery/2023-03/scaled-1680-/cVlehayWPh8PFrSW-auswahl-075.png)](https://wiki.hacker-net.de/uploads/images/gallery/2023-03/cVlehayWPh8PFrSW-auswahl-075.png)

Nun oben auf Download from URL klicken

[![Auswahl_076.png](https://wiki.hacker-net.de/uploads/images/gallery/2023-03/scaled-1680-/YNckw0MoI31qdwRc-auswahl-076.png)](https://wiki.hacker-net.de/uploads/images/gallery/2023-03/YNckw0MoI31qdwRc-auswahl-076.png)

Nun die URL zur ISO einfügen, hier die : [https://cdimage.debian.org/debian-cd/current/arm64/iso-cd/debian-11.6.0-arm64-netinst.iso](https://cdimage.debian.org/debian-cd/current/arm64/iso-cd/debian-11.6.0-arm64-netinst.iso) und auf Query URL klicken.

[![Auswahl_077.png](https://wiki.hacker-net.de/uploads/images/gallery/2023-03/scaled-1680-/srMjAN6BVlm1cNvR-auswahl-077.png)](https://wiki.hacker-net.de/uploads/images/gallery/2023-03/srMjAN6BVlm1cNvR-auswahl-077.png)

Nun wird der Name ermittelt und dann auf Download klicken

[![Auswahl_078.png](https://wiki.hacker-net.de/uploads/images/gallery/2023-03/scaled-1680-/G96igvBGQaqYQufL-auswahl-078.png)](https://wiki.hacker-net.de/uploads/images/gallery/2023-03/G96igvBGQaqYQufL-auswahl-078.png)

Download Fenster schließen über X wenn unten Task OK steht.

[![Auswahl_079.png](https://wiki.hacker-net.de/uploads/images/gallery/2023-03/scaled-1680-/16xtIPakgHwkq2ra-auswahl-079.png)](https://wiki.hacker-net.de/uploads/images/gallery/2023-03/16xtIPakgHwkq2ra-auswahl-079.png)

##### WGET Methode:

Auf dem Proxmoxhost als root per ssh einloggen und folgenden wget Befhl absetzten. Dazu die gewünschte URL zur ISO eingeben/einfügen zum Beispiel diese: wget [https://cdimage.debian.org/debian-cd/current/arm64/iso-cd/debian-11.6.0-arm64-netinst.iso](https://cdimage.debian.org/debian-cd/current/arm64/iso-cd/debian-11.6.0-arm64-netinst.iso)

```
#bei standard local storage

cd /var/lib/vz/template/iso
wget https://cdimage.debian.org/debian-cd/current/arm64/iso-cd/debian-11.6.0-arm64-netinst.iso


#bei anderen storages wie bei mir ein cephfs
cd /mnt/pve/<datastorename>/template/iso
cd /mnt/pve/cephfs/template/iso
wget https://cdimage.debian.org/debian-cd/current/arm64/iso-cd/debian-11.6.0-arm64-netinst.iso
```

#### Virtuelle Machine anlegen

Auf Create VM klicken

[![Auswahl_072.png](https://wiki.hacker-net.de/uploads/images/gallery/2023-03/scaled-1680-/k238zH0LQWWj5GaQ-auswahl-072.png)](https://wiki.hacker-net.de/uploads/images/gallery/2023-03/k238zH0LQWWj5GaQ-auswahl-072.png)

Nun dem Kind einen Namen geben und auf weiter klicken.

[![Auswahl_073.png](https://wiki.hacker-net.de/uploads/images/gallery/2023-03/scaled-1680-/xcrawec4QhKtOQrn-auswahl-073.png)](https://wiki.hacker-net.de/uploads/images/gallery/2023-03/xcrawec4QhKtOQrn-auswahl-073.png)

Nun als ISO aus dem Storages die arm64 iso auswählen und auf weiter klicken.

[![Auswahl_080.png](https://wiki.hacker-net.de/uploads/images/gallery/2023-03/scaled-1680-/U2UzE6KYKwEnRcGM-auswahl-080.png)](https://wiki.hacker-net.de/uploads/images/gallery/2023-03/U2UzE6KYKwEnRcGM-auswahl-080.png)

Nun als BIOS : OVMF (UEFI) auswählen  
Add EFI Disk : abhaken

Auf weiter klicken

[![Auswahl_081.png](https://wiki.hacker-net.de/uploads/images/gallery/2023-03/scaled-1680-/wQF2DFJqnZc6Wprf-auswahl-081.png)](https://wiki.hacker-net.de/uploads/images/gallery/2023-03/wQF2DFJqnZc6Wprf-auswahl-081.png)

Storage auswählen und Größe angeben. Mir reichen 32GB, aber so wir Ihr es braucht

[![Auswahl_082.png](https://wiki.hacker-net.de/uploads/images/gallery/2023-03/scaled-1680-/dggdSwbbcf6IyGnm-auswahl-082.png)](https://wiki.hacker-net.de/uploads/images/gallery/2023-03/dggdSwbbcf6IyGnm-auswahl-082.png)

CPU Kerne auswählen. Ich nehme 4 aber das wieder nach den eigenen bedürfnissen anpassen

[![Auswahl_083.png](https://wiki.hacker-net.de/uploads/images/gallery/2023-03/scaled-1680-/fWr4iLhVC1x2sZto-auswahl-083.png)](https://wiki.hacker-net.de/uploads/images/gallery/2023-03/fWr4iLhVC1x2sZto-auswahl-083.png)

Genau wie bei Arbeistspeicher, ich nehme 4096 aber auch wieder nach den Bedürfnissen

Ballooning Device : haken raus

Auf weiter

[![Auswahl_084.png](https://wiki.hacker-net.de/uploads/images/gallery/2023-03/scaled-1680-/N7ssKdFVNSsRbuqt-auswahl-084.png)](https://wiki.hacker-net.de/uploads/images/gallery/2023-03/N7ssKdFVNSsRbuqt-auswahl-084.png)

Netzwerk passt bei mir so. Ansonsten euren Bedürfnissen anpassen und auf weiter.

[![Auswahl_085.png](https://wiki.hacker-net.de/uploads/images/gallery/2023-03/scaled-1680-/p2PrXMrYHWAfLjmu-auswahl-085.png)](https://wiki.hacker-net.de/uploads/images/gallery/2023-03/p2PrXMrYHWAfLjmu-auswahl-085.png)

Nun auf Finish klicken

[![Auswahl_086.png](https://wiki.hacker-net.de/uploads/images/gallery/2023-03/scaled-1680-/0jMWQK4mw6inzabA-auswahl-086.png)](https://wiki.hacker-net.de/uploads/images/gallery/2023-03/0jMWQK4mw6inzabA-auswahl-086.png)

Virtuelle machine bearbeiten

Nun Im Menü die Virtuelle Machine auswählen

[![Auswahl_087.png](https://wiki.hacker-net.de/uploads/images/gallery/2023-03/scaled-1680-/pIw0LLFXu1ruCasi-auswahl-087.png)](https://wiki.hacker-net.de/uploads/images/gallery/2023-03/pIw0LLFXu1ruCasi-auswahl-087.png)

Nun Auf den Menüpunkt Hardware klicken

[![Auswahl_088.png](https://wiki.hacker-net.de/uploads/images/gallery/2023-03/scaled-1680-/5vERHsmhmpPaWYZ5-auswahl-088.png)](https://wiki.hacker-net.de/uploads/images/gallery/2023-03/5vERHsmhmpPaWYZ5-auswahl-088.png)

Nun das CD/DVD Laufwerk anklciken und danach oben auf remove klicken

[![Auswahl_089.png](https://wiki.hacker-net.de/uploads/images/gallery/2023-03/scaled-1680-/3dOQAiG8f9aVdyjQ-auswahl-089.png)](https://wiki.hacker-net.de/uploads/images/gallery/2023-03/3dOQAiG8f9aVdyjQ-auswahl-089.png)

Frage ob wirklich gelöscht werden soll, mit ja beantworten

[![Auswahl_090.png](https://wiki.hacker-net.de/uploads/images/gallery/2023-03/scaled-1680-/L4sAF6cwx4cYCCum-auswahl-090.png)](https://wiki.hacker-net.de/uploads/images/gallery/2023-03/L4sAF6cwx4cYCCum-auswahl-090.png)

Nun Oben im Neü auf ADd und dann Serial Port anklicken

[![Menü_006.png](https://wiki.hacker-net.de/uploads/images/gallery/2023-03/scaled-1680-/1SwPXKOwfO64CmcI-menu-006.png)](https://wiki.hacker-net.de/uploads/images/gallery/2023-03/1SwPXKOwfO64CmcI-menu-006.png)

Nun einfach auf Add klicken. Denn der Port 0 reicht uns

[![Auswahl_091.png](https://wiki.hacker-net.de/uploads/images/gallery/2023-03/scaled-1680-/8ygKlthb9DVSgodm-auswahl-091.png)](https://wiki.hacker-net.de/uploads/images/gallery/2023-03/8ygKlthb9DVSgodm-auswahl-091.png)

Nun wieder auf Add und CD/DVD auswählen

[![Menü_007.png](https://wiki.hacker-net.de/uploads/images/gallery/2023-03/scaled-1680-/4bY6Ltem1nbObjii-menu-007.png)](https://wiki.hacker-net.de/uploads/images/gallery/2023-03/4bY6Ltem1nbObjii-menu-007.png)

Als BUS SCSI auswählen  
Den Stoarge wo die Iso liegt auswählen  
Die arm64 iso auswählen

Auf add klicken

[![Auswahl_092.png](https://wiki.hacker-net.de/uploads/images/gallery/2023-03/scaled-1680-/Z5ShqmaXPQz6VZnF-auswahl-092.png)](https://wiki.hacker-net.de/uploads/images/gallery/2023-03/Z5ShqmaXPQz6VZnF-auswahl-092.png)

Nun doppelklick auf Display

[![Auswahl_093.png](https://wiki.hacker-net.de/uploads/images/gallery/2023-03/scaled-1680-/bz3ctemurjhuQL6W-auswahl-093.png)](https://wiki.hacker-net.de/uploads/images/gallery/2023-03/bz3ctemurjhuQL6W-auswahl-093.png)

Bei Graphiccard : Serial terminal 0 auswählen und ok

[![Auswahl_094.png](https://wiki.hacker-net.de/uploads/images/gallery/2023-03/scaled-1680-/driSzWpACKDpsoE6-auswahl-094.png)](https://wiki.hacker-net.de/uploads/images/gallery/2023-03/driSzWpACKDpsoE6-auswahl-094.png)

Nun doppelklick auf die Festplatte

[![Auswahl_101.png](https://wiki.hacker-net.de/uploads/images/gallery/2023-03/scaled-1680-/TZgyF8RLcbdxcXNP-auswahl-101.png)](https://wiki.hacker-net.de/uploads/images/gallery/2023-03/TZgyF8RLcbdxcXNP-auswahl-101.png)

Dort dann den haken bei iothread raus und auf ok

[![Auswahl_102.png](https://wiki.hacker-net.de/uploads/images/gallery/2023-03/scaled-1680-/S1KEYcz5N6Wt8Pjv-auswahl-102.png)](https://wiki.hacker-net.de/uploads/images/gallery/2023-03/S1KEYcz5N6Wt8Pjv-auswahl-102.png)

Nun doppelklick auf SCSI Controller

[![Auswahl_103.png](https://wiki.hacker-net.de/uploads/images/gallery/2023-03/scaled-1680-/M3uD96egk79djiYc-auswahl-103.png)](https://wiki.hacker-net.de/uploads/images/gallery/2023-03/M3uD96egk79djiYc-auswahl-103.png)

Nun den von VirtIO SCSI single auf VirtIO SCSI ändern und auf ok

[![Auswahl_104.png](https://wiki.hacker-net.de/uploads/images/gallery/2023-03/scaled-1680-/mshv9sSPSxb0Vg9W-auswahl-104.png)](https://wiki.hacker-net.de/uploads/images/gallery/2023-03/mshv9sSPSxb0Vg9W-auswahl-104.png)

Nun im Menü auf options klicken

[![Auswahl_095.png](https://wiki.hacker-net.de/uploads/images/gallery/2023-03/scaled-1680-/beZGSoOUpMP4zEj5-auswahl-095.png)](https://wiki.hacker-net.de/uploads/images/gallery/2023-03/beZGSoOUpMP4zEj5-auswahl-095.png)

Dann doppelklcik auf Boot Order

[![Auswahl_096.png](https://wiki.hacker-net.de/uploads/images/gallery/2023-03/scaled-1680-/2ecuHKk0Sovu0jpm-auswahl-096.png)](https://wiki.hacker-net.de/uploads/images/gallery/2023-03/2ecuHKk0Sovu0jpm-auswahl-096.png)

Nun das CD Laufwerk mit Linksgedrückt halten und an die erste stelle ziehen, so das es dann so aussieht

[![Auswahl_097.png](https://wiki.hacker-net.de/uploads/images/gallery/2023-03/scaled-1680-/pOxa5533H9qsWlPn-auswahl-097.png)](https://wiki.hacker-net.de/uploads/images/gallery/2023-03/pOxa5533H9qsWlPn-auswahl-097.png)

#### Anpassen der Architektur der Maschine

Dazu wieder per ssh auf dem Host einloggen und die Conf datei von der Machine zu editieren

```
nano /etc/pve/qemu-server/<vmid>.conf

in usnerem Fall

nano /etc/pve/qemu-server/134.conf
```

Von:

```
balloon: 0
bios: ovmf
boot: order=scsi1;scsi0;net0
cores: 4
memory: 4096
meta: creation-qemu=7.1.0,ctime=1677936909
name: myarm64guest
net0: virtio=56:3F:39:75:A3:0C,bridge=vmbr0,firewall=1
numa: 0
ostype: l26
scsi0: rbd:vm-134-disk-0,iothread=1,size=32G
scsi1: cephfs:iso/debian-11.6.0-arm64-netinst.iso,media=cdrom,size=337196K
scsihw: virtio-scsi-single
serial0: socket
smbios1: uuid=4d234d40-733c-4881-bc0c-38ec912e0432
sockets: 1
vga: serial0
vmgenid: 6794e873-22e6-4ff1-b35e-654e01d58f02

```

Nach ändern:

vmgenid: .... auskommentieren  
und arch:aarch64 hinzufügen

Sieht dann so aus:

```
balloon: 0
bios: ovmf
boot: order=scsi1;scsi0;net0
cores: 4
memory: 4096
meta: creation-qemu=7.1.0,ctime=1677936909
name: myarm64guest
net0: virtio=56:3F:39:75:A3:0C,bridge=vmbr0,firewall=1
numa: 0
ostype: l26
scsi0: rbd:vm-134-disk-0,iothread=1,size=32G
scsi1: cephfs:iso/debian-11.6.0-arm64-netinst.iso,media=cdrom,size=337196K
scsihw: virtio-scsi-single
serial0: socket
smbios1: uuid=4d234d40-733c-4881-bc0c-38ec912e0432
sockets: 1
vga: serial0
#vmgenid: 6794e873-22e6-4ff1-b35e-654e01d58f02
arch:aarch64
```

Nun noch die Efi Disk mit folgendem Befehl hinzufügen

```
efitype=2m, wenn es über die GUI gemacht wird, gibts an array fehler

qm set VMID -efidisk0 local:1,efitype=2m,pre-enrolled-keys=0,format=qcow2

Speicherpfad anpassen wenn nötig
Mein Beispiel:

Die formate sind qcow2 und raw.
je nachdem was euer Zielspeicher unterstützt.
RBD unterstützt nur raw

qm set 134 -efidisk0 rbd:1,efitype=2m,pre-enrolled-keys=0,format=raw
Output
pdate VM 134: -efidisk0 rbd:1,efitype=2m,pre-enrolled-keys=0,format=raw
transferred 0.0 B of 64.0 MiB (0.00%)
transferred 2.0 MiB of 64.0 MiB (3.12%)
transferred 4.0 MiB of 64.0 MiB (6.25%)
transferred 6.0 MiB of 64.0 MiB (9.38%)
transferred 8.0 MiB of 64.0 MiB (12.50%)
transferred 10.0 MiB of 64.0 MiB (15.62%)
transferred 12.0 MiB of 64.0 MiB (18.75%)
transferred 14.0 MiB of 64.0 MiB (21.88%)
transferred 16.0 MiB of 64.0 MiB (25.00%)
transferred 18.0 MiB of 64.0 MiB (28.12%)
transferred 20.0 MiB of 64.0 MiB (31.25%)
transferred 22.0 MiB of 64.0 MiB (34.38%)
transferred 24.0 MiB of 64.0 MiB (37.50%)
transferred 26.0 MiB of 64.0 MiB (40.62%)
transferred 28.0 MiB of 64.0 MiB (43.75%)
transferred 30.0 MiB of 64.0 MiB (46.88%)
transferred 32.0 MiB of 64.0 MiB (50.00%)
transferred 34.0 MiB of 64.0 MiB (53.12%)
transferred 36.0 MiB of 64.0 MiB (56.25%)
transferred 38.0 MiB of 64.0 MiB (59.38%)
transferred 40.0 MiB of 64.0 MiB (62.50%)
transferred 42.0 MiB of 64.0 MiB (65.62%)
transferred 44.0 MiB of 64.0 MiB (68.75%)
transferred 46.0 MiB of 64.0 MiB (71.88%)
transferred 48.0 MiB of 64.0 MiB (75.00%)
transferred 50.0 MiB of 64.0 MiB (78.12%)
transferred 52.0 MiB of 64.0 MiB (81.25%)
transferred 54.0 MiB of 64.0 MiB (84.38%)
transferred 56.0 MiB of 64.0 MiB (87.50%)
transferred 58.0 MiB of 64.0 MiB (90.62%)
transferred 60.0 MiB of 64.0 MiB (93.75%)
transferred 62.0 MiB of 64.0 MiB (96.88%)
transferred 64.0 MiB of 64.0 MiB (100.00%)
transferred 64.0 MiB of 64.0 MiB (100.00%)
efidisk0: successfully created disk &apos;rbd:vm-134-disk-0,efitype=2m,pre-enrolled-keys=0,size=64M&apos;

```

### Fehler:  


#### EFI-DIsk

Sollte beim Efi Disk erstellen dieser Fehler auftauchen:

```
root@pve01:~# qm set 100 -efidisk0 local-lvm:1,efitype=2m,pre-enrolled-keys=0,format=raw
update VM 100: -efidisk0 local-lvm:1,efitype=2m,pre-enrolled-keys=0,format=raw
EFI base image '/usr/share/pve-edk2-firmware//AAVMF_CODE.fd' not found

```

Ap Version 8 gibt es keine aarch64 efi images mehr.  
  
Nachinstallieren

```
apt install pve-edk2-firmware-aarch64
```

#### Starten Fehler CPU Typ nicht erkannt  


In Proxmox 8 und höher wird Standard mäßig der CPU Typ gesetzt.  
Das heißt in der &lt;vmid&gt;.conf wird der cpu typ festgelegt.  
Da aarch64 keine kvm64 oder host kennt, muss der cpu eintrag auskommentiert werden

Vorher

```
...
#vmgenid%3A 9f0a633a-762b-4c4b-a43e-59460eb51e92
arch: aarch64
balloon: 0
bios: ovmf
boot: order=scsi1;scsi0;net0
cores: 4
cpu: x86-64-v2-AES
efidisk0: local-lvm:vm-100-disk-1,efitype=2m,pre-enrolled-keys=0,size=64M
memory: 2048
meta: creation-qemu=8.1.5,ctime=1718456554
name: unvr
...

```

nachher

```
...
#vmgenid%3A 9f0a633a-762b-4c4b-a43e-59460eb51e92
arch: aarch64
balloon: 0
bios: ovmf
boot: order=scsi1;scsi0;net0
cores: 4
#cpu: x86-64-v2-AES  #wurde hier auskommentiert
efidisk0: local-lvm:vm-100-disk-1,efitype=2m,pre-enrolled-keys=0,size=64M
memory: 2048
meta: creation-qemu=8.1.5,ctime=1718456554
name: unvr
...
```