The vmid.conf file stores configuration information for each virtual machine and is located at /etc/pve/nodes/<name>/qemu-server/<vmid.conf>. The directory structure divides all VM configuration files into categories based on nodes. For example, the configuration file for our VM #100 is stored in the following location:
# /etc/pve/nodes/pmx-01/qemu-server/100.conf
When we migrate a VM from one node to another, Proxmox just moves the configuration file to the destination node. If the VM is powered on during the migration, then the entire memory content of the VM is also migrated to the destination node. For our VM 100, if we migrate it to pmx-02, the second node in the cluster, then the location of the 100.conf file will be as follows:
# /etc/pve/nodes/pmx-02/qemu-server/100.conf
We will now take a look at a <vm_id>.conf file itself to see what makes up a virtual machine behind the scenes. This configuration file follows a simple option:value format. The following is the configuration file of our VM #100:
Since our virtual machine also has a snapshot, the configuration also embeds the specification of the virtual machine as it was during the snapshot. Almost all the options in this file can be set through the Proxmox GUI under the KVM virtual machine Options menu tab. Some option values, such as arguments, have to be added through the CLI. The following table shows some of the possible options. The values can be used as virtual machine configurations:
Options |
Description |
Possible values |
args |
Allows you to pass arguments to a VM. Features such as sound can be activated using KVM arguments. Refer to section 2.2.6.2 for more details on arguments used in the KVM. |
See section 2.2.6.2 |
autostart |
Auto-restarts a virtual machine after crash. The default value is 0. |
1; 0 |
balloon |
Targeted RAM for a VM in MB. |
Integer number |
boot |
Default boot device |
c=hdd; d=cd-rom; n=network |
bootdisk |
Enables booting from a specific disk. |
ide; sata; scsi; virtio |
core |
Number of cores per socket. The default value is 1. |
Integer number |
cpu |
Emulated CPU types. The default value is kvm64. |
486; kvm32; kvm64; qemu32; qemu64; conroe; haswell; nehalem; opteron_G1/2/3/4/5; penryn; sandybridge; westmere; athlon; core2duo; coreduo; host; pentium; pentium2; pentium3; phenom |
cpuunits |
This is the CPU weight of the VM. This value is used by the kernel fair scheduler. The larger the value is, the more CPU time a VM will get. Note that this value is relative to the weights of all other running VMs in the cluster. The default value is 1000. |
Integer 0 to 500000 |
description |
Notes for VM |
Plain text |
freeze |
Freezes the CPU at startup |
1; 0 |
hostpci(n) |
This option allows a VM direct access to the host hardware. When this option is used, it is not possible to migrate the VM. Caution should be used for this option as it is still in the experimental stage. It is not recommended for a production environment. |
HOSTPCIDEVICE |
hotplug |
Enables hotplug for disk and network devices. The default value is 0. |
1; 0 |
ide(n) |
Allows the volume to be used as an IDE disk or CD-ROM. The n in ide(n) is limited to 0 to 3. |
[volume=]image_name]; [media=cdrom,disk]; [cyls=c,heads=h, secs=s,[trans=t]]; [snapshot=on,off]; [cache=none,writethrough,writeback, unsafe,directsync]; [format=f];[backup=yes|no], [rerror=ignore, report,stop]; [werror=enospc,ignore, report,stop]; [aio=native,threads] |
kvm |
Enables/disables the KVM hardware virtualization. This option disables any hardware acceleration within a VM. A possible usage scenario is when you are setting up a nested virtualized cluster. The default value is 1. |
1; 0 |
lock |
Enables locking/unlocking of a VM. |
backup; migrate; rollback; snapshot |
memory |
Allocated amount of RAM for the VM. |
Integer number from 16 to N |
migration_downtime |
Value in seconds for the maximum tolerated downtime for migration. The default value is 0.1. |
Number 0 to N |
migration_speed |
Value for the maximum speed in MB/s for VM migrations. Set the value to 0 for no limit. The default value is 0. |
Integer number from 0 to N |
name |
Name for the VM. |
Text |
net(n) |
Specified network devices. |
MODEL= e1000, i82551, i82557b, i82559er, ne2k_isa, ne2k_pci, pcnet, rtl8139, virtio |
onboot |
Enables/disables VM auto-start during the host node reboot. |
1; 0 |
sata(n) |
Allows the volume to be used as a SATA disk or CD-ROM. N in sata(n) is limited to 0 to 5. |
[volume=]volume], [media=cdrom, disk]; [cyls=c,heads=h,secs=s,trans=t] [snapshot=on, off]; [cache=none, writethrough, writeback, unsafe, directsync]; [format=f]; [backup=yes, no]; [rerror=ignore, report, top]; [werror=enospc, ignore, report, stop]; [aio=native, threads] |
scsi(n) |
Allows the volume to be used as an SCSI disk or CD-ROM. N in scsi(n) is limited to 0 to 13. |
[volume=volume], [media=cdrom, disk];[cyls=c,heads=h, secs=s,trans=t] [snapshot=on, off]; [cache=none, writethrough, writeback, unsafe, directsync]; [format=f]; [backup=yes, no]; [rerror=ignore, report, stop]; [werror=enospc, ignore, report, stop]; [aio=native, threads] |
scsihw |
SCSI controller type. The default value is lsi. |
lsi; megasas; virtio-scsi-pci |
shares |
This is the value-allocated amount of RAM for autoballooning. The larger this value is, the more RAM the VM will get. The value 0 disables this option. The default value is 1000. |
Integer from 0 to 50000 |
sockets |
Number of CPU sockets. The default value is 1. |
Integer from 1 to N |
startdate |
This option sets the initial date of the real-time clock. |
now | YYYY-MM-DD | YYYY-MM-DDTHH:MM:SS |
startup |
This option sets the behavior for VM startup and shutdown. Order is a positive integer number, which sets the order in which the VMs will start. Shutdown follows the order value in reverse. The delay of startup and shutdown can be set through up and down in seconds. |
[order=+ Int], [up=+ Int], [down=+ Int] |
tablet |
Enables/disables the USB tablet device in a VM. Without this option, if running a lot of console-only VMs on one host, disabling this feature can save context switches. The default value is 1. |
1; 0 |
unused(n) |
Unused volumes in a VM. When a virtual drive is deleted from a VM, the volume does not get deleted instantly. Instead, the status changes to unused:<volume_name>. At a later time, if the volume is needed, it can be reattached to the VM by changing the option to ide(n): | scsi(n): | sata(n):. |
string |
usb(n) |
Enables pass-through direct access to a USB device. N can be set to 0 to 4. When this option is used, it is no longer possible to migrate the VM. |
HOSTUSBDEVICE |
vga |
VM display type |
cirrus | std | vmware | qxl |
virtio(n) |
Allows the volume to be used as a VirtIO disk. The n in virtio(n) is limited to 0 to 15. |
[volume=volume]; [media=cdrom, disk], [cyls=c,heads=h, secs=s,trans=t]; [snapshot=on, off]; [cache=none, writethrough, writeback, unsafe, directsync]; [format=f]; [backup=yes, no]; [rerror=ignore, report, stop]; [werror=enospc, ignore, report, stop]; [aio=native, threads] |