OPNsense Forum

Archive => 21.1 Legacy Series => Topic started by: marcel19 on July 08, 2021, 05:57:08 PM

Title: Running on ESXI but stops after a few minutes.
Post by: marcel19 on July 08, 2021, 05:57:08 PM
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.
Title: Re: Running on ESXI but stops after a few minutes.
Post by: phoenix on July 08, 2021, 06:12:20 PM
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.
Title: Re: Running on ESXI but stops after a few minutes.
Post by: marcel19 on July 08, 2021, 07:37:50 PM
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.
Title: Re: Running on ESXI but stops after a few minutes.
Post by: phoenix on July 08, 2021, 09:11:32 PM
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?
Title: Re: Running on ESXI but stops after a few minutes.
Post by: clarknova on July 08, 2021, 09:59:53 PM
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?
Title: Re: Running on ESXI but stops after a few minutes.
Post by: marcel19 on July 08, 2021, 10:06:28 PM
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.
Title: Re: Running on ESXI but stops after a few minutes.
Post by: marcel19 on July 08, 2021, 10:07:50 PM
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.
Title: Re: Running on ESXI but stops after a few minutes.
Post by: clarknova on July 08, 2021, 10:26:44 PM
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:

That said, there are also advantages to tagging within the VM:
Title: Re: Running on ESXI but stops after a few minutes.
Post by: marcel19 on July 09, 2021, 08:12:49 AM
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.
Title: Re: Running on ESXI but stops after a few minutes.
Post by: 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?
Title: Re: Running on ESXI but stops after a few minutes.
Post by: marcel19 on July 09, 2021, 08:30:51 AM
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.