FreeBSD in VMWare box

Greg Larkin glarkin at FreeBSD.org
Sat Nov 22 21:36:28 PST 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Pieter Donche wrote:
> On Sat, 22 Nov 2008, Glen Barber wrote:
> 
>> On Sat, Nov 22, 2008 at 8:43 AM, Pieter Donche
>> <Pieter.Donche at ua.ac.be> wrote:
>>> On Sat, 22 Nov 2008, Glen Barber wrote:
>>>
>>>>> The PC with WMware is connect to internet. Should one configure
>>>>> Ethernet then. If yes, what static IP parameters must one enter??
>>>>
>>>> This would be contingent on how you have networking set up.  Do you
>>>> have NAT or Bridged only?  If NAT, use rc.conf with the inet address
>>>> of your choice and the netmask for your NAT.
>>>
>>> My PC is connected to Internet using an ADSL modem to connect to an ISP.
>>> It uses IP 10.0.0.somevalue, netmask 255.255.255.0, no gateway specified
>>> and two DNS server IP addresses which my ISP asked to use.
>>>
>>> Is this 'NAT' or 'Bridged'.
>>>
>>
>> You'd have to tell me; it's your VM. Check the network settings in the
>> management interface.
> 
> (I previously installed an openSUSE 10.3 VM, and needed not enter any
> TCP/IP parameter, and could use netwerking afterwards)
> 
> The default settings of my VMware are (from Edit / Virtual Network Editor)
> 
> Summary
> Virt. Network - Summary - Subnet - DHCP
> VMnet0 (Bridged) - Bridged to an automatically choosen adapter - -
> VMnet1 (Host-only) - A private nw shared with the host - 192.168.72.0 -
> Enabled
> VMnet8 (NAT) - Used to share the host's IP address - 192.168.173.0 -
> Enabled
> 
> Automatic Bridging
> CHECKED: AUtomatically choose an available physical netwerk adapter to
> bridge to VMnet0
> 
> Host Virtual Netwerk Mapping
> VMnet0    Brigded to an automatically chosen adapter
>     (here I can also select my physical network card)
> VMnet1 VMware Network Adapter VMnet1 (only choice)
> VMnet2 (and 3 to 7 and 9): Not bridged
>     (here I can also select my physical network card)
> VMnet8 VMware Network Adapter VMnet8 (only choice)
> 
> Host Virtual Adapters
> Network Adpater                  Virt.Nw   Status
> VMware Network Adapter VMnet1     VMnet1   Enabled
> VMware Network Adapter VMnet8     VMnet8   Enabled
> 
> DHCP
> Virtual Network    Subnet    Netmask    Description
> VMnet1    192.168.72.0    255.255.255.0  vmnet1
> VMnet8    192.168.137.0    255.255.255.0  vmnet8
> 
> NAT
> VMnet host:  VMnet8
> Gateway IP address  : 192.168.137.2   [ grey ]
> Netmask:              255.255.255.0   [ grey ]
> Nat Service
>  Service Status: Started
>  Service request: [ empty ]
> 
>>> Can I enter values and then what values, for host, domain, IPV4 gateway,
>>> Name server, IPV4 address, netmask in the screen presented during
>>> FreeBSD
>>> install
>>> or should i use Cancel in that screen and make changes in system
>>> files (and
>>> what changes in what system files)?
>>>

Hi Pieter,

In order to get outbound Internet access for a VM, add a network adapter
device to it and assign it to VMnet8 (NAT).  Within your VM, as noted by
another person that replied to this thread, set your network interface
for DHCP in /etc/rc.conf like so:

ifconfig_em0="DHCP"

I use e1000 network devices, so my network interface is "em0" - yours
may be different.

When the VM boots, it queries VMnet8's DHCP server for an IP address,
gateway and DNS servers.  These will likely be the same as those on your
host machine.

The VM will have outbound Internet access, but will only be able to
provide services to your host machine.  If you want the VM to provide
services to the outside world, you can bind its network interface to
VMnet1 (Bridged) instead of VMnet8, and it will receive a public IP
address, assuming your ISP has allocated additional ones to you.
Otherwise, you may be able to configure your router to use your single
public IP address and port forward inbound connections to your VM.

Hope that helps,
Greg
- --
Greg Larkin

http://www.FreeBSD.org/       - The Power To Serve
http://www.sourcehosting.net/ - Ready. Set. Code.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJKOvd0sRouByUApARAt7JAJ4lNM6MI+eV1S9Oizjz1Ad040Kf6gCguVlI
Iko16BDE1ZgD82hp5PGwo0s=
=kONl
-----END PGP SIGNATURE-----



More information about the freebsd-questions mailing list