View previous topic :: View next topic |
Author |
Message |
zambizzi Guru
Joined: 28 Aug 2004 Posts: 581 Location: Boise Idaho
|
Posted: Tue Nov 01, 2005 7:18 am Post subject: vmware - app on host, database on vm |
|
|
I'm trying to do something a little out of the ordinary...only out of necessity.
I emerged vmware 5.0 (latest in portage as of today) and got it working great. I'm forced to use MS SQL Server 2000 at work to build applications on top of (Java).
I'd like to be able to develop (netbeans) on Linux and make my apps communicate w/ the sql server database on one of the vmware machines (windows 2000 server vm).
I'm using NAT as that's all I've gotten to work for networking on the VMs and also becasue I'm rather clueless when it comes to networking details.
I noticed my router is reporting *that* particular VM as a separate IP address (dhcp)....but I can't get the application to connect.
I'd rather not have to develop on the VM....I'd like to only have to use it for testing...how can I get this working?
Thanks!
-v |
|
Back to top |
|
|
dgaffuri Advocate
Joined: 05 Jun 2005 Posts: 2078 Location: Italy
|
Posted: Tue Nov 01, 2005 12:11 pm Post subject: |
|
|
I don't see any problem in doing this. Are you able to ping the windows vm? Are you running any firewall? You may want to post ifconfig and netstat -rn output, together with the IP address of the vm connection. _________________ Adopt an unanswered post
If you feel that your problem has been solved please edit the top post and add [solved] to the subject |
|
Back to top |
|
|
zambizzi Guru
Joined: 28 Aug 2004 Posts: 581 Location: Boise Idaho
|
Posted: Tue Nov 01, 2005 2:16 pm Post subject: |
|
|
dgaffuri wrote: | I don't see any problem in doing this. Are you able to ping the windows vm? Are you running any firewall? You may want to post ifconfig and netstat -rn output, together with the IP address of the vm connection. |
No, not able to ping it or resolve the vm by name...here's netstat and ifconfig output:
Code: |
Destination Gateway Genmask Flags MSS Window irtt Iface
172.16.177.0 0.0.0.0 255.255.255.0 U 0 0 0 vmnet3
192.168.71.0 0.0.0.0 255.255.255.0 U 0 0 0 vmnet8
172.16.35.0 0.0.0.0 255.255.255.0 U 0 0 0 vmnet4
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
172.16.250.0 0.0.0.0 255.255.255.0 U 0 0 0 vmnet1
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 eth1
|
Code: |
eth1 Link encap:Ethernet HWaddr 00:0C:F1:5C:95:F5
inet addr:192.168.1.101 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST NOTRAILERS RUNNING MULTICAST MTU:1500 Metric:1
RX packets:423 errors:0 dropped:0 overruns:0 frame:0
TX packets:461 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:298296 (291.3 Kb) TX bytes:93207 (91.0 Kb)
Interrupt:5 Base address:0x2000 Memory:fafef000-fafeffff
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:64 errors:0 dropped:0 overruns:0 frame:0
TX packets:64 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:4057 (3.9 Kb) TX bytes:4057 (3.9 Kb)
vmnet1 Link encap:Ethernet HWaddr 00:50:56:C0:00:01
inet addr:172.16.250.1 Bcast:172.16.250.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:14 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
vmnet3 Link encap:Ethernet HWaddr 00:50:56:C0:00:03
inet addr:172.16.177.1 Bcast:172.16.177.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:14 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
vmnet4 Link encap:Ethernet HWaddr 00:50:56:C0:00:04
inet addr:172.16.35.1 Bcast:172.16.35.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:14 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
vmnet8 Link encap:Ethernet HWaddr 00:50:56:C0:00:08
inet addr:192.168.71.1 Bcast:192.168.71.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:14 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
|
eth1 is a wifi connection. I'm not running a firewall anywhere (software or hardware) so I doubt there's an issue there. I'm only running one vm but I'm sure all of the other stuff you see there is on account of me enabling all different types of networking for VMs, not just NAT.
When I look at the DHCP clients table on my router, the vm actually shows up by name and has a separate IP:
Code: |
rebxppc 192.168.1.103 00:0C:29:3E:0B:50 02:21:25
reb2kspc 192.168.1.104 00:0C:29:47:8A:9E 16:58:34
|
The first is Gentoo, the second is the vm. However I have problems pinging it:
Code: |
PING 192.168.1.104 (192.168.1.104) 56(84) bytes of data.
From 192.168.1.101 icmp_seq=2 Destination Host Unreachable
From 192.168.1.101 icmp_seq=3 Destination Host Unreachable
From 192.168.1.101 icmp_seq=4 Destination Host Unreachable
From 192.168.1.101 icmp_seq=6 Destination Host Unreachable
From 192.168.1.101 icmp_seq=7 Destination Host Unreachable
From 192.168.1.101 icmp_seq=8 Destination Host Unreachable
--- 192.168.1.104 ping statistics ---
10 packets transmitted, 0 received, +6 errors, 100% packet loss, time 9000ms
, pipe 3
|
Just out of sheer ignorance I ran nmap against my machine's IP to see if port 1433 was open (ms sql default) and it's not there. I'm not sure what else to do. I need this for debugging or else I wouldn't even bother.
Obviously the vm is *somewhat* visible but things just aren't lining up...and this is beyond my breadth of knowledge.
Thanks! |
|
Back to top |
|
|
dgaffuri Advocate
Joined: 05 Jun 2005 Posts: 2078 Location: Italy
|
Posted: Tue Nov 01, 2005 3:10 pm Post subject: |
|
|
If you're using NAT your vm shouldn't have an address from your router, but from vmware instead, using one of the vmnet subnets. Try to run ipconfig in windows to look at the assigned IP address. _________________ Adopt an unanswered post
If you feel that your problem has been solved please edit the top post and add [solved] to the subject |
|
Back to top |
|
|
zambizzi Guru
Joined: 28 Aug 2004 Posts: 581 Location: Boise Idaho
|
Posted: Tue Nov 01, 2005 3:55 pm Post subject: |
|
|
OK, before we proceed w/ that, here's what I did.
I changed NAT to bridged networking...the vm then acquired its own IP address from my router. I ran nmap on that IP and found that 1433 was then open (after installing sp4 for sql server.)
So, I ran my app on the host (Gentoo) and it worked! It works great, too...the performance is (perceptably) about the same...so I'm pleased w/ that.
However, the vm is unable to get on the internet. I can't ping anything outside of my local network or get anything in a browser. ipconfig reveals that it has an IP on the network and should be fine. What's the deal there? |
|
Back to top |
|
|
dgaffuri Advocate
Joined: 05 Jun 2005 Posts: 2078 Location: Italy
|
Posted: Tue Nov 01, 2005 10:15 pm Post subject: |
|
|
Are you able to ping by address outside of the network? May you post ipconfig /all output from your vm? _________________ Adopt an unanswered post
If you feel that your problem has been solved please edit the top post and add [solved] to the subject |
|
Back to top |
|
|
zambizzi Guru
Joined: 28 Aug 2004 Posts: 581 Location: Boise Idaho
|
Posted: Tue Nov 01, 2005 10:31 pm Post subject: |
|
|
No, I can't ping anything from the vm except the host PC...I can't ping the router or any other PC on the network and I cannot ping anything on the internet.
Here it is:
Code: |
Windows 2000 IP Configuration
Host Name . . . . . . . . . . . . : reb2kspc
Primary DNS Suffix . . . . . . . :
Node Type . . . . . . . . . . . . : Broadcast
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No
Ethernet adapter Local Area Connection:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : VMware Accelerated AMD PCNet Adapter
Physical Address. . . . . . . . . : 00-0C-29-47-8A-9E
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
IP Address. . . . . . . . . . . . : 192.168.1.104
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.1.1
DHCP Server . . . . . . . . . . . : 192.168.1.1
DNS Servers . . . . . . . . . . . : 24.116.39.12
24.116.0.202
24.116.212.232
Lease Obtained. . . . . . . . . . : Tuesday, November 01, 2005 3:23:40 P
M
Lease Expires . . . . . . . . . . : Wednesday, November 02, 2005 3:23:40
PM
|
|
|
Back to top |
|
|
brot Guru
Joined: 06 Apr 2004 Posts: 322
|
Posted: Tue Nov 01, 2005 10:31 pm Post subject: ... |
|
|
I know that it is possible to do something like that. I ran a gameserver on my windows xp and connected via the wine emulated game. Sounds funny, but worked great
My vm has a bridged network, bridged to the card in the pc that is plugged in the switch. I gave a IP to the vm, and right after that, was able to ping my vm. So try it with a bridged nic, and a given ip adress (in the same subnet)... |
|
Back to top |
|
|
zambizzi Guru
Joined: 28 Aug 2004 Posts: 581 Location: Boise Idaho
|
Posted: Tue Nov 01, 2005 10:58 pm Post subject: |
|
|
Yeah, if you read above...I did do that and my app can now use the sql server on the vm as a backend just fine. However, w/ bridged networking (rather than NAT) - the vm can no longer hit the internet - even though it has its own IP.
It'd be nice to have my cake and eat it too - to have bridged allow the vm to talk to the 'net. It would be annoying to switch back-and-forth to NAT/bridged to have one or the other. |
|
Back to top |
|
|
brot Guru
Joined: 06 Apr 2004 Posts: 322
|
Posted: Wed Nov 02, 2005 1:29 pm Post subject: |
|
|
Well, that is possible, too. Sorry, that i didnt point it out
Is the vmware interface bridged to the interface linux gets its net ? |
|
Back to top |
|
|
|