The causes of network problems in virtual machines are not infrastructure problems; more often they are caused by other errors in the network configuration in the virtual machine. The most common of them are:
1. There is no access to the default gateway.
The availability of the default gateway is checked on the virtual machine using the ping command.
To do this, run the command line in Windows by pressing the key combination win + r and in the window that appears, type cmd and press enter or click OK
Type the ping command and specify the IP address of the gateway from the settings of the network adapter.
The figure shows that the default gateway is not available. So it is specified incorrectly.
Correct IP address of the default gateway can be found in vCloudDirector section Networking -> Networks.
Specify ip address in networking settings
Check the availability of a correctly configured gateway using the Ping command
2. Incorrectly configured IP address.
A network problem may occur after cloning a virtual machine. It can save the IP address of initial virtual machine and thus on the same network there will be two identical IP addresses assigned to different virtual machines.
In vCloudDirector, you need to check the IP addresses of all virtual machines. While using OS Windows, the actions should be as follows:
They must be unique. If so, then we take the virtual machine out of operation.
Then it is necessary to make a recastomization, for this step we select the corresponding item in the menu.
Let's analyze the case with the nix-based OS - the Centos7 system:
1. At the command prompt, type ifconfig. Information on configuring the VM network interface will be displayed.
If this virtual machine was cloned from a different one, you need to check the network interface settings of the source virtual machine in the same way.
1. If there is a match, you need to change the IP address to the second VM
2. You can change ip address with the ifconfig ens160 ip address command, where ens160 is the name of the interface, ip address - is free ip address from your network.
3. Restart the network with the command # /etc/init.d/network restart.
4. There is another way to find out if there are matching IP addresses on the network. Using arp request.
The output will be a list of available arp entries in the form of mac addresses and the IP addresses assigned to them. If there are two identical IP addresses on the network, this will be visible in the table.
3. The network adapter of the virtual machine is turned off
If it’s not turned on then the network will not work on the VM. You need to check and apply the changes.
Have you tried Virtual cloud servers by Cloud4Y? Not yet?
Leave a request and get a 10-day free trial.