[SOLVED] Openvz container live migration from cli

liska_

Member
Nov 19, 2013
115
3
18
Hi,
as I can not login to gui for few days on either server (no HA) I would like to try migrate containers to second node and reboot first one. I was searching on this forum but I am unable to find proper command. I have just found that I should use pvectl insted of vzmigrate but I have not found on forum or man pages any hint, how to live migrate containers. They are stored on nfs shared storage.

Thanks a lot for any advice.
 
Last edited:
hi just type
"man pvectl" and scroll down, you'll find this section:

pvectl migrate <vmid> <target> [OPTIONS]

Migrate the container to another node. Creates a new migration task.

<vmid> integer (1 - N)

The (unique) ID of the VM.

<target> string

Target node.

-online boolean

Use online/live migration.
 
Ah, i was looking at vzctl insted of pvectl, my mistake.
Now I have all containers migrated, but there were problem with some nfs stat. I had to manually start two containers after migration with command pvectl start id.

Mar 25 11:16:55 Error: undump failed: No such file or directory
Mar 25 11:16:55 Restoring failed:
Mar 25 11:16:55 Error: rst_open_file: failed to lookup path '/tmp/.nfs000000000004fc6100002282': -2
Mar 25 11:16:55 Error: can't open file /tmp/.nfs000000000004fc6100002282
Mar 25 11:16:55 Error: rst_file: -2 99184
Mar 25 11:16:55 Error: rst_files: -2
Mar 25 11:16:55 Error: make_baby: -2
Mar 25 11:16:55 Error: rst_clone_children
Mar 25 11:16:55 Error: make_baby: -2
Mar 25 11:16:55 Error: rst_clone_children
Mar 25 11:16:55 Error: make_baby: -2
Mar 25 11:16:55 Error: rst_clone_children
Mar 25 11:16:55 Container is unmounted
Mar 25 11:16:55 ERROR: online migrate failure - Failed to restore container: Container start failed
Mar 25 11:16:55 start final cleanup
Mar 25 11:16:55 ERROR: migration finished with problems (duration 00:00:39)
migration problems
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!