If VMs are located in different clusters that are physically the same network segment, MAC address clashes can occur. This happens because the machines are assigned the same MAC address but different IP addresses.
To avoid clashes, specify a MAC address generation pattern for the machines in the cluster.
Solution
There are potential risks involved in altering a database. We do not recommend making manual edits to the database, as it can disrupt the correct operation of the platform.
Create a backup of the platform before performing any actions with the database.
To change the MAC address generation pattern for VMs, edit the value of the mgr_reserve_mac_bytes parameter in the database in the vm_settings table:
- Connect to the server with the platform via SSH.
-
Generate a random value for the mgr_reserve_mac_bytes parameter with the command:
printf '%02X\n' $[RANDOM%256]
-
Connect to the database:
docker exec -it mysql bash -c "mysql isp -p\$MYSQL_ROOT_PASSWORD"
-
Check the current value of the mgr_reserve_mac_bytes parameter in the vm_settings table:
select value from vm_settings where name='mgr_reserve_mac_bytes';
output examplevalue: A4 1 row in set (0.00 sec)
In the example shown, the value of the mgr_reserve_mac_bytes parameter = A4.
-
Replace the value of the mgr_reserve_mac_bytes parameter in the vm_settings table:
update vm_settings set value='new_value' where name='mgr_reserve_mac_bytes';
Comment -
Exit the DBMS console:
\quit
After that, the VMs will be assigned MAC addresses according to the new template. To check the MAC address assignment, create a test VM.