Configure persistent virtualization with libvirt and bcvk
Configure persistent virtualization with libvirt and bcvk
Open 目次
このコンテンツは選択した言語では利用できません。
Configure persistent virtualization with libvirt and bcvk
Use libvirt with bcvk to gain the stability and control required for production. This configuration maintains system state across reboots and provides granular resource allocation to ensure that your bootable images mirror the performance and constraints of target hardware.
Before you begin
You have installed the bcvk utility on the host system.
You have installed, enabled, and started the libvirtd daemon.
You have permissions to manage libvirt domains. The typical membership in the libvirt group.
You have access to the registry.redhat.io container registry.
To configure persistent virtualization, complete the following steps.
Procedure
Create a persistent libvirt VM by using one of the following methods:
To create a basic VM with default settings:
The libvirt run command automates VM provisioning, including networking and SSH configuration.
$ bcvk libvirt run registry.redhat.io/rhel10/rhel-bootc:latest
To create a customized VM with specific resource constraints:
Use flags to define the name, memory (in MB), CPU count, and disk size (in GB).
After the VM is provisioned, manage its state by using the bcvk libvirt subcommands:
Expand
Task
Command
List VMs
bcvk libvirt list
Start a VM
bcvk libvirt start <vm_name>
Stop a VM
bcvk libvirt stop <vm_name>
Remove a VM
bcvk libvirt rm -f <vm_name>
Access by SSH
bcvk libvirt ssh <vm_name>
Important
The bcvk utility handles secure access by injecting SSH keys using systemd credentials. The private key generated during the provisioning process is unique to which specific VM and is stored securely within the domain metadata. For production environments or longer-term development, bcvk integrates directly with libvirt.