Bobcares

“No Gateway Found, Please Assign a Gateway” Error in Virtualizor

by | Feb 24, 2025

Learn how to correct the “No Gateway Found, Please Assign a Gateway” error in Virtualizor. Our Virtualizor Support team is here to help you with your questions and concerns.

“No Gateway Found, Please Assign a Gateway” Error in Virtualizor

When setting up a virtual machine (VM) or configuring a network in Virtualizor, we are likely to run into the following error:

"No Gateway Found, Please Assign a Gateway" Error in VirtualizorNo Gateway Found, Please assign a Gateway

This error indicates that Virtualizor cannot locate or assign a gateway IP address, often due to misconfigured network settings.

The most common causes of this error include:

  • Missing GATEWAY definition in the network interface configuration.
  • Incorrect network interface settings.
  • Undefined network parameters.

Solution

  1. First, find the name of the network interface by running:

    ip link

  2. Then, locate the configuration file for the network interface.

    For example:

    cat /etc/sysconfig/network-scripts/ifcfg-enp4s0

    The configuration might look something like this:


    DEVICE=enp4s0
    ONBOOT=yes
    BOOTPROTO=none
    IPADDR=xx.yyy.uu.eee
    PREFIX=32
    SCOPE="peer xx.yyy.uu.eee"
    DEFROUTE=yes
    IPV6INIT=yes
    IPV6ADDR=tttt:rrr:uuu:bbbb::x/nn
    IPV6_DEFAULTGW=jjjj::1
    IPV6_DEFROUTE=yes
    IPV6_DEFAULTDEV=enp4s0

  3. Next, retrieve the gateway IP address used by the server:

    ip route

    Example output:

    default via xx.yyy.uu.eee dev enp4s0
    xx.yyy.uu.eee dev enp4s0 proto kernel scope link src xx.yyy.uu.eee

    From this output, the gateway IP is xx.yyy.uu.eee.

  4. Then, edit the network interface configuration file:

    vi /etc/sysconfig/network-scripts/ifcfg-enp4s0

    Find the line starting with `IPADDR=`, and add the following line beneath it:

    GATEWAY=xx.yyy.uu.eee

  5. After saving the changes, restart the Virtualizor network services:

    service virtnetwork start

    We will see an output indicating a successful restart:


    Bringing up viifbr0 - OK
    Waiting for 10 seconds...1...2...3...4...5...6...7...8...9...10
    Internet connectivity check successful viifbr0 - OK

Alternate Solution 1: Updating Network Files

Ensure the correct network details are present in these files:

  • CentOS: `/etc/sysconfig/network-scripts/ifcfg-servers-interface-name`
  • Ubuntu: `/etc/network/interfaces`

CentOS configuration example:


IPADDR=xx.y.n.jj
PREFIX=24 or NETMASK=hhh.ggg.kkk.u
GATEWAY=xx.y.n.jj

Here is an Ubuntu configuration example:


address xx.y.n.jj
netmask xx.y.n.jj
gateway xx.y.n.jj

Alternate Solution 2: Using Virtualizor’s universal.php File

If we prefer not to modify network files directly, we can update the gateway in Virtualizor’s universal configuration file:

vi /usr/local/virtualizor/universal.php

Then, add or update the following lines:


$globals['ipadd'] = 'xx.y.n.jj';
$globals['netmask'] = 'hhh.ggg.kkk.u';
$globals['gateway'] = 'xx.y.n.jj';
$globals['ip6add'] = '';
$globals['gateway6'] = '';

After that, restart the network services:

service virtnetwork start

How to Configure Bridge Settings

If we have an existing bridge (like `xenbr1`), ensure it is correctly mentioned in Virtualizor:

  1. Go to Configuration > Slave settings > Paravirtualization Bridge and HVM Bridge.
  2. Set the correct bridge name (e.g., `viifbr0`).

After making these changes, confirm the network is working by testing VM connectivity and checking Virtualizor’s network status.

[Need assistance with a different issue? Our team is available 24/7.]

Conclusion

With the above steps, we can resolve the “No Gateway Found” error in Virtualizor and restore proper network functionality for our VMs.

In brief, our Support Experts demonstrated how to correct the “No Gateway Found, Please Assign a Gateway” error in Virtualizor.

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.

Privacy Preference Center

Necessary

Necessary cookies help make a website usable by enabling basic functions like page navigation and access to secure areas of the website. The website cannot function properly without these cookies.

PHPSESSID - Preserves user session state across page requests.

gdpr[consent_types] - Used to store user consents.

gdpr[allowed_cookies] - Used to store user allowed cookies.

PHPSESSID, gdpr[consent_types], gdpr[allowed_cookies]
PHPSESSID
WHMCSpKDlPzh2chML

Statistics

Statistic cookies help website owners to understand how visitors interact with websites by collecting and reporting information anonymously.

_ga - Preserves user session state across page requests.

_gat - Used by Google Analytics to throttle request rate

_gid - Registers a unique ID that is used to generate statistical data on how you use the website.

smartlookCookie - Used to collect user device and location information of the site visitors to improve the websites User Experience.

_ga, _gat, _gid
_ga, _gat, _gid
smartlookCookie
_clck, _clsk, CLID, ANONCHK, MR, MUID, SM

Marketing

Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.

IDE - Used by Google DoubleClick to register and report the website user's actions after viewing or clicking one of the advertiser's ads with the purpose of measuring the efficacy of an ad and to present targeted ads to the user.

test_cookie - Used to check if the user's browser supports cookies.

1P_JAR - Google cookie. These cookies are used to collect website statistics and track conversion rates.

NID - Registers a unique ID that identifies a returning user's device. The ID is used for serving ads that are most relevant to the user.

DV - Google ad personalisation

_reb2bgeo - The visitor's geographical location

_reb2bloaded - Whether or not the script loaded for the visitor

_reb2bref - The referring URL for the visit

_reb2bsessionID - The visitor's RB2B session ID

_reb2buid - The visitor's RB2B user ID

IDE, test_cookie, 1P_JAR, NID, DV, NID
IDE, test_cookie
1P_JAR, NID, DV
NID
hblid
_reb2bgeo, _reb2bloaded, _reb2bref, _reb2bsessionID, _reb2buid

Security

These are essential site cookies, used by the google reCAPTCHA. These cookies use an unique identifier to verify if a visitor is human or a bot.

SID, APISID, HSID, NID, PREF
SID, APISID, HSID, NID, PREF