Running on ESXI but stops after a few minutes.

Started by marcel19, July 08, 2021, 05:57:08 PM

Previous topic - Next topic
I really want to run OPNsense in an ESXI environment as I have a server running 24/7 here.But for some reason the connection keeps dropping out after a few minutes. After a restart of the VM everything works again but unfortunately after a few minutes no internet again.
I have some screenshots added, hopefully someone can help me on why the connection is disconnecting
I use T-Mobile home internet 1000MBIT on Vlan 300.

I don't know if this makes any difference but why does your Virtual Machine show a Compatibility of "Workstation 15" when you say it's running on an ESXi server? FWIW, I run OPNsense on ESXi 6.7 without problems and have done for years, the only difference to your config is that I don't use a VLAN for the WAN connection.
Regards


Bill

it is running in ESXI 7.0 but i already have tried everything to get it to work. but it seems that i doest matter what i choose.
6.5
6.7
6.7u2
7.0
7.0u1
7.0.u2

Everyone keeps getting the same problem. it works for a few minutes. with the right speed 940/940 mbit.
But after a few minutes it is just not working anymore.

As I mentioned earlier, I don't use a VLAN so have you tried it without that? What actual hardware (NICs) do you have in this ESXi  server? Is there anything showing in the logs that may give a hint of what the problem might be?
Regards


Bill

I agree with phoenix. Although configuring a vlan on OPNsense shouldn't cause the disconnect you're describing, I generally prefer to configure the vlan on ESXi and not in the VM.

Likewise, I don't think there's a technical reason not to use multiple vswitches, but for simplicity's sake I usually prefer to run a single vswitch and use port groups to configure your different networks.

Can you confirm you have the os-vmware (VMware tools) package installed in OPNsense? I don't know if the vmx NICs will work without it, so maybe that's a dumb question. Or maybe they do work without it, but they disconnect after a few minutes?

Do you know why it's showing 0.0.0.0 as one of the VM's IP addresses?

Quote from: phoenix on July 08, 2021, 09:11:32 PM
What actual hardware (NICs) do you have in this ESXi  server? Is there anything showing in the logs that may give a hint of what the problem might be?

There is nothing in the log, that is the first thing i checked.
I'm using a Intel nic with 4 Ethernet ports.

Quote from: clarknova on July 08, 2021, 09:59:53 PM
I generally prefer to configure the vlan on ESXi and not in the VM.

Can you confirm you have the os-vmware (VMware tools) package installed in OPNsense?

Do you know why it's showing 0.0.0.0 as one of the VM's IP addresses?

What will be the difference off using a VLAN on ESXI instead of inside OPNsense?

Yes, i had installed the os-vmwarae pkg inside OPNSense

I really can tell you why there is a 0.0.0.0 ip address.

July 08, 2021, 10:26:44 PM #7 Last Edit: July 08, 2021, 10:31:15 PM by clarknova
Quote from: marcel19 on July 08, 2021, 10:06:28 PM
I'm using a Intel nic with 4 Ethernet ports.

In that case you might want a separate vswitch for each NIC, and you can ignore my useless previous comment about just using port groups. :)

Quote from: marcel19 on July 08, 2021, 10:07:50 PM
What will be the difference off using a VLAN on ESXI instead of inside OPNsense?

These are my reasons. They may or may not apply to your use case:

  • If you have multiple VMs sharing a network, you can quickly see which VMs are on the same network by looking at the 'VMs' tab of the network/DPG. On the other hand, if you're using vlan trunks in ESXi and tagging in the VM, then it is no longer obvious from ESXi which VMs are on the same network, since two or more VMs could be on the same trunked DPG but not configured to use the same vlans from within the OS
  • Potentially better network performance by handling the vlans in ESXi. Your host has as many or more CPU cores and physical NICs as any hosted VM, and can distribute bandwidth and interrupts across those hardware resources for potentially higher bandwidth capacity.

That said, there are also advantages to tagging within the VM:

  • IIRC, you can only add 8 or 10 NICs to a VM. With a trunked NIC you can use vlans within the VM to get more
  • Some guest OSes (FreeBSD included) detect NICs in an order that is different than the order assigned in ESXi, and this can lead to confusion and error when you have configured your NICs in a certain order in OPNsense based on the assignments in ESXi, but they are detected in a different order at boot time. By using a trunked NIC in ESXi and vlans in the OS, you avoid this confusion.
  • It's easy to add and remove vlans on the fly in the OS, while adding and removing NICs in ESXi usually requires a reboot in my experience.

I think i got the problem....

I have an Nvidia Shield at home which was set up with a static ip:
192.168.1.10 with a Subnet: 255.255.255.0 and with the gateway: 192.168.1.1.
The DNS server was statically set to 8.8.8.8 and 8.8.4.4.

When I set the Nvidia shield to DHCP, nothing happened and the internet has been working for a few hours now.
I don't understand why this caused the problem. but I'm glad it's resolved.

It sounds like there was an IP address conflict on your network. Could it be that the Shield was using an IP address that was simultaneously in use by another device on the network?

Quote from: clarknova on July 09, 2021, 08:25:55 AM
It sounds like there was an IP address conflict on your network. Could it be that the Shield was using an IP address that was simultaneously in use by another device on the network?

No way, every device in my network that is connected trough a network cable has a static ip between 192.168.1.2 and 192.168.1.100. All the wifi clients are getting a ip address range between 192.168.1.100 and 192.168.1.200.

I have checked again and when i ping now to 192.168.1.10 (shield ip) there is no client connected on that ip at this moment.