Aprovisionando Fedora CoreOS sobre Microsoft Hyper-V
Esta guía muestra como aprovisionar nodos Fedora CoreOS (FCOS) nuevos sobre Microsoft Hyper-V.
Prerrequisitos
Antes de aprovisionar una máquina FCOS, usted debe tener un archivo de configuración Ignition que contenga sus personalizaciones. Si no tiene uno consulte Producir un Archivo Ignition.
También necesitarás una pequeña utilidad de libhvee llamada kvpctl. Esta conecta la configuración de Ignition a tu máquina virtual. Puedes encontrar los binarios precompilados en la página de lanzamiento del proyecto.
Descargar la imagen del disco
Las imágenes de disco Hyper-V pueden ser descargadas manualmente desde la página de descarga. Asegúrese que descomprima la imagen tras la descarga.
Arrancar una MV nueva en Microsoft Hyper-V
Crear un conmutador virtual
Primero debe crear un conmutador virtual para que su máquina virtual tenga una red a la que conectarse. Para ello, abra el Gestor de Hyper-V y seleccione su servidor en la lista:
Luego pulse en la Gestión de Conmutadores _Virtuales… dentro del panel Acciones:
Siga las indicaciones bajo el Nuevo conmutador de red virtual para crear el conmutador virtual del tipo que desea:
Creating a virtual machine
In the Actions panel of Hyper-V Manager, click New, then Virtual Machine…:
This will launch the New Virtual Machine Wizard. When completing the wizard, note the following settings:
-
If you select a Generation 2 virtual machine, see Configuring Secure Boot.
-
When prompted to configure networking, select the virtual switch you created earlier.
-
When prompted to connect a virtual hard disk, select Use an existing virtual disk and specify the disk image you downloaded earlier:
Ajustar la configuración Ignition
Before starting your virtual machine for the first time, you must attach your Ignition config containing the customizations you want to apply to Fedora CoreOS.
On Hyper-V, the Ignition config is presented to the hypervisor in parts. Ignition reads the parts and reassembles them into a single config. You can use the kvpctl add-ign subcommand to create these parts and attach them to the virtual machine. The syntax for the command is as follows:
.\kvpctl.exe <name_of_vm> add-ign <path_to_ign_file>
Por ejemplo:
> .\kvpctl.exe myvm add-ign C:\Users\joe\myvm.ign
added key: ignition.config.0
added key: ignition.config.1
added key: ignition.config.2
added key: ignition.config.3
added key: ignition.config.4
added key: ignition.config.5
added key: ignition.config.6
Arrancar la MV
Once you’ve attached the Ignition config to the virtual machine, right-click the virtual machine in Hyper-V Manager and select Start.
Viewing the key-value pairs assigned to your virtual machine
You can view the key-value pairs assigned to your machine with the kvpctl get subcommand. You can only get key-value pairs when the virtual machine is running.
.\kvpctl.exe <name_of_vm> get
Por ejemplo:
> .\kvpctl.exe myvm get
ignition.config.3 = th":"/etc/containers/registries.conf..."
ignition.config.4 = ,"contents":{"source":"data:,makeste..."
ignition.config.5 = nabled":false,"mask":true,"name":"do..."
ignition.config.6 = service\n\n[Service]\nExecStart=/usr..."
ignition.config.0 = {"ignition":{"config":{"replace":{"v..."
ignition.config.1 = default.target.wants","user":{"name"..."
ignition.config.2 = "user":{"name":"root"},"contents":{"..."
Want to help? Learn how to contribute to Fedora Docs ›