incus boot VM von Isodatei

Normalerweise arbeite ich gerne mit den vorgefertigten Images aus dem Repository, wenn aber mal der Wunsch aufkommt, ein alternatives System auszuprobieren, brauche ich ein leeres System mit einer gemounteten ios-Datei.

Weil ich immer danach suche, wenn ich es mal brauche, hier noch mal kurz zusammengefasst.

   incus create myvm --vm --empty \
     -c limits.memory=8GiB \
     -c limits.cpu=2 \
     -c security.secureboot=false \
     -d root,size=50GiB

Die Parameter kann man je nach Zielsystem anpassen. Dann das Isofile einbinden und starten.

   incus config device add myvm iso disk source=<isofile> boot.priority=10
   incus start myvm

Nach der Installation muss die Isodatei noch entfernt werden, sonst landet man beim Reboot wieder in der Installation.

incus stop myvm
incus config device delete myvm iso
incus start myvm