vm.create ========= Create a Virtual Machine (VM). Maximum of 16 guest virtual CPUs are allowed. By default, every virtual CPU is configured as a separate package. Multiple cores can be configured per CPU by specifying `cores` attributes. `vcpus` specifies total number of CPU sockets. `cores` specifies number of cores per socket. `threads` specifies number of threads per core. `ensure_display_device` when set ( the default ) will ensure that the guest always has access to a video device. For headless installations like ubuntu server this is required for the guest to operate properly. However for cases where consumer would like to use GPU passthrough and does not want a display device added should set this to `false`. `arch_type` refers to architecture type and can be specified for the guest. By default the value is `null` and system in this case will choose a reasonable default based on host. `machine_type` refers to machine type of the guest based on the architecture type selected with `arch_type`. By default the value is `null` and system in this case will choose a reasonable default based on `arch_type` configuration. `shutdown_timeout` indicates the time in seconds the system waits for the VM to cleanly shutdown. During system shutdown, if the VM hasn't exited after a hardware shutdown signal has been sent by the system within `shutdown_timeout` seconds, system initiates poweroff for the VM to stop it. `hide_from_msr` is a boolean which when set will hide the KVM hypervisor from standard MSR based discovery and is useful to enable when doing GPU passthrough. `hyperv_enlightenments` can be used to enable subset of predefined Hyper-V enlightenments for Windows guests. These enlightenments improve performance and enable otherwise missing features. `suspend_on_snapshot` is a boolean attribute which when enabled will automatically pause/suspend VMs when a snapshot is being taken for periodic snapshot tasks. For manual snapshots, if user has specified vms to be paused, they will be in that case. .. raw:: html
VMCreateArgs parameters.
No Additional PropertiesAdditional command line arguments passed to the VM hypervisor.
CPU virtualization mode.
CUSTOM: Use specified model.HOST-MODEL: Mirror host CPU.HOST-PASSTHROUGH: Provide direct access to host CPU features.Specific CPU model to emulate. null to use hypervisor default.
Display name of the virtual machine.
Must be at least 1 characters long
Optional description or notes about the virtual machine.
Number of virtual CPUs allocated to the VM.
Value must be greater or equal to 1
Number of CPU cores per socket.
Value must be greater or equal to 1
Number of threads per CPU core.
Value must be greater or equal to 1
Set of host CPU cores to pin VM CPUs to. null for no pinning.
Set of NUMA nodes to constrain VM memory allocation. null for no constraints.
Whether to expose detailed CPU topology information to the guest OS.
Whether to pin virtual CPUs to specific host CPU cores. Improves performance but reduces host flexibility.
Whether to suspend the VM when taking snapshots.
Whether to enable virtual Trusted Platform Module (TPM) for the VM.
Amount of memory allocated to the VM in megabytes.
Value must be greater or equal to 20
Minimum memory allocation for dynamic memory ballooning in megabytes. Allows VM memory to shrink during low usage but guarantees this minimum. null to disable ballooning.
Value must be greater or equal to 20
Whether to enable Hyper-V enlightenments for improved Windows guest performance.
Boot firmware type. UEFI for modern UEFI, UEFI_CSM for legacy BIOS compatibility.
OVMF firmware file to use for UEFI boot.
"OVMF_CODE.fd"
"OVMF_CODE.secboot.fd"
Whether to automatically start the VM when the host system boots.
Whether to hide hypervisor signatures from guest OS MSR access.
Whether to ensure at least one display device is configured for the VM.
Guest OS time zone reference. LOCAL uses host timezone, UTC uses coordinated universal time.
Maximum time in seconds to wait for graceful shutdown before forcing power off. Default 90s balances allowing sufficient time for clean shutdown while avoiding indefinite hangs.
Value must be greater or equal to 5 and lesser or equal to 300
Guest architecture type. null to use hypervisor default.
Virtual machine type/chipset. null to use hypervisor default.
Unique UUID for the VM. null to auto-generate.
Whether to enable UEFI Secure Boot for enhanced security.
The newly created virtual machine configuration.
No Additional PropertiesAdditional command line arguments passed to the VM hypervisor.
CPU virtualization mode.
CUSTOM: Use specified model.HOST-MODEL: Mirror host CPU.HOST-PASSTHROUGH: Provide direct access to host CPU features.Specific CPU model to emulate. null to use hypervisor default.
Display name of the virtual machine.
Must be at least 1 characters long
Optional description or notes about the virtual machine.
Number of virtual CPUs allocated to the VM.
Value must be greater or equal to 1
Number of CPU cores per socket.
Value must be greater or equal to 1
Number of threads per CPU core.
Value must be greater or equal to 1
Set of host CPU cores to pin VM CPUs to. null for no pinning.
Set of NUMA nodes to constrain VM memory allocation. null for no constraints.
Whether to expose detailed CPU topology information to the guest OS.
Whether to pin virtual CPUs to specific host CPU cores. Improves performance but reduces host flexibility.
Whether to suspend the VM when taking snapshots.
Whether to enable virtual Trusted Platform Module (TPM) for the VM.
Amount of memory allocated to the VM in megabytes.
Value must be greater or equal to 20
Minimum memory allocation for dynamic memory ballooning in megabytes. Allows VM memory to shrink during low usage but guarantees this minimum. null to disable ballooning.
Value must be greater or equal to 20
Whether to enable Hyper-V enlightenments for improved Windows guest performance.
Boot firmware type. UEFI for modern UEFI, UEFI_CSM for legacy BIOS compatibility.
OVMF firmware file to use for UEFI boot.
"OVMF_CODE.fd"
"OVMF_CODE.secboot.fd"
Whether to automatically start the VM when the host system boots.
Whether to hide hypervisor signatures from guest OS MSR access.
Whether to ensure at least one display device is configured for the VM.
Guest OS time zone reference. LOCAL uses host timezone, UTC uses coordinated universal time.
Maximum time in seconds to wait for graceful shutdown before forcing power off. Default 90s balances allowing sufficient time for clean shutdown while avoiding indefinite hangs.
Value must be greater or equal to 5 and lesser or equal to 300
Guest architecture type. null to use hypervisor default.
Virtual machine type/chipset. null to use hypervisor default.
Unique UUID for the VM. null to auto-generate.
Array of virtual devices attached to this VM.
No Additional ItemsUnique identifier for the VM device.
Device-specific configuration attributes.
Device type identifier for CD-ROM/DVD devices.
Specific value:"CDROM"
Path must not contain "{", "}" characters, and it should start with "/mnt/".
Must match regular expression:^[^{}]*$
Must be at least 1 characters long
Device type identifier for display/graphics devices.
Specific value:"DISPLAY"
Screen resolution for the virtual display.
VNC/SPICE port number for remote display access. null for auto-assignment.
Value must be greater or equal to 5900 and lesser or equal to 65535
Web-based display access port number. null for auto-assignment.
IP address to bind the display server to.
Must be at least 1 characters long
Whether to wait for a client connection before starting the VM.
Password for display server authentication.
Whether to enable web-based display access.
Display protocol type.
Device type identifier for network interface cards.
Specific value:"NIC"
Whether to trust guest OS receive filter settings for better performance.
Network interface controller type. E1000 for Intel compatibility, VIRTIO for performance.
Host network interface or bridge to attach to. null for no attachment.
MAC address for the virtual network interface. null for auto-generation.
^([0-9A-Fa-f]{2}[:-]?){5}([0-9A-Fa-f]{2})$
Device type identifier for PCI passthrough devices.
Specific value:"PCI"
Host PCI device identifier to pass through to the VM.
Must be at least 1 characters long
Device type identifier for raw disk devices.
Specific value:"RAW"
Path must not contain "{", "}" characters.
Must match regular expression:^[^{}]*$
Must be at least 1 characters long
Disk controller interface type. AHCI for compatibility, VIRTIO for performance.
Whether the disk file already exists or should be created.
Whether this disk should be marked as bootable.
Size of the disk in bytes. Required if creating a new disk file.
Logical sector size for the disk. null for default.
Physical sector size for the disk. null for default.
I/O backend type for disk operations.
Serial number to assign to the virtual disk. null for auto-generated.
Must be at least 1 characters long
Device type identifier for virtual disk devices.
Specific value:"DISK"
Path to existing disk file or ZFS volume. null if creating a new ZFS volume.
Must be at least 1 characters long
Disk controller interface type. AHCI for compatibility, VIRTIO for performance.
Whether to create a new ZFS volume for this disk.
Name for the new ZFS volume. Required if create_zvol is true.
Size of the new ZFS volume in bytes. Required if create_zvol is true.
Logical sector size for the disk. null for default.
Physical sector size for the disk. null for default.
I/O backend type for disk operations.
Serial number to assign to the virtual disk. null for auto-generated.
Must be at least 1 characters long
Device type identifier for USB devices.
Specific value:"USB"
USB device attributes for identification. null for USB host controller only.
USB vendor identifier in hexadecimal format (e.g., '0x1d6b' for Linux Foundation).
Must match regular expression:^0x.*
Must be at least 1 characters long
USB product identifier in hexadecimal format (e.g., '0x0002' for 2.0 root hub).
Must match regular expression:^0x.*
Must be at least 1 characters long
USB controller type for the virtual machine.
Host USB device path to pass through. null for controller only.
Must be at least 1 characters long
ID of the virtual machine this device belongs to.
Boot order priority for this device (lower numbers boot first).
Whether at least one display device is available for this VM.
Unique identifier for the virtual machine.
Current runtime status information for the VM.
No Additional PropertiesCurrent state of the virtual machine.
Must be at least 1 characters long
"RUNNING"
"STOPPED"
"SUSPENDED"
Process ID of the running VM. null if not running.
Hypervisor-specific domain state.
Must be at least 1 characters long
Whether to enable UEFI Secure Boot for enhanced security.