Virtualizing 2 servers into 1 VM
Posted: 6. Jul 2017, 04:35
I'm kinda stumped and need some ideas... Maybe I'm wrong in my config or ?
I have 2 servers that were running CentOS linux and ran a few websites and a mysql db. I put them on 1 VM. The 2 servers I put on a single VM have the same gateway/routing table. Host OS is CentOS 7 and so is the VM.
VM Server A
1.1.1.2
VM Server B
1.1.1.3
Gateway:
1.1.1.5
Host OS has 4 NICs.
NIC 1 is a internal IP, not forward facing to the web, connected to a router which then connects to the cable modem.
NIC 2 is enabled but doesnt have an IP assigned, connected to the cable modem
NIC 3 is enabled but doesnt have an IP assigned, connected to the cable modem
VM NIC 2 is mapped to Host NIC 2 and VM NIC 3 is mapped to Host NIC 3 and both set to Bridged Networking.
Once the VM loads up I have VM NIC 2 hard coded to the forward facing IP of 1.1.1.2
Once the VM loads up I have VM NIC 3 hard coded to the forward facing IP of 1.1.1.3
Both have the same default gateway/netmask.
The problem is I cant ping VM NIC 3 from the outside world, but VM NIC 2 I can. If I disable VM NIC 2 then I can hit VM NIC 3. Its a routing issue at the VM CentOS level but I'm at a loss on how to address it.
Basically I wanted to merge 2 servers into 1 VM. Any ideas on how to accomplish / fix this?
I have 2 servers that were running CentOS linux and ran a few websites and a mysql db. I put them on 1 VM. The 2 servers I put on a single VM have the same gateway/routing table. Host OS is CentOS 7 and so is the VM.
VM Server A
1.1.1.2
VM Server B
1.1.1.3
Gateway:
1.1.1.5
Host OS has 4 NICs.
NIC 1 is a internal IP, not forward facing to the web, connected to a router which then connects to the cable modem.
NIC 2 is enabled but doesnt have an IP assigned, connected to the cable modem
NIC 3 is enabled but doesnt have an IP assigned, connected to the cable modem
VM NIC 2 is mapped to Host NIC 2 and VM NIC 3 is mapped to Host NIC 3 and both set to Bridged Networking.
Once the VM loads up I have VM NIC 2 hard coded to the forward facing IP of 1.1.1.2
Once the VM loads up I have VM NIC 3 hard coded to the forward facing IP of 1.1.1.3
Both have the same default gateway/netmask.
The problem is I cant ping VM NIC 3 from the outside world, but VM NIC 2 I can. If I disable VM NIC 2 then I can hit VM NIC 3. Its a routing issue at the VM CentOS level but I'm at a loss on how to address it.
Basically I wanted to merge 2 servers into 1 VM. Any ideas on how to accomplish / fix this?