Menü Schließen

Proxmox VE 5.x LVM Thin – virtuelle Maschine Live Migration

Proxmox VE Logo

Folgende Schritte sind diesem vorausgegangen und dienen nun der Live Migration einer virtuellen Maschine mit KVM von einem Node zum anderen im Cluster. Die VM wurde zuvor auf ein LVM Thin erstellt.

Ziel ist es nun eine virtuelle Maschine im Livebetrieb von einem Node auf den anderen zu verschieben. Dabei wird das Image von einem Node auf den anderen kopiert ohne das der Betrieb des laufenden Systems beeinträchtig wird.

Proxmox VE 5.x VM Live Migration per Befehl

Hinweis: Eine eingelegte CD/DVD/ISO sollte zuvor entfernt werden, da die Migration diese nicht mit nimmt und fehl schlägt.

Hinweis: Sollten Snapshots existieren, so ist eine Migration ebenfalls nicht möglich. ( can’t migrate local disk ‘LVM-Thin-Storage:vm-100-disk-1’: non-migratable snapshot exists)

Als Befehl wird hierfür der Befehl qm migrate verwendet. Die Syntax sieht dann wie folgt aus:

  • # qm migrate <vmid> <target> [OPTIONS]
    • Migrate virtual machine. Creates a new migration task.
  • <vmid>: <integer> (1 – N)
    • The (unique) ID of the VM.
  • <target>: <string>
    • Target node.
  • –force <boolean>
    • Allow to migrate VMs which use local devices. Only root may use this option.
  • –migration_network <string>
    • CIDR of the (sub) network that is used for migration.
  • –migration_type <insecure | secure>
    • Migration traffic is encrypted using an SSH tunnel by default. On secure, completely private networks this can be disabled to increase performance.
  • –online <boolean>
    • Use online/live migration.
  • –targetstorage <string>
    • Default target storage.
  • –with-local-disks <boolean>
    • Enable live storage migration for local disk

Ein Beispiel:

  • für die VM mit der ID=100
  • die auf Node1 läuft
  • die auf Node1 in einem LVM Thin Storage liegt
  • und zu Node 2, das ebenso ein LVM Thin Storage besietzt,
  • migriert werden soll:

# qm migrate 100 node2 –with-local-disks 1 –online

# qm migrate 100 node2 --with-local-disks --online 2018-09-28 11:43:48 starting migration of VM 100 to node 'node2' (xxx.xxx.xxx.xxx) 2018-09-28 11:43:48 found local disk 'LVM-Thin-Storage:vm-100-disk-1' (in current VM config) 2018-09-28 11:43:48 copying disk images Using default stripesize 64.00 KiB. Logical volume "vm-100-disk-1" created. 983040+0 records in 983040+0 records out 64424509440 bytes (64 GB, 60 GiB) copied, 814.46 s, 79.1 MB/s 1431+3460165 records in 1431+3460165 records out 64424509440 bytes (64 GB, 60 GiB) copied, 818.477 s, 78.7 MB/s Logical volume "vm-100-disk-1" successfully removed 2018-09-28 11:57:29 migration finished successfully (duration 00:13:42)

Proxmox VE 5.x VM Live Migration per WebGUI

Eine weitere und komfortablere Möglichkeit bietet die WebGUI. Nachfolgend die notwendigen Schritte:

  • die entsprechende VM auswählen
  • rechts im Menü auf “Migration” klicken

    Proxmox VE VM Migration
    Proxmox VE VM Migration
  • nun den Zielknoten auswählen und auf den Button “Migration” klicken

    Proxmox VE VM Migration GUI
    Proxmox VE VM Migration GUI

Leider scheint das über die WebGUI mit LVM Thin nicht möglich zu sein:

can't migrate local disk 'LVM-Thin-Storage:vm-100-disk-1': can't live migrate attached local disks without with-local-disks option

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert