Fix network connectivity issue in a Linux virtual machine after changing a network adapter

3 users found this article helpful

This article is created to provide you with a workaround for the issue when there is no network connection in a Linux virtual machine (VM) upon updating network mode. If Parallels Tools are not installed on the Linux virtual machine (VM), external networks might become unavailable inside the VM after changing the attachment mode of the virtual network adapter (Shared/Bridged/Host-only). The issue is caused by newer Linux versions not requesting a new DHCP lease after switching the attachment mode.

Workaround

To address this issue, please follow these steps:

1. Determine the carrier-wait-timeout configuration on your Linux VM by opening the terminal and executing the following command:

cat /etc/NetworkManager/NetworkManager.conf | grep -i carrier

Note: the `carrier-wait-timeout` parameter refers to the amount of time that NetworkManager waits for the carrier signal to be detected on a network interface before considering it disconnected. If the above command does not return a result (e.g., `carrier-wait-timeout=10`), assume the timeout period is set to the default value of 5 seconds.

2. While your VM is running, click ActionsShut down and open the configuration settings of the VM and navigate to Hardware > Network > Disconnected.

4. Wait for the number of seconds determined as your carrier-wait-timeout value after disconnecting your virtual network adapter.

Note: The default timeout period is 5 seconds.

5. Click on the "Source" dropdown and select your preferred network attachment mode between Shared, Bridged, and Host-only.

Was this article helpful?

Tell us how we can improve it.