virt.instance.create¶
Create a new virtualized instance.
No Additional Items
Tuple Validation
Parameter 1: virt_instance_create
virt_instance_create
Type: objectVirtInstanceCreateArgs parameters.
No Additional PropertiesName
Type: stringName for the new virtual instance.
Must be at least 1
characters long
Must be at most 200
characters long
Source Type
Type: const Default: "IMAGE"Source type for instance creation.
Must be one of:
- "IMAGE"
"IMAGE"
Storage Pool
Default: nullStorage pool under which to allocate root filesystem. Must be one of the pools listed in virt.global.config output under "storage_pools". If None (default) then the pool specified in the global configuration will be used.
Must be at least 1
characters long
Image
Type: stringImage identifier to use for creating the instance.
Must be at least 1
characters long
Must be at most 200
characters long
Root Disk Size
Type: integer Default: 10This can be specified when creating VMs so the root device's size can be configured. Root device for VMs is a sparse zvol and the field specifies space in GBs and defaults to 10 GBs.
Value must be greater or equal to 5
Root Disk Io Bus
Type: enum (of string) Default: "NVME"I/O bus type for the root disk (defaults to NVME for best performance).
Must be one of:
- "NVME"
- "VIRTIO-BLK"
- "VIRTIO-SCSI"
Remote
Type: const Default: "LINUX_CONTAINERS"Remote image source to use.
Must be one of:
- "LINUX_CONTAINERS"
"LINUX_CONTAINERS"
Instance Type
Type: const Default: "CONTAINER"Type of instance to create.
Must be one of:
- "CONTAINER"
"CONTAINER"
Environment
Default: nullEnvironment variables to set inside the instance.
Each additional property must conform to the following schema
Type: stringAutostart
Default: trueWhether the instance should automatically start when the host boots.
Cpu
Default: nullCPU allocation specification or null
for automatic allocation.
Devices
Default: nullArray of devices to attach to the instance.
No Additional Items
Each item of this array must be:
Disk
Type: objectNo Additional Properties
Name
Default: nullOptional human-readable name for the virtualization device.
Must be at least 1
characters long
Description
Default: nullOptional description explaining the purpose or configuration of this device.
Must be at least 1
characters long
Readonly
Type: boolean Default: falseWhether the device should be mounted in read-only mode.
Dev Type
Type: constDevice type identifier for virtual disk devices.
Must be one of:
- "DISK"
"DISK"
Source
Default: nullFor CONTAINER instances, this would be a valid pool path. For VM instances, it can be a valid zvol path or an incus storage volume name.
Must be at least 1
characters long
Destination
Default: nullTarget path where the disk appears inside the virtualized instance.
Boot Priority
Default: nullBoot priority for this disk device. Lower numbers boot first. null
means non-bootable.
Value must be greater or equal to 0
Io Bus
Type: enum (of null or string) Default: nullStorage bus type for optimal performance and compatibility.
Must be one of:
- "NVME"
- "VIRTIO-BLK"
- "VIRTIO-SCSI"
- null
Storage Pool
Default: nullStorage pool in which the device is located. This must be one of the storage pools listed in virt.global.config output.
If this is set to None during device creation, then the default storage pool defined in virt.global.config will be used.
Must be at least 1
characters long
GPU
Type: objectNo Additional Properties
Name
Default: nullOptional human-readable name for the virtualization device.
Must be at least 1
characters long
Description
Default: nullOptional description explaining the purpose or configuration of this device.
Must be at least 1
characters long
Readonly
Type: boolean Default: falseWhether the device should be mounted in read-only mode.
Dev Type
Type: constDevice type identifier for graphics processing units.
Must be one of:
- "GPU"
"GPU"
Gpu Type
Type: enum (of string)Type of GPU virtualization (physical passthrough, mediated device, etc.).
Must be one of:
- "PHYSICAL"
- "MDEV"
- "MIG"
- "SRIOV"
Id
Default: nullUnique identifier for the GPU device.
Gid
Default: nullGroup ID for device permissions inside the container.
Value must be greater or equal to 0
and lesser or equal to 90000000
Uid
Default: nullUser ID for device permissions inside the container.
Value must be greater or equal to 0
and lesser or equal to 90000000
Mode
Default: nullPermission mode for device access (e.g., '660').
Mdev
Default: nullMediated device identifier for GPU virtualization.
Must be at least 1
characters long
Mig Uuid
Default: nullMulti-Instance GPU UUID for NVIDIA GPU partitioning.
Must be at least 1
characters long
Pci
Default: nullPCI address of the GPU device on the host system.
Must be at least 1
characters long
Productid
Default: nullProduct identifier for GPU device matching.
Must be at least 1
characters long
Vendorid
Default: nullVendor identifier for GPU device matching.
Must be at least 1
characters long
Proxy
Type: objectNo Additional Properties
Name
Default: nullOptional human-readable name for the virtualization device.
Must be at least 1
characters long
Description
Default: nullOptional description explaining the purpose or configuration of this device.
Must be at least 1
characters long
Readonly
Type: boolean Default: falseWhether the device should be mounted in read-only mode.
Dev Type
Type: constDevice type identifier for network port forwarding.
Must be one of:
- "PROXY"
"PROXY"
Source Proto
Type: enum (of string)Network protocol (TCP or UDP) for the source connection.
Must be one of:
- "UDP"
- "TCP"
Source Port
Type: integerSource port number on the host system to forward from.
Value must be greater or equal to 1
and lesser or equal to 65535
Dest Proto
Type: enum (of string)Network protocol (TCP or UDP) for the destination connection.
Must be one of:
- "UDP"
- "TCP"
Dest Port
Type: integerDestination port number inside the virtualized instance.
Value must be greater or equal to 1
and lesser or equal to 65535
TPM
Type: objectNo Additional Properties
Name
Default: nullOptional human-readable name for the virtualization device.
Must be at least 1
characters long
Description
Default: nullOptional description explaining the purpose or configuration of this device.
Must be at least 1
characters long
Readonly
Type: boolean Default: falseWhether the device should be mounted in read-only mode.
Dev Type
Type: constDevice type identifier for Trusted Platform Module devices.
Must be one of:
- "TPM"
"TPM"
Path
Default: nullPath to the TPM device on the host system.
Pathrm
Default: nullResource manager path for TPM device access.
USB
Type: objectNo Additional Properties
Name
Default: nullOptional human-readable name for the virtualization device.
Must be at least 1
characters long
Description
Default: nullOptional description explaining the purpose or configuration of this device.
Must be at least 1
characters long
Readonly
Type: boolean Default: falseWhether the device should be mounted in read-only mode.
Dev Type
Type: constDevice type identifier for USB devices.
Must be one of:
- "USB"
"USB"
Bus
Default: nullUSB bus number on the host system.
Dev
Default: nullUSB device number on the specified bus.
Product Id
Default: nullUSB product identifier for device matching.
Vendor Id
Default: nullUSB vendor identifier for device matching.
NIC
Type: objectNo Additional Properties
Name
Default: nullOptional human-readable name for the virtualization device.
Must be at least 1
characters long
Description
Default: nullOptional description explaining the purpose or configuration of this device.
Must be at least 1
characters long
Readonly
Type: boolean Default: falseWhether the device should be mounted in read-only mode.
Dev Type
Type: constDevice type identifier for network interface cards.
Must be one of:
- "NIC"
"NIC"
Network
Default: nullName of the network to connect this NIC to.
Must be at least 1
characters long
Nic Type
Default: nullType of network interface (bridged or macvlan).
Must be one of:
- "BRIDGED"
- "MACVLAN"
Parent
Default: nullParent network interface on the host system.
Must be at least 1
characters long
Mac
Default: nullMAC address for the virtual network interface. null
for auto-generated.
PCI
Type: objectNo Additional Properties
Name
Default: nullOptional human-readable name for the virtualization device.
Must be at least 1
characters long
Description
Default: nullOptional description explaining the purpose or configuration of this device.
Must be at least 1
characters long
Readonly
Type: boolean Default: falseWhether the device should be mounted in read-only mode.
Dev Type
Type: constDevice type identifier for PCI device passthrough.
Must be one of:
- "PCI"
"PCI"
Address
Type: stringPCI bus address of the device to pass through to the virtualized instance.
Must be at least 1
characters long
CDROM
Type: objectNo Additional Properties
Name
Default: nullOptional human-readable name for the virtualization device.
Must be at least 1
characters long
Description
Default: nullOptional description explaining the purpose or configuration of this device.
Must be at least 1
characters long
Readonly
Type: boolean Default: falseWhether the device should be mounted in read-only mode.
Dev Type
Type: constDevice type identifier for CD-ROM/DVD optical drives.
Must be one of:
- "CDROM"
"CDROM"
Source
Type: stringPath to the ISO image file or physical optical drive to mount.
Must be at least 1
characters long
Boot Priority
Default: nullBoot priority for this optical device. Lower numbers boot first. null
means non-bootable.
Value must be greater or equal to 0
Memory
Default: nullMemory allocation in bytes or null
for automatic allocation.
Privileged Mode
Type: boolean Default: falseThis is only valid for containers and should only be set when container instance which is to be deployed is to run in a privileged mode.
VirtInstanceEntry
Type: objectThe created virtual instance configuration.
No Additional PropertiesId
Type: stringUnique identifier for the virtual instance.
Name
Type: stringHuman-readable name for the virtual instance.
Must be at least 1
characters long
Must be at most 200
characters long
Type
Type: enum (of string) Default: "CONTAINER"Type of virtual instance.
Must be one of:
- "CONTAINER"
- "VM"
Status
Type: enum (of string)Current operational status of the virtual instance.
Must be one of:
- "RUNNING"
- "STOPPED"
- "UNKNOWN"
- "ERROR"
- "FROZEN"
- "STARTING"
- "STOPPING"
- "FREEZING"
- "THAWED"
- "ABORTING"
Cpu
CPU configuration string or null
for default allocation.
Memory
Memory allocation in bytes or null
for default allocation.
Autostart
Type: booleanWhether the instance automatically starts when the host boots.
Environment
Type: objectEnvironment variables to set inside the instance.
Each additional property must conform to the following schema
Type: stringAliases
Type: array of objectArray of IP aliases configured for the instance.
No Additional ItemsEach item of this array must be:
VirtInstanceAlias
Type: objectNo Additional Properties
Type
Type: enum (of string)Type of IP address (INET for IPv4, INET6 for IPv6).
Must be one of:
- "INET"
- "INET6"
Address
Type: stringIP address for the virtual instance.
Must be at least 1
characters long
Netmask
Network mask in CIDR notation.
Image
Type: objectImage information used to create this instance.
No Additional PropertiesArchitecture
Hardware architecture of the image (e.g., amd64, arm64).
Description
Human-readable description of the image.
Os
Operating system family of the image.
Release
Version or release name of the operating system.
Serial
Unique serial identifier for the image.
Type
Type of image (container, virtual-machine, etc.).
Variant
Image variant (default, cloud, minimal, etc.).
Secureboot
Whether the image supports UEFI Secure Boot.
User namespace ID mapping configuration for privilege isolation.
UserNsIdmap
Type: objectNo Additional Properties
User ID mapping configuration for user namespace isolation.
IdmapUserNsEntry
Type: objectNo Additional Properties
Hostid
Type: integerStarting host ID for the mapping range.
Maprange
Type: integerNumber of IDs to map in this range.
Nsid
Type: integerStarting namespace ID for the mapping range.
Group ID mapping configuration for user namespace isolation.
IdmapUserNsEntry
Type: objectNo Additional Properties
Hostid
Type: integerStarting host ID for the mapping range.
Maprange
Type: integerNumber of IDs to map in this range.
Nsid
Type: integerStarting namespace ID for the mapping range.
Raw
Raw low-level configuration options (advanced use only).
Vnc Enabled
Type: booleanWhether VNC remote access is enabled for the instance.
Vnc Port
TCP port number for VNC connections or null
if VNC is disabled.
Vnc Password
Password for VNC access or null
if no password is set.
Must be at least 1
characters long
Secure Boot
Whether UEFI Secure Boot is enabled (VMs only) or null
for containers.
Privileged Mode
Whether the container runs in privileged mode or null
for VMs.
Root Disk Size
Size of the root disk in GB or null
for default size.
Root Disk Io Bus
Type: enum (of null or string)I/O bus type for the root disk or null
for default.
Must be one of:
- "NVME"
- "VIRTIO-BLK"
- "VIRTIO-SCSI"
- null
Storage Pool
Type: stringStorage pool in which the root of the instance is located.
Must be at least 1
characters long
Required roles: VIRT_INSTANCE_WRITE