Launch the Virtual Machine

About this task

Perform the following steps to successfully launch a virtual machine. To launch a VM:

Procedure

  1. Log into the Proxmox server using secure shell (SSH).
  2. Edit the virtual machine configuration file using the following details:

    The virtual machine configuration file is located under /etc/pve/nodes/<KVM_hostname>/qemu-server/<VM_ID>.conf, where KVM_hostname is the name of the server and VM_ID is the virtual machine ID number configured in Step 4.

    Edit the VM configuration file to add the following two lines to add serial port and watchdog functionality:
    args: -chardev socket,id=serial0,port=<console_port_number>,host=0.0.0.0,server,nowait,telnet -device isa-serial,chardev=serial0
    watchdog: i6300esb

    The serial port is added and configured for network access on a network port specified in the <console_port_number>.

    VE6120K Small Proxmox VM configuration file (e.g. <VM_ID>.conf) sample:
    # cat /etc/pve/nodes/KVMSERVER/qemu-server/102.conf
    agent: 1,freeze-fs-on-backup=0
    args: -chardev socket,id=serial0,port=56028,host=0.0.0.0,server,nowait,telnet -device isa-serial,chardev=serial0
    balloon: 0
    boot: order=scsi0
    cores: 4
    cpu: host
    hotplug: usb
    memory: 8192
    name: VE6120K
    net0: e1000=BA:44:BE:F7:AA:08,bridge=vmbr0
    net1: virtio=E2:55:A7:86:0D:FF,bridge=vmbr1,queues=2
    net2: virtio=52:AA:44:EB:DC:A0,bridge=vmbr2,queues=2
    numa: 0
    ostype: l26
    scsi0: plain-storage:102/vm-102-disk-0.raw,cache=writeback,size=80G,ssd=1
    scsihw: virtio-scsi-pci
    smbios1: uuid=7a25ec0b-0d9f-4fde-9fe4-821afa5f396f
    sockets: 1
    vga: none
    vmgenid: 8013433b-e9ed-4249-9604-2c5ebf0a4b74
    vmstatestorage: data2
    watchdog: i6300esb
    
    VE6125K XLarge Proxmox VM configuration file sample:
    # cat /etc/pve/nodes/KVMSERVER/qemu-server/100.conf
    agent: 1,freeze-fs-on-backup=0
    args: -chardev socket,id=serial0,port=56030,host=0.0.0.0,server,nowait,telnet -device isa-serial,chardev=serial0
    balloon: 0
    boot: order=scsi0
    cores: 20
    cpu: host
    hotplug: usb
    memory: 32768
    name: VE6125K
    net0: e1000=4E:FD:02:4C:C5:19,bridge=vmbr0
    net1: virtio=2A:39:7A:E0:8E:92,bridge=vmbr1,queues=4
    net2: virtio=56:5D:4A:16:63:AF,bridge=vmbr2,queues=4
    numa: 0
    ostype: l26
    scsi0: data2:vm-100-disk-0,cache=writeback,size=250G,ssd=1
    scsihw: virtio-scsi-pci
    smbios1: uuid=07cd719c-fc03-4d3d-ae36-4a612ebf21cf
    sockets: 1
    vga: none
    vmgenid: 42f181ea-8ffe-4d9b-ac0b-1f45ddb07698
    vmstatestorage: data2
    watchdog: i6300esb
    
  3. Upload the obtained deployment image (VE6120K-*.raw.xz or VE6125K-*.raw.xz) to the KVM server.
  4. Uncompress the deployment image over the VM disk image.
    Depending on the selected or configured storage type, it could be a plain disk image file, a LVM storage, or a similar storage option.

    Use the following example to find the image location:

    qm showcmd <VM_ID> --pretty | grep \\-drive
    # qm showcmd 105 --pretty | grep \\-drive
      -drive 'file=/dev/data2/vm-105-disk-0,if=none,id=drive-scsi0,cache=writeback,format=raw,aio=threads,detect-zeroes=on' \
    
    # qm showcmd 102 --pretty | grep \\-drive
      -drive 'file=/storage/images/102/vm-102-disk-0.raw,if=none,id=drive-scsi0,cache=writeback,format=raw,aio=threads,detect-zeroe\
    
    Use the following commands to populate the disk locations from the previously mentioned examples:
    xz -dc VE6125K-06.01.01.0001.raw.xz | dd of=/dev/data2/vm-100-disk-0 bs=1M status=progress
    xz -dc VE6120K-06.01.01.0001.raw.xz > /storage/images/102/vm-102-disk-0.raw

    The VM is ready to launch.

  5. On the Proxmox UI, select VM > Start to launch the VM.