How to use the command "qm pending" (with examples)
The “qm pending” command is used to get the virtual machine configuration with both the current and pending values. It is a useful command for managing virtual machines and ensuring that the configurations are set correctly.
Use case 1: Get the virtual machine configuration of a specific virtual machine
Code:
qm pending vm_id
Motivation: The motivation for using this command is to retrieve the current and pending configuration values of a specific virtual machine. This can be useful when troubleshooting or making changes to the virtual machine.
Explanation: The “qm pending” command is followed by the virtual machine ID (vm_id) parameter, which is the ID of the specific virtual machine you want to retrieve the configuration for. This parameter is necessary to specify which virtual machine’s configuration you want to retrieve.
Example output:
$ qm pending 100
Current pending configuration of virtual machine: 100
mem: 4096
cores: 2
ostype: debian
rootfs: local-lvm:vm-100-disk-1,size=80G
In this example, the “qm pending” command is used to get the current and pending configuration values for virtual machine 100. The output displays the current values for memory, cores, operating system type, and root file system.
Conclusion:
The “qm pending” command is a useful tool for managing virtual machines and ensuring that the configurations are set correctly. By using this command, you can easily retrieve the current and pending configuration values of a specific virtual machine, which can be helpful for troubleshooting or making changes to the virtual machine.