March 26th, 2013 by Gia
[email protected]:~# pveversion -v
pve-manager: 2.3-13 (pve-manager/2.3/7946f1f1)
running kernel: 2.6.32-19-pve
proxmox-ve-2.6.32: 2.3-93
pve-kernel-2.6.32-16-pve: 2.6.32-82
pve-kernel-2.6.32-19-pve: 2.6.32-93
lvm2: 2.02.95-1pve2
clvm: 2.02.95-1pve2
corosync-pve: 1.4.4-4
openais-pve: 1.1.4-2
libqb: 0.10.1-2
redhat-cluster-pve: 3.1.93-2
resource-agents-pve: 3.9.2-3
fence-agents-pve: 3.1.9-1
pve-cluster: 1.0-36
qemu-server: 2.3-18
pve-firmware: 1.0-21
libpve-common-perl: 1.0-49
libpve-access-control: 1.0-26
libpve-storage-perl: 2.3-6
vncterm: 1.0-3
vzctl: 4.0-1pve2
vzprocps: 2.0.11-2
vzquota: 3.1-1
pve-qemu-kvm: 1.4-8
ksm-control-daemon: 1.1-1
[email protected]:~#

Change VMID from 902 to 202
Proxmox 01

  1. Stop/Shutdown a VM.
  2. Login using SSH to Proxmox Machine or using Shell menu in Web Interface.
  3. Rename image directory name and image filename.
    [email protected]:/# cd /var/lib/vz/images/
    [email protected]:/var/lib/vz/images# ls
    101  102  201  902
    [email protected]:/var/lib/vz/images# mv 902 202
    [email protected]:/var/lib/vz/images# cd 202
    [email protected]:/var/lib/vz/images/202# ls
    vm-902-disk-1.qcow2
    [email protected]:/var/lib/vz/images/202# mv vm-902-disk-1.qcow2 vm-202-disk-1.qcow2
    [email protected]:/var/lib/vz/images/202# ls
    vm-202-disk-1.qcow2
  4. Rename configuration filename
    [email protected]:/etc/pve/nodes/PROXMOX01# cd /etc/pve/nodes/PROXMOX01/qemu-server/
    [email protected]:/etc/pve/nodes/PROXMOX01/qemu-server# ls
    101.conf  102.conf  201.conf  902.conf
    [email protected]:/etc/pve/nodes/PROXMOX01/qemu-server# mv 902.conf 202.conf
    [email protected]:/etc/pve/nodes/PROXMOX01/qemu-server#
  5. Edit configuration filename
    [email protected]:/etc/pve/nodes/PROXMOX01/qemu-server# vi 202.conf

    202.conf :

    boot: cdn
    bootdisk: ide0
    cores: 1
    ide0: local:902/vm-902-disk-1.qcow2,size=10G
    ide2: local:iso/CentOS-6.4-x86_64-minimal.iso,media=cdrom,size=350546K
    memory: 1024
    name: FMIVDLWEB02
    net0: e1000=CA:16:F5:91:8E:AF,bridge=vmbr0
    net1: e1000=26:75:3B:B8:31:01,bridge=vmbr1
    ostype: l26
    sockets: 1

    change line 4 with :

    ide0: local:202/vm-202-disk-1.qcow2,size=10G
  6. Result
    Proxmox 02

Comments

comments

Tags:
Posted in Proxmox | 2 Comments »
2 Responses to “Change VMID (KVM) in Proxmox 2.3”
xfiles says:

Thanx!

Gia says:

You are welcome