D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] Problem in use of VirtualBox to demonstrate a server based software locally on my machine

 



On 14/05/18 12:18, Eion MacDonald via list wrote:

On 14/05/18 11:51, Martin Gautier wrote:
Using the Virtualbox Manager, open the VM's settings and navigate to the
Network Settings. What do you have there? I tend to set it to attach as
a "Bridged" adaptor. I then log into the the server and edit the network
settings to give it a static IP that matches my subnet - on Ubuntu it's
/etc/network/interfaces (I don't know what it would be for CentOS)

You should then be able to access the web interface for your software
using the IP address you set up. If you want to map this to a hostname,
edit the hosts file on your parent OS (not the VM).

I regret, I do not understand these instructions.
I do not understand the VirtualBox network settings about 'bridged' and
static IP. Is there an example on a website I can read?

  while I can see in the CentOS root account "/etc/hosts" in a text
editor, I really do not know what should be added, or what it looks like
after adding.
I also tried adding it to my Linux Box "etc/hosts" file in OpenSUSE but
to no avail, presumably this is due to the 'bridged adapter' thing?

OK. So some basic concepts:

1. Virtualbox is software that allows you to create stand-alone servers but in software. Imagine a brand new PC (BNPC) with drive and RAM sat on your desk. Now imagine that squished up, magically converted into software and squirted inside your current PC. 2. Once your BNPC is squished into your current PC it becomes a Virtual Machine (VM). When you run that VM using Virtualbox, it's effectively the same BNPC you had on your desk 3. Since your BNPC no longer has a physical network port, it needs to use your current PC's port. You need to tell the VM how you want to do this. For me, "bridged" works best. That means your current PC will pass network traffic to either your host PC or the VM depending on what destination IP address is used in the packets sent to it. 4. Virtualbox comes with two elements, the Manager and the VM. Use the Manager software to change the settings for the VM 5. IP Addresses: All the PCs on your office network will have the same subnet (192.168.1.X or 10.0.0.X) where the last number (X) is a unique number between 1-254. The "ifconfig" command on your host PC will tell you what subnet you're using. Select a high number for the VM (say, 100)

What to do:

1. As above, run the Manager software, select your VM and change the network settings to "bridged"
2. Start your VM - you'll get a terminal window.
3. Login (as you would a normal PC) and edit the CentOS network settings (Google "set static IP on centos")
4. restart the VM
5. On the host PC (or any other PC on your network), point your browser at the IP address of the VM that you have just set in 3


--
The Mailing List for the Devon & Cornwall LUG
https://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/listfaq