Hi all,
On the forum I saw topics about questions how to let Proxmox Cluster use a different network for migration traffic.
Currently for all my clusters I made a code change in the QemuServer.pm to change the listening IP (unfortunately hard-coded) of the migration task.
Currently I have 5 interfaces per hypervisor:
I know this is not the neatest way. Please note that if you update the Proxmox to a newer version, the changes will be lost.
HOW-TO:
If you have any questions, please do not hesitate to contact me.
On the forum I saw topics about questions how to let Proxmox Cluster use a different network for migration traffic.
Currently for all my clusters I made a code change in the QemuServer.pm to change the listening IP (unfortunately hard-coded) of the migration task.
Currently I have 5 interfaces per hypervisor:
- NIC1 and NIC2 (2 x Gigabit Ethernet) are configured in bonding only for public network traffic - no ip address configured - connect to two different gigabit switches.
- NIC3 (1 x Gigabit Ethernet) is configured as management traffic. Only for internal traffic - ip address: 10.0.10.XX - connected to gigabit switch.
- NIC4 and NIC5 (2 x 10Gigabit Ethernet) are configured in bonding only for storage traffic of DRBD, use of NFS etc - ip address: 10.0.7.XX - connected to a 10G switch.
I know this is not the neatest way. Please note that if you update the Proxmox to a newer version, the changes will be lost.
HOW-TO:
[*=1]First check the IP of network you would like to use for the migration network. In my case I use the storage network also for my live migration network (ip: 10.0.7.48 as example).
[*=1]Open the following file in your favourite file editor: /usr/share/perl5/PVE/QemuServer.pm
[*=1]Search in the file for the variable: $migrate_uri
The result will show the following: $migrate_uri = "tcp:${localip}:${migrate_port}";
[*=1]By replacing the "${localip}" with the IP you would like to use, Proxmox will be forced to listen on that ip address everytime he receives a migration request.
The result will be as following after the replacement (in my example with use of ip 10.0.7.48): $migrate_uri = "tcp:10.0.7.48:${migrate_port}";
[*=1]Save the file and make sure it is saved by running the command:
root@hypervisor48:~# cat /usr/share/perl5/PVE/QemuServer.pm | grep migrate_uri
my $migrate_uri;
$migrate_uri = "tcp:10.0.7.48:${migrate_port}";
push @$cmd, '-incoming', $migrate_uri;
print "migration listens on $migrate_uri\n" if $migrate_uri;
[*=1]Restart the pvedaemon on the server by typing the following:
root@hypervisor48:~# service pvedaemon restart
Restarting PVE Daemon: pvedaemon.
[*=1]Do the above steps on every node which are listening on that same network.
[*=1]Test the changes by doing a live migration of a VM. You will see if the changes have worked in the sentence: starting online/live migration on 10.0.7.48ORT
If you have any questions, please do not hesitate to contact me.
Last edited: