So I have a dedicated server, and I'm trying to set it up for easy creation and management of VMs.
I'm not exactly a networking expert, so I've ran into some trouble while configuring the server for allowing the VMs to access internet etc.
So here's what I've done so far:
Fresh CentOS 7. minimal install
Virtualizor install
Changed the eth0 netmask to something else than 255.255.255.255
Now, at this point when I go to the Virtualizor web interface, I see a message like this:
The viifbr0 is not started. Please run service virtnetwork start
and running that command gives me this:
Error: No Gateway Found, Please assign a Gateway.
From what I've read, this means that I have to assign a gateway in /etc/sysconfig/network-scripts/ifcfg-eth0. However, I have no idea what to set it as.
UPDATE:
Well... I discovered that setting the gateway provided by my service provider wasn't what caused the server to become unreachable after all, but installing Virtualizor after that. Not sure what to make of this. I can either set the gateway in the configuration or install Virtualizor, but doing both of those causes the server to become unreachable (by SSH and web interface). So if any level 50 Technomancer reads this, please help.
the gateway is either a bridge or a router's address to the next (sub)network, depending on how you subnetted the virtual machines. so if the lan is 192.168.1.0 and the VMs are 192.168.2.0 then the bridge in the virtual network would be the gateway. you'll need a static route from the 2.0 network to the 1.0 network. or perhaps a nat rule in iptables with net.ipv4.ip_forward set to 1 in the sysctl.conf file
i just run kvm, but i install a second nic in my server and dedicate that to the virtual machines. i use the 2nd nic as an unmanaged bridge (no ip address) to the virtual nics in the virtual machines and use the same subnetting as my standard lan. the gateway is that lan's interface on the router, so every node sees every node on that segment of the network and outbound packets are sent up the road by the router if need be.
there is a lot of info that you can just copy and paste from the kvm website and ubuntu wiki that will show you how to set up networking. i typically delete the default virbr via the command line. you could use the virtual machine manager for kvm as well for a convenient gui. i disable the network manager on the server. actually it's not installed at all. it's a too many cooks in the kitchen thing. all networking seems to be easier through bash, can't stress that enough.
I know absolutely nothing about Virtualizon but I do know a few things about networking. If you are setting the ip address of the server manually, the gateway needs to be the router on your network. This is the "Gateway" to external networks. So for example if you are on a network of 192.168.1.0/24 your gateway would be 192.168.1.1 (if it was setup according to standard practice.) It is also very important to have the correct network mask. You need to make sure you are using the same subnet as the rest of the nodes behind your gateway. So in the example above you would need a subnet of 255.255.255.0. Are you trying to connect to the server from the same network or from an external netowrk? Is this a home setup or something you are running on a larger network at work? DNS servers aren't particularly necessary until you want to get to the internet or access different machines by host name.