Provisioning di Fedora CoreOS su AppleHV
Questa guida mostra come fornire nuove istanze di Fedora CoreOS (FCOS) su macOS utilizzando [vfkit](https://github.com/crc-org/vfkit).
Prerequisiti
Prima di configurare una macchina FCOS, è necessario avere un file di configurazione Ignition con le proprie personalizzazioni. Se non ne hai uno, consulta Produzione di un File Ignition.
Avrai anche bisogno di compilare o acquisire vfkit. I binari precompilati sono disponibili anche nella sua pagina di rilasci. Vfkit, come QEMU, ha molte opzioni che esulano dall’ambito di questo esempio di provisioning. Ti consiglio di leggere la loro documentazione.
Booting a new VM on macOS
This section shows how to boot a new VM with vfkit. Vfkit is known to work with both Intel and Apple Silicon based Macs.
Fetching the AppleHV image
Fetch the latest image suitable for your target stream (or download and verify it from the web). Remember to download the appropriate image based on the architecture of your Mac. Once downloaded, you will also need to decompress the image.
Setting up a new VM
Vfkit is not a stateful virtual machine framework. You simply need to run the vfkit binary to start a virtual machine. The following command line will launch a VM with:
-
2 virtual CPUs
-
2 GB of memory
-
a network device that will receive a IP address from Vfit
-
a GUI console with keyboard and mouse support
IGNITION_CONFIG="/path/to/example.ign"
IMAGE="/path/to/image.qcow2"
./vfkit --cpus 2 --memory 2048 \
--bootloader efi,variable-store=efi-variable-store,create \
--device virtio-blk,path=${IMAGE} \
--device virtio-net,nat \
--ignition ${IGNITION_CONFIG} \
--device virtio-input,keyboard \
--device virtio-input,pointing \
--device virtio-gpu,width=800,height=600 \
--gui
Note: The AppleHV hypervisor does not allow you to see early boot and kernel messages. While you will see a GRUB boot menu, you will not see anything until later in the boot.
Exploring the OS

When FCOS is completed booting, you will see the IP address of the VM displayed in the GUI window. Vfkit will lease an address in the 192.168.64.0/24
network. At this point, you can either choose to login or SSH to the VM. Unlike some other virtualization providers, you can SSH to the virtual machine from the host.
ssh core@192.168.64.5
Want to help? Learn how to contribute to Fedora Docs ›