Vmware Server and CentOS 64-bit
zimsters
01-02-2009, 11:49
ok - i've added a few commands in /etc/rc.local:
- the ip add command to add the 2nd IP of the box
- the ip route command x 2 to route both the IPs
i am now able to ping both ips, and can ping out of the box.
now the weird part: domains still don't open, nor ping. when i run a dns query, it says that both nameservers are missing. BUT, if i ping the nameservers, both ping fine - no problems there.
any clue what the issue could be? it was working yesterday and i was pretty much running the same commands manually to get the server back up, and websites would load up...
freshwire
01-02-2009, 08:38
1. Put command in /etc/rc.local to run on boot up
2. add on command on interface-up.
zimsters
01-02-2009, 01:41
hey guys,
can you please help me out? everything works fine when i follow the instruction in this thread, but the moment i reboot the network is out again. does not ping anywhere etc. i need to re-add the ip route command and restart the network, and only then it works.
bit of a pain since the client on the VPS gets disconnected permanently until i intervene every time they reboot.
how can i troubleshoot? any help?
Its the same thing really but the windows equivalent, unfortunately i havent done it with windows or i would be able to help you better.
raidensnake
26-11-2008, 02:01
shame you can't explain how to do this on windows host to windows guest and windows host to linux guest. I still can't get mine to work.
The route to the gateway is on the guest, and its the same ip as the 'static route' to vmnet1 on the host.
Originally Posted by
derchris
there are 2 routes,
one inside the vm, the defaullt route through eth0
and one for the vmnet interface on the host itself.
read my post above
derchris
26-11-2008, 01:00
Originally Posted by
xrcode
Actually you do need to add the gateway on the vm
theres a static route on the host, not the vm
there are 2 routes,
one inside the vm, the defaullt route through eth0
and one for the vmnet interface on the host itself.
Thanks alot guys I got it to work...
Thanks for your replay, but are the in steps 2, 3 and 4 are the same IP?
Yes, i wanted to make sure you didnt have it set to the failover ip because it would cause an error.
So to recap things, You have:
1. Enabled Arp proxying
2. Added a static route to your VM on your host.
ip route add dev vmnet1
3. On your VM, add the failover ip to eth0
ip addr add /32 dev eth0
4. Set your default gateway on the VM.
route add default via dev eth0
5. edit /etc/resolv.conf inside the VM to use appropriate DNS servers.
vi /etc/resolve.conf
nameserver
nameserver
Well i hope this helps.
you mean this?
inet addr:192.168.0.1 Bcast:192.168.0.255 Mask:255.255.255.0
or the FailOver - IP?
What is the IP address of vmnet1 in the host? i think i know your problem.
Thanks for your efforts guys, I've been trying these settings the whole night without
success..
So I had some questions in my mind, I thought it might help me getting this to
work..
So to make sure..
What is the and ?
is it the main server IP and Hostname or vmnet1 IP?
The FailOver IP in the VPS "ifcfg-eth0" should be the same FailOver IP of vmnet1 or
different IP?
the IP in this command "ip route add default via " should be the
same FailOver IP of vmnet1 IP?
Thanks again
Actually you do need to add the gateway on the vm
theres a static route on the host, not the vm
derchris
24-11-2008, 23:50
the gateway is not needed, as you have a static route.
i just went through that a while ago. i did it with debian cent and fedora, basically all the same.
DuncanBain
24-11-2008, 20:52
Originally Posted by
xrcode
Hope so Things like this always seems hit and miss for me
DuncanBain
24-11-2008, 20:41
Ok, when creating the Centos VMachines, did you make sure you had selected 'Host-Only Networking'? If not, edit the virtual machines and change it. On the Centos box, change the network conf files to as shown below:
/etc/sysconfig/network-scripts/ifcfg-eth0
# Intel Corporation 82573L Gigabit Ethernet Controller
DEVICE=eth0
BOOTPROTO=static
IPADDR=
NETMASK=255.255.255.255
ONBOOT=yes
/etc/sysconfig/network
NETWORKING=yes
HOSTNAME=
GATEWAY=
/etc/resolv.conf
nameserver 213.186.33.99
do /etc/init.d/network restart
then (obviously filling in the X's): ip route add default via 9x.xxx.xxx.114
Should hopefully work, but can't try it out due to not having a vmware box available right now.
This is ifcfg-eth0
Code:
# Intel Corporation 82545EM Gigabit Ethernet Controller (Copper)
DEVICE=eth0
BOOTPROTO=dhcp
HWADDR=xxxxxxxxxx
ONBOOT=yes
please help me with step by step guide as Im new to the servers world..
DuncanBain
24-11-2008, 20:12
Originally Posted by
xrcode
Now that i think about it, another thing i had to do was install bind on the host and edit /etc/resolv.conf on the vm to use the hosts ip as DNS server.
I just use the ones that were configured on the host system via ovh, works fine.
Now that i think about it, another thing i had to do was install bind on the host and edit /etc/resolv.conf on the vm to use the hosts ip as DNS server.
Sure, I'll be right back..
DuncanBain
24-11-2008, 19:26
Could you post the contents of /etc/sysconfig/network-scripts/ifcfg-eth0 from the Centos vm please?
Hmmm, sorry if i told you to do the wrong thing, i only did it once on my machine, but i did get it working.
Try,
ip route add default via dev eth0
ps. to assign 4 ips you would just repeat the process 4 times
I've tried it, but I still can't get it to work yet..
First I ran "echo "net.ipv4.conf.vmnet1.proxy_arp=1" >> /etc/sysctl.conf && sysctl -p" from the debian,
then I ran "ip route add 9x.xxx.xxx.114 dev vmnet1"
everything seems to work fine until, I tried to run
"ip route add default via 9x.xxx.xxx.114" from the root of my CentOS VPS..
But I get this error, "rtnetlink answers: network is unreachable"
So have I done something wrong?
by the way how can I assign the 4 dedicated IPs to one VPS?
I appreciate your help xrcode thanks again..
Thanks to you, I will try it tonight, thanks again
Failover ip is your extra ip, that you will be assigning to the VM. I hope what ive said makes sense to you, it took me a few hours to figure out how to make it work too.
Thanks alot mate, by the way, the failover is the main server IP? or is it the extra ip?
Actually I seems to need more detailed guide, so please try to make step by step guide for all the ppl who couldn't manage to do that.
Thanks again
I had the same problem, I will post here how i resolved it.
First you need to enable arp proxying on the host.
echo "net.ipv4.conf.vmnet1.proxy_arp=1" >> /etc/sysctl.conf && sysctl -p
Now it will allow you to use the failover ips, but you must select host-only networking.
Then you must add a route to the failover ip from the host
ip route add dev vmnet1
Oh yes and the VM uses its own failover ip for the gateway.
So from the VM do
ip route add default via
With that done, you should be able to add the failover ips to the VM successfully.
Hi there,
I have a dedicated server with 8x Xeon 2.0Ghz from OVH, which has Debian 32bit installed on it with Vmware server 1.0.8.
So I've created 3 VPS each of them has CentOS 64-bit installed on it, but I don't know how to make them connect to the internet and to be accessed from the web..
by the way I have extra IPs, and I want to assign 4 IPs to each VPS.
Please help me out with these issues, as I've been trying to make this work for the past 10 days..