Updating Virtual Machine Configuration

OpenNebula provides a powerful set of tools through the GUI, CLI and API that allow you to update Virtual Machine configuration on the fly, even while the VM is running. This flexibility enables you to optimize performance, adjust resource allocation, and manage your virtual infrastructure with ease. The following table details all the VM configuration update methods available with interface coverage and notes. Use the filter to find the methods relevant to your use case.

VM Configuration Update Methods Reference

SectionTrackerMethodAttributeDescriptionUpdating in RUNNING stateUpdating in POWEROFF stateAPICLIGUILimitations/Notes
Computeone.vm.resizeVM/TEMPLATE/CPUChanges VM CPU allocation factorNOYESYESYESYESScheduler/resource allocation attribute; changes applied after power cycle for effective runtime impact
Computeone.vm.resizeVM/TEMPLATE/VCPUChanges VM virtual CPU countPartialYESYESYESYESVCPU hotplug support required for live effect; otherwise applied after reboot
Computeone.vm.resizeVM/TEMPLATE/MEMORYChanges VM memory allocationPartialYESYESYESYESMemory hotplug support required for live effect; otherwise applied after reboot
Diskone.vm.attachVM/TEMPLATE/DISKAttaches a disk to the VMPartialYESYESYESYESDisk hotplug support depends on disk bus/controller
Diskone.vm.detachVM/TEMPLATE/DISKDetaches a disk from the VMPartialYESYESYESYESMay fail for active/system disks or unsupported buses
Diskone.vm.diskresizeVM/TEMPLATE/DISKResizes VM diskPartialYESYESYESYESMay fail for active/system disks or unsupported buses
Diskone.vm.disksaveasVM/TEMPLATE/DISKSaves VM disk as imageYESYESYESYESYES
NICone.vm.attachnicVM/TEMPLATE/NICAttaches NIC to the VMYESYESYESYESYES
NICone.vm.detachnicVM/TEMPLATE/NICDetaches NIC from the VMYESYESYESYESYES
NICone.vm.updatenicVM/TEMPLATE/NICUpdates VM NIC configurationYESYESYESYESYES
NICone.vm.attachsgVM/TEMPLATE/NIC/SECURITY_GROUPSAttaches security group to VM NICYESYESYESYESYES
NICone.vm.detachsgVM/TEMPLATE/NIC/SECURITY_GROUPSDetaches security group from VM NICYESYESYESYESYES
PCIone.vm.attachpciVM/TEMPLATE/PCIAttaches PCI device to the VMNOYESYESYESYESOnly in POWER OFF state
PCIone.vm.detachpciVM/TEMPLATE/PCIDetaches PCI device from the VMNOYESYESYESYESOnly in POWER OFF state
Snapshotsone.vm.snapshotcreateVM/TEMPLATE/SNAPSHOTCreates VM snapshotYESYESYESYESYES
Snapshotsone.vm.snapshotrevertVM/TEMPLATE/SNAPSHOTReverts VM to snapshot stateNOYESYESYESYESOnly in POWER OFF state
Snapshotsone.vm.snapshotdeleteVM/TEMPLATE/SNAPSHOTDeletes VM snapshotYESYESYESYESYES
Snapshotsone.vm.disksnapshotcreateVM/SNAPSHOTS/SNAPSHOTCreates disk snapshotYESYESYESYESYES
Snapshotsone.vm.disksnapshotdeleteVM/SNAPSHOTS/SNAPSHOTDeletes disk snapshotYESYESYESYESYES
Snapshotsone.vm.disksnapshotrevertVM/SNAPSHOTS/SNAPSHOTReverts disk to snapshot stateNOYESYESYESYESOnly in POWER OFF state
Snapshotsone.vm.disksnapshotrenameVM/SNAPSHOTS/SNAPSHOTRenames disk snapshotYESYESYESYESYES
Backupsone.vm.backupVM/BACKUPSCreates VM backupYESYESYESYESYES
Backupsone.vm.backupcancelVM/BACKUPSCancels running VM backup jobYESYESYESYESYES
Backupsone.vm.restoreVM/BACKUPSRestores VM disks/state from backupNOYESYESYESYESOnly in POWER OFF state
VM attributesone.vm.updateVM/USER_TEMPLATEUpdates VM user templateNOYESYESYESNOUpdates on the next power cycle
VM attributesone.vm.renameVM/NAMERenames VMYESYESYESYESYES
VM attributesone.vm.chownVM/UID, VM/GID, VM/UNAME, VM/GNAMEChanges VM ownershipYESYESYESYESYES
VM attributesone.vm.chmodVM/PERMISSIONSChanges VM permissionsYESYESYESYESYES
VM scheduled actionsone.vm.schedaddVM/TEMPLATE/SCHED_ACTIONAdds scheduled VM actionYESYESYESYESYES
VM scheduled actionsone.vm.schedupdateVM/TEMPLATE/SCHED_ACTIONUpdates scheduled VM actionYESYESYESYESYES
VM scheduled actionsone.vm.scheddeleteVM/TEMPLATE/SCHED_ACTIONDeletes scheduled VM actionYESYESYESYESYES
Otherone.vm.lockVM/LOCKLocks VM actionsYESYESYESYESYES
Otherone.vm.unlockVM/LOCKUnlocks VM actionsYESYESYESYESYES
Otherone.vm.execVM/TEMPLATE/QEMU_GA_EXECExecutes command inside guestYESNOYESYESNORequires guest agent
Otherone.vm.retryexecVM/TEMPLATE/QEMU_GA_EXECRetries guest commandYESNOYESYESNORequires guest agent
Otherone.vm.cancelexecVM/TEMPLATE/QEMU_GA_EXECCancels guest commandYESNOYESYESNORequires guest agent
one.vm.updateconfone.vm.updateconfVM/TEMPLATE/OS/ARCHDefines guest CPU architectureNOYESYESYESYESEffectively immutable for existing VM
one.vm.updateconfone.vm.updateconfVM/TEMPLATE/OS/MACHINEDefines machine/chipset type used by hypervisorNOYESYESYESYESApplied after poweroff/resume
one.vm.updateconfone.vm.updateconfVM/TEMPLATE/OS/KERNELDefines kernel image for direct kernel bootNOYESYESYESNOApplied after poweroff/resume; direct kernel boot only
one.vm.updateconfone.vm.updateconfVM/TEMPLATE/OS/INITRDDefines initrd image for direct kernel bootNOYESYESYESNOApplied after poweroff/resume; direct kernel boot only
one.vm.updateconfone.vm.updateconfVM/TEMPLATE/OS/BOOTLOADERDefines external bootloaderNOYESYESYESYESNot applicable/ignored in KVM
one.vm.updateconfone.vm.updateconfVM/TEMPLATE/OS/BOOTLOADERDefines VM boot deviceYESYESYESYESYESReflected in OpenNebula UI; libvirt may resolve as default disk boot
one.vm.updateconfone.vm.updateconfVM/TEMPLATE/OS/KERNEL_CMDDefines kernel command line parametersNOYESYESYESNOApplied after poweroff/resume; direct kernel boot only
one.vm.updateconfone.vm.updateconfVM/TEMPLATE/OS/ROOTDefines guest root deviceNOYESYESYESNOApplied after poweroff/resume; direct kernel boot only
one.vm.updateconfone.vm.updateconfVM/TEMPLATE/OS/SD_DISK_BUSDefines bus type for SD disksNOYESYESYESYESApplied after poweroff/resume;
one.vm.updateconfone.vm.updateconfVM/TEMPLATE/OS/UUIDDefines VM UUIDNOYESYESYESYESApplied after poweroff/resume
one.vm.updateconfone.vm.updateconfVM/TEMPLATE/OS/FIRMWAREDefines VM firmware/UEFI loaderNOYESYESYESNOApplied after poweroff/resume; requires valid OVMF path
one.vm.updateconfone.vm.updateconfVM/TEMPLATE/OS/FIRMWARE_FORMATDefines firmware image formatNOYESYESYESNOApplied after poweroff/resume with firmware
one.vm.updateconfone.vm.updateconfVM/TEMPLATE/CPU_MODEL/MODELDefines guest CPU model exposed to VMNOYESYESYESNOApplied after poweroff/resume if CPU model is valid for host
one.vm.updateconfone.vm.updateconfVM/TEMPLATE/CPU_MODEL/FEATURESDefines guest CPU feature flagsNOYESYESYESNOApplied after poweroff/resume if features are supported by host CPU
one.vm.updateconfone.vm.updateconfVM/TEMPLATE/FEATURES/ACPIEnables ACPI supportNOYESYESYESYESApplied after poweroff/resume
one.vm.updateconfone.vm.updateconfVM/TEMPLATE/FEATURES/PAEEnables Physical Address Extension supportNOYESYESYESYESApplied after poweroff/resume
one.vm.updateconfone.vm.updateconfVM/TEMPLATE/FEATURES/APICEnables APIC supportNOYESYESYESYESApplied after poweroff/resume
one.vm.updateconfone.vm.updateconfVM/TEMPLATE/FEATURES/LOCALTIMEConfigures guest RTC clock modeNOYESYESYESYESApplied after poweroff/resume
one.vm.updateconfone.vm.updateconfVM/TEMPLATE/FEATURES/HYPERVEnables Hyper-V enlightenmentsNOYESYESYESYESApplied after poweroff/resume
one.vm.updateconfone.vm.updateconfVM/TEMPLATE/FEATURES/GUEST_AGENTEnables QEMU guest agent channelNOYESYESYESYESApplied after poweroff/resume
one.vm.updateconfone.vm.updateconfVM/TEMPLATE/FEATURES/VIRTIO_SCSI_QUEUESConfigures virtio-scsi queue countNOYESYESYESNOApplied after poweroff/resume
one.vm.updateconfone.vm.updateconfVM/TEMPLATE/FEATURES/VIRTIO_BLK_QUEUESConfigures virtio-blk queue countNOYESYESYESNOApplied after poweroff/resume
one.vm.updateconfone.vm.updateconfVM/TEMPLATE/FEATURES/IOTHREADSConfigures disk IO threadsNOYESYESYESNOApplied after poweroff/resume
one.vm.updateconfone.vm.updateconfVM/TEMPLATE/INPUT/TYPEDefines guest input device typeNOYESYESYESYESApplied after poweroff/resume
one.vm.updateconfone.vm.updateconfVM/TEMPLATE/INPUT/BUSDefines guest input device busNOYESYESYESYESApplied after poweroff/resume
one.vm.updateconfone.vm.updateconfVM/TEMPLATE/GRAPHICS/TYPEDefines graphics protocol/backendNOYESYESYESNOTemplate changes while running; applied after poweroff/resume. SPICE works with external clients, not FireEdge/Guacamole in this setup
one.vm.updateconfone.vm.updateconfVM/TEMPLATE/GRAPHICS/LISTENDefines graphics listen addressNOYESYESYESYESApplied after poweroff/resume
one.vm.updateconfone.vm.updateconfVM/TEMPLATE/GRAPHICS/PASSWDDefines graphics console passwordNOYESYESYESYESApplied after poweroff/resume; password prompt works with external VNC/SPICE clients, not via FireEdge/Guacamole
one.vm.updateconfone.vm.updateconfVM/TEMPLATE/GRAPHICS/KEYMAPDefines keyboard layout for graphics consoleNOYESYESYESYESApplied after poweroff/resume
one.vm.updateconfone.vm.updateconfVM/TEMPLATE/GRAPHICS/COMMANDDefines graphics command parametersNOYESYESYESNOStored in template but not passed to libvirt domain XML in KVM
one.vm.updateconfone.vm.updateconfVM/TEMPLATE/VIDEO/TYPEDefines virtual video adapter typeYESYESYESYESYESLive-applied; without VRAM/related options may fall back to default model such as cirrus
one.vm.updateconfone.vm.updateconfVM/TEMPLATE/VIDEO/IOMMUEnables IOMMU support for video deviceYESYESYESYESYES
one.vm.updateconfone.vm.updateconfVM/TEMPLATE/VIDEO/ATSEnables Address Translation Service for video deviceYESYESYESYESYES
one.vm.updateconfone.vm.updateconfVM/TEMPLATE/VIDEO/VRAMDefines virtual video memory sizeYESYESYESYESYES
one.vm.updateconfone.vm.updateconfVM/TEMPLATE/VIDEO/RESOLUTIONDefines guest display resolutionYESYESYESYESYES
one.vm.updateconfone.vm.updateconfVM/TEMPLATE/RAW/DATADefines raw hypervisor XML snippetNOYESYESYESNOApplied after poweroff/resume
one.vm.updateconfone.vm.updateconfVM/TEMPLATE/RAW/DATA_VMXDefines VMX-specific raw configurationDefines VMX-specific raw configurationNOYESYESYESNONot applicable to KVM; template-only/no effect
one.vm.updateconfone.vm.updateconfVM/TEMPLATE/RAW/TYPEDefines hypervisor backend typeNOYESYESYESNOActs as driver selector; for KVM must be kvm
one.vm.updateconfone.vm.updateconfVM/TEMPLATE/RAW/VALIDATEEnables raw XML validationNOYESYESYESNOTemplate/validation behavior; not a live libvirt change
one.vm.updateconfone.vm.updateconfVM/TEMPLATE/BACKUP_CONFIG/FS_FREEZEEnables filesystem freeze during backupYESYESYESYESYES
one.vm.updateconfone.vm.updateconfVM/TEMPLATE/BACKUP_CONFIG/KEEP_LASTDefines number of retained backupsYESYESYESYESYES
one.vm.updateconfone.vm.updateconfVM/TEMPLATE/BACKUP_CONFIG/BACKUP_VOLATILEIncludes volatile disks in backupYESYESYESYESYES
one.vm.updateconfone.vm.updateconfVM/TEMPLATE/BACKUP_CONFIG/MODEDefines backup modeYESYESYESYESYES
one.vm.updateconfone.vm.updateconfVM/TEMPLATE/BACKUP_CONFIG/INCREMENT_MODEDefines incremental backup modeYESYESYESYESYES