VMware Networking Community
Cosz3
Enthusiast
Enthusiast

vm can not configure static IP when it network card in DPortGroup (a virtual distributed switch portgroup)

Hello,

I have a two ESXi hosts, they are both configured with a virtual distributed switch (called nsx-network)

0CA66CEC-1AF0-47E2-8DA1-9BC49AAFA120.jpg

I setup a CentOS7 vm (nsx-vm) connected with DPortGroup network.

4D431EDB-9568-4644-97E2-227168EA38B0.jpg

Then I login the vm (nsx-vm). I try to configure a static IP for it.

22B20899-7548-46F6-A029-C37EC32A4164.jpg

In ifcfg-eno16780032 configure file, I wrote the configuration like below:

B8DB9089-62A9-4A81-90AC-AC21BBBBC003.jpg

Then I reboot the server, and check the static IP, but it not configuration.

22B20899-7548-46F6-A029-C37EC32A4164.jpg

When I run ifup, CentOS report error to me:

5FDBCC9C-2E28-4D32-A731-570ABE7A0898.jpg

So the vm network card ,in distributed port group, can not be configured with static IP ?? or is there something I configured wrong here?

Could anyone help? please guide me a bit. Thanks in advance.

0 Kudos
6 Replies
Sreec
VMware Employee
VMware Employee

Can you remove the existing NIC and add a new nic and fill below specs and start the network service or simply reboot the machine . Error has nothing to do with dvswitch.

DEVICE="eth0"

BOOTPROTO="static"

HWADDR=""

IPADDR=

NETMASK=

GATEWAY=

NM_CONTROLLED="yes"

DNS=

ONBOOT="yes"

TYPE="Ethernet"

UUID=""

Cheers,
Sree | VCIX-5X| VCAP-5X| VExpert 7x|Cisco Certified Specialist
Please KUDO helpful posts and mark the thread as solved if answered
Cosz3
Enthusiast
Enthusiast

Hello Sreec,

Thank you for your timely reply.

I am sorry for late reply, I am still searching where the problem is.

I found that the error was disappeared, when I power off and power on the vm again.

925983A3-DAEE-442A-9371-F0D82207AAC4.jpg

I login the vm I found the configured IP is there. However, when I use the vms (in the same distribute port group) to ping each other, they can not reach each other.

I noticed the topology here, even the vms are powered on, they are seems not connected with the virtual Distributed switch.  

A1110E43-97FD-45E1-86EA-A80F3D7AB36C.jpg

as you can see, the link of router-vm is down there. but the VMware-NSX-Manager does not show anything here.

0BEE67EA-FB86-4BCC-A83F-461F8761DBE4.jpg

1775E13E-13D5-43C7-A981-7CDAFFEEF696.jpg

Why is that happened? should I change any configuration of Virtual Distributed Switch or is it related with physical network card? Please Help. Thank you.

0 Kudos
Sreec
VMware Employee
VMware Employee

Link Down can happen usually when VM Network adapter is not connected to the portgroup irrespective VM is powered on/off . Can you double check -> edit settings of VM's Network Adapter Connected is checked (Try disconnecting and reconnecting it once) , also you can check the distributed switch PORT tab and select the respective port and refresh it once.

Cheers,
Sree | VCIX-5X| VCAP-5X| VExpert 7x|Cisco Certified Specialist
Please KUDO helpful posts and mark the thread as solved if answered
Cosz3
Enthusiast
Enthusiast

Hello Sreec,

Thanks your help,

I did what you suggested, but the links are still down.

0BAAF077DFF454EDC33942BF13D11682.png

QQ20171215-0.png

I checked the network adapter, they are connected.

59614A14-0C26-44AA-86BC-E557B666DCF3.jpg

I also change different network adapter from vmxnet to E1000, some of them will throw inactivate errors, when I login to the vm.

Could be this problem related to physical network card connection (the uplink physical network card is connected with a VLAN trunk port on a switch).

0 Kudos
Sreec
VMware Employee
VMware Employee

Status should be green even if there is no uplink attached . Can you switch the VM network adapater to a vSwitch PortGroup and check the status ?

Cheers,
Sree | VCIX-5X| VCAP-5X| VExpert 7x|Cisco Certified Specialist
Please KUDO helpful posts and mark the thread as solved if answered
benjamin000
Enthusiast
Enthusiast

I have the exact same issue configuring my dev environment with the new NSX 6.4.0.

The VM eth stays down and rebooting does not help however powering off then on fixes the problem.

Not a solution for his issue but for those wondering better to completely power off then on again if you ever have VMs that have their interfaces not coming up.

Regards Ben McGuire
0 Kudos