[PVE-User] how to migrate vm's from a almost dead proxmox node?
Lutz Willek
l.willek at science-computing.de
Sat May 11 15:06:17 CEST 2013
works great Fabrizio, thanks!
short howto:
1. halt the vm
> ssh root at vm816 "halt"
--> halt the node, if halting the vm is not possible
2. mv the config file (here from pm3 to pm1)
> root at pm1:/etc/pve# mv ./nodes/pm3/qemu-server/816.conf ./nodes/pm1/qemu-server/
2a: if mv not possible: You don't have a quorum in your cluster (no HA)
> mv: Verschieben von „./nodes/pm3/qemu-server/816.conf“ nach „./nodes/pm1/qemu-server/816.conf“ nicht möglich: Keine Berechtigung
-->Set the expected votes to 1, so that a standalone machine have a
"faked" quorum:
> root at pm1:/etc/pve# pvecm e 1
After set the expected votes to 1 you should be able to mv the
configfiles (Step 2)
3. Start the vm on the surviving node:
> root at pm1:/etc/pve# qm list
> VMID NAME STATUS MEM(MB) BOOTDISK(GB) PID
> 816 xxxxxxxxxxxxxx stopped 128 0.00 0
> root at pm1:/etc/pve# qm start 816
> root at pm1:/etc/pve# qm list
> VMID NAME STATUS MEM(MB) BOOTDISK(GB) PID
> 816 xxxxxxxxxxxxxx running 128 0.00 621497
done :)
thanks!
Freundliche Grüße / Best Regards
Lutz Willek
Am 11.05.2013 13:46, schrieb Fabrizio Cuseo:
> IF your disk images are all on the NFS storage, you only need to copy the VM configuration files in /etc/pve/qemu-server/*.conf from the dead server to the alive server AFTER powering down all the VMs (offline operation).
>
> This is valid for KVM VMs... i don't know for containers (that I don't use).
>
> Good luck, Fabrizio
>
>
> ----- Messaggio originale -----
>> Hey there,
>>
>> I'm responsible for a Proxmox-cluster consisting of two nodes and
>> around
>> 20 virtual machines, shared storage comes via NFS, but no HA. The
>> nodes
>> are starting from a embedded usb 4GB ATP module: no local hard disks.
>>
>> The filesystem of one node became corrupted because the embedded ATP
>> stick failed (i/o errors), the filesystem is mounted read-only now.
>> The
>> virtual machines still running fine on this node, i am able to login
>> via
>> ssh or via the web interface.
>>
>> I want to move the vm's to the other node now, but this is not
>> possible
>> (^= readonly fs):
>>
>>> root at pm3:~# grep 'clusternode ' /etc/pve/cluster.conf
>>> <clusternode name="pm1" votes="1" nodeid="1"/>
>>> <clusternode name="pm3" votes="1" nodeid="3"/>
>>> root at pm3:~#
>>> root at pm3:~# LANG=C qm migrate 816 pm1 --online
>>> unable to create output file
>>> '/var/log/pve/tasks/D/UPID:pm3:00023A0C:1ADAE768:518E1E9D:qmigrate:816:root at pam:'
>>> - Read-only file system
>>> root at pm3:~# LANG=C qm stop 816
>>> unable to create output file
>>> '/var/log/pve/tasks/0/UPID:pm3:00023A8D:1ADB20BE:518E1F30:qmstop:816:root at pam:'
>>> - Read-only file system
>>
>> I need to find a way to (online or offline) migrate the virtual
>> machines
>> to the other node.
>>
>> I thought to remove the broken node from the cluster and then startup
>> the virtual machine by hand on the surviving cluster, similar to this
>> post:
>> http://forum.proxmox.com/threads/8017-Migrate-CT-from-dead-cluster-node
>>
>> Any hints?
--
Vorstandsvorsitzender/Chairman of the board of management:
Gerd-Lothar Leonhart
Vorstand/Board of Management:
Dr. Bernd Finkbeiner, Michael Heinrichs,
Dr. Arno Steitz, Dr. Ingrid Zech
Vorsitzender des Aufsichtsrats/
Chairman of the Supervisory Board:
Philippe Miltin
Sitz/Registered Office: Tuebingen
Registergericht/Registration Court: Stuttgart
Registernummer/Commercial Register No.: HRB 382196
More information about the pve-user
mailing list