adamant-kite-43734
08/17/2024, 1:15 PMbrave-rose-20023
08/17/2024, 4:03 PMip a
command showed the network interface (enp1s0
) as "DOWN".
Solution:
If you delete a network connection in Harvester and recreate it, the VM will receive a new MAC address. Here are two ways to fix this:
1. Update the MAC Address in Harvester:
• Delete and Recreate: Delete the old network and add a new one in the VM's configuration.
• Locate the VM: Navigate to "Harvester > Networks > Network > Show More".
• Replace MAC Address: Replace the MAC address of the new network connection with the original MAC address from the old network (you can find the old MAC address in your DHCP server logs).
• Restart the VM: Start the VM.
2. Update the MAC Address in
• Boot the VM: Boot the affected VM.
• Access the Console: Log in to the VM using the web console.
• Edit Open the /etc/netplan/50-cloud-init.yaml
file.
• Update MAC Address: Locate the match:
section and update the MAC address to the original value.
• Apply Changes: Save the file and run sudo netplan apply
.
Important Notes:
• Backup: Before making any changes, create a backup of the 50-cloud-init.yaml
file.
• MAC Address: Ensure you have the correct original MAC address.
Prevention:
To avoid this issue in the future, consider updating network settings without deleting and recreating the network. You can also take the new MAC address and update your netwok DHCP server, but you will still need to update the 50-cloud-init.yaml
inside the vm with the new MAC address.