Network Connection to Virtual Machine?
Hello,
I am running Ubuntu 11.04 and running Slackware on virtual box, i am unable to connect Slackware to Ubuntu.. Code:
root@darkstar:~# ifconfig how to setup connection between my ubuntu machine and my virtual machine.... Thnx!! |
Quote:
So, in the VirtualBox Manager Gui - for the slackware VM - look at the settings for NETWORK. You will have 4 adapters. On the tab for adapter 1; 1) is it enabled? 2) Under "Attaached to" what type of network have you got? NAT/Bridged/Internal etc. ? 3) Click the Advanced button - is "Cable Connected" checked? 4) The "Adapter type" could be your problem - if the one that is selected is not supported "out of the box" by slackware. What sort of "virtual networking" do you want? In other words - what do you want the Ubuntu host to be able to do (if anything) with the slackware VM? Maybe you don't want the slackware VM to be able to "get into" or "see" anything in the Ubuntu host? OR Maybe you want the slackware VM to see ONLY the Ubuntu host and not get out to the outside world? There are all sorts of combinations. The default suits a lot of situations and that is NAT. https://www.virtualbox.org/manual/ch06.html Chapter 6 of the virtualBox manual discusses the many networking options. There is also a log of what was setup at runtime on the VM --> right click on the name of the VM in the VirtualBox Manager Gui - you should see the choice of "Show Log". The window that opens will have a log "tab" for each execution/run of the VM. The most recent run being the current tab. You could save the log and post it here. It may help. Dave |
Hi,
I had the same problem when I installed Mint 12 in Virtualbox with Mint 11 hosting. Here's what I did to solve that problem. Power off your guest and select settings (you can't change settings with the virtual machine running or saved in the machine state). Under Network, Adapter 1, check "Enable Network Adapter." It was set to "NAT" by default (and didn't work). Under "Attached To," I changed it to "Bridged Adapter." This bridged my guest's (Mint 12) network interface to the host's (Mint 11) internet connection. That fixed it. |
When machine is powerd off then in tab 1 it shows enabled and NAT is selected....
but whn machine boots up that enabled check is no more there.... Im using default NAT And adpater is Intel Pro 1000MT.... ---------- Post added 11-18-11 at 02:29 AM ---------- Quote:
|
Quote:
how to configure it to connect to host... the blue screen at the bottom shows that it is connected to the host...but i can't ping... i tried to configure using netconfig but i couldn't succeed... |
Quote:
Because you want to test a host application from your guest. Then NAT will not be the ideal solution. Vbox has something perfectly suited to what you want. BTW did you read the chapter 6?. First - CHANGE YOUR NETWORK ADAPTER TYPE from "Intel Pro 1000MT" to something a lot simpler - I suggest PCnet-PCI II (Am79C970A) BECAUSE - (and it's only a guess) slackware may not support the more advance gigabit adapter. Start with the "lowest common denominator first" is a good adage. The Am79C970A is much older - and therefore more likely to be supported by older distros. From Chapter 6 --- Quote:
You know you can RIGHT click the little blue screen icon at the bottom of your VM encompassing window - the one for networks - and then you can change SOME things - while your VM is running - like you can connect/disconnect the cable. Just like you can in real life. There is a "mini dhcp server" built in to the VM when you run it with NAT (it is turned off for bridged networking -- coz it assumes you will either use a static IP or you have a DHCP server somewhere on your REAL network. AGAIN - from chapter 6 Quote:
Your VM machine's address will be 10.0.2.x - where x >3 (address 10.0.2.3 is reserved for a virtual tftp server - in case you wanted to network/PXE boot your os) The address of your host from inside the VM will be 10.0.2.2 So, if you had a webserver running on your host at port 80 then to access it from within your VM you would use http://10.0.2.2:80. When your VM is running with NAT it is insulated from the outside world and from your host. This is why it is the default (and safest). You can "get to it" by using the "port mapping" facility. BUT NOT WITH A STANDARD PING. However, as suggested by other contributers - you may want to use BRIDGED rather than NAT for reasons outlined in chapter 6 of the virtualbox manual. Some people would setup a new/development server - e.g. sql server or web server in a VM and test that way. One could even setup a "suite of machines" clients and servers in a group of VM's - all of which can "see each other" in their own private network. I STRONGLY urge you to read chapter 6 of the virtualbox manual. Dave If I have helped - can you "click my rep" and indicate that I have done so. |
Quote:
:) now i can set up server on host and test on guest... |
All times are GMT -5. The time now is 08:01 AM. |