Page 1 of 2

[SOLVED] VirtualBox and Network

Posted: 19. Dec 2013, 21:28
by gerwin
Hallo!

I have VirtualBox 4.3.4 on my MacBook Pro 10.8.5

I installed some Linux Guest Systems (mostly Debian) on it.

My intension is to simulate a Linux Network with Oracle Databases on the servers.

I want to access to these OSes from my Mac with the Mac Shell and 'ssh' and 'scp' and Oracle SQL Developer.
And I want to comunicate between these Guest OSes.

At the moment I configured The Network with NAT and Port Forwarding.
But that's not the best way for my needs, as I think.

Apart from that I could not run ssh for the remote access to my Oracle Linux Guest OS.
And I have the problem, that I have to use my Mac offline frequently, because there is no Internet in my home.

What would be the best VirtualBox Network Configuration for my needs?

Thank's for any help!

Gerhard

Re: VirtualBox and Network

Posted: 19. Dec 2013, 21:31
by Perryg
Add a second adapter set to host-only.

Re: VirtualBox and Network

Posted: 19. Dec 2013, 21:43
by gerwin
Hi Perryg!

Thanks for your answer!

I tried it!
But at 'Host-only Adapter' -> 'Name' (Select field), I can only select 'Not selected'.

How can I fix this problem?

Thanks for your help!

Gerhard

Re: VirtualBox and Network

Posted: 19. Dec 2013, 21:56
by Perryg
Open preference -> network and create one. It usually has one by default but some have found it necessary to create it. Below are the default settings if it does not generate it by default.
host-only-1.png
host-only-1.png (25.24 KiB) Viewed 2494 times
host-only-2.png
host-only-2.png (28.41 KiB) Viewed 2494 times

Re: VirtualBox and Network

Posted: 19. Dec 2013, 22:40
by gerwin
Hi Perryg!

Thanks for your help!

I configured my Oracle Linux Guest OS in that way!

When I start it and enter the command 'ifconfig -a' I get

eth0 .....

eth1 .... (which comes from the second adapter)

lo ....

but in eth1 there is no IP, Mask and Broadcast set.

Should I do that manualy and how and how to define the VirtualBox DHCP server?

Thanks for your great help!!!!!

Gerhard

Re: VirtualBox and Network

Posted: 19. Dec 2013, 23:18
by Perryg
Did you put the check mark in the Enable Server box?

Re: VirtualBox and Network

Posted: 19. Dec 2013, 23:29
by gerwin
Hi Perryg!

Where is the 'Enable Server' box?

I put the check mark in the 'Enable Network Adapter'.

Thanks

Gerhard

Re: VirtualBox and Network

Posted: 19. Dec 2013, 23:30
by Perryg
See the bottom screen shot in my post above.

Re: VirtualBox and Network

Posted: 19. Dec 2013, 23:50
by gerwin
Hi Perryg!

I did activate this check box!

Gerhard

Re: VirtualBox and Network

Posted: 19. Dec 2013, 23:56
by gerwin
Hi Perryg!

I tried it on one of my Debian Guest OS and it works fine:

eth0 Link encap:Ethernet HWaddr 08:00:27:38:95:cf
inet addr:10.0.2.15 Bcast:10.0.2.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fe38:95cf/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:56 errors:0 dropped:0 overruns:0 frame:0
TX packets:65 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:9266 (9.0 KiB) TX bytes:10662 (10.4 KiB)

eth1 Link encap:Ethernet HWaddr 08:00:27:a1:32:e4
inet addr:192.168.56.101 Bcast:192.168.56.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fea1:32e4/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2 errors:0 dropped:0 overruns:0 frame:0
TX packets:35 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1180 (1.1 KiB) TX bytes:5990 (5.8 KiB)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:146 errors:0 dropped:0 overruns:0 frame:0
TX packets:146 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:14992 (14.6 KiB) TX bytes:14992 (14.6 KiB)

pan0 Link encap:Ethernet HWaddr e6:ae:b4:f2:2c:9d
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

It looks like it is a problem of my Oracle Linux Guest OS?!

Thanks for your help

Gerhard

Re: VirtualBox and Network

Posted: 20. Dec 2013, 00:00
by Perryg
edit the /etc/udev/rules.d/70-persistent-net.rules or you can delete the rules and Linux will configure it on the next boot

Re: VirtualBox and Network

Posted: 20. Dec 2013, 00:21
by gerwin
Hi Perryg!

Thanks for that advice!

But in my case, it doesn't work.

And I just tried it with CentOS Guest OS.

The same problem.

It seems to be a RedHat Problem?!

Gerhard

Re: VirtualBox and Network

Posted: 20. Dec 2013, 00:56
by Perryg
RedHat shouldn't have an issue I use it all the time.

Post the results of ifconfig -a

Also you do know that you will need to enable the new adapter in the guest?
Does the the guest have a DT or is it a server?

Re: VirtualBox and Network

Posted: 20. Dec 2013, 19:50
by gerwin
Hi Perryg!

How can I put an image into this forum?
(At the moment I can only make a Screenshot of my Centos Guest OS).

I use it as server! I have GUI.

Thanks for your help

Gerhard

I try to post an image.

https://sdthumbs.ui-static.net/thumb/_/ ... height=600

Re: VirtualBox and Network

Posted: 20. Dec 2013, 20:10
by Perryg
Below the reply window you will see Upload attachment.

So the guest sees the adapters but nothing is configured yet so you have no addresses. Since you have a GUI just configure the adapters using the network manager. Setup for dhcp.
You can renew leases using dhclient