Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • NAT - One VM appears to be connected to its own network with a NAT router simulated on the host real machine. The Client programs on the VM can access the Yale network and internetInternet, but neither the host computer cannot nor the other VMs can talk to it that VM except through mapped ports. Unfortunately, if you expose a port to the Host computer you also expose it to the whole Yale network because it becomes a real port on the host computerports mapped from the VM to the host computer. If you map ports, they become visible to the outside world.
  • NAT Network - Several VMs are connected to a private network with a NAT router simulated on the host real machine. Like the previous configuration, except in this case the VMs can talk to each other as if they were real computers on a real network, but the host computer still can't talk to them.
  • Bridge - All the VMs appear to be directly connected to the real network to which the host computer is connected. At Yale, that means that every VM has to be assigned its own IP address from Data Network Operations. Since that address is real, no other developer can use the same set of addresses for his Sandbox machines. This also exposes the VMs to the outside world (at least the Yale network). This option is useless for a sandbox.
  • Host-Only Adapter - First, this creates a virtual LAN adapter on the host computer (you get a dialog box on Windows asking you to install a new device). Then logically it connects this simulated LAN adapter to a Private Network to which all the VMs are connected. Typically you assign a static address like 192.168.137.1 to the host computer and then other static addresses like 192.168.137.10 to each VM. VirtualBox does not provide any DHCP or NAT router function, so if this is all you do then the VMs cannot talk to the Yale network or Internet.private network is isolated from the real network.

Now for Sandbox requirements: The VMs have to be able to communicate with each other just like real machines, so they can test various clustering options. The VMs have to access servers in the Yale Network (SVN for example to update or commit source changes). You probably want to For security, other machines must not be able to communicate from access the VMs. It is useful, but not an absolute requirement, for the host computer to the VMs, to open a browser and test the application. However, you do not want computers other than the host to access the VMs and it is convenient if the VMs are always configured the same on all hosts.No one configuration option on one LAN adapter handles all these requirements, but you can configure two LAN adapters with different options that provide everything you need and nothing you do not wantbe able to connect to port 8080 (JBoss) on the VM.

It is possible to meet all these requirements with a Host-Only adapter and an exotic system configuration or third party software on the host computer. However, the simplest solution is to recognize that while one virtual LAN adapter cannot do all these things, two different adapters can provide complete coverage.

One adapter uses a simple "NAT" connection to give the VM client only (no mapped ports) VM clients access to the Yale network (SVN) and to the Internet (the Centos software update sites). If you do not configure any Mapped Ports, then this LAN can only be used for client outbound connections from the VMYou map no ports, so this provides only outbound service.

The other adapter is a Host-Only Adapter that creates a simulated Private Network that connects the VMs to each other and to the Host computer. The host and VMs use 192.168.*.* addresses to talk to each other just like real computers connected to a regular network. The host can open a browser to talk to CAS, and two VMs can simulate data exchange for cluster fail over. The VMs cannot use this to access any other machinecomputer and VMs have full access to each other as if they were all real machines on a local home network, and no other machine sees this network and any of its addressescan get to them.

NAT is an automatic service that is part of VirtualBox and requires no configuration. However, a Host-Only network has to be set up before any VM can use it. In the VirtualBox management console (that lists the installed virtual machines). Click File - Preferences - Network. Select the Host-only Networks tab. If no network is listed, click the Add (plus) button to create one. It will be called "VirtualBox Host-Only Ethernet Adapter" and when you create it you have to let your real laptop operating system add a new device. If you double click the now listed adapter, you can set its IPv4 Address to 192.168.137.1 and the Network mask to 255.255.255.0. It does not need a DHCP server because static addresses are configured in the VMs.The Sandbox VM comes configured with two LAN adapters. The distribution format 255.255.255.0. It does not need a DHCP server because static addresses are configured in the VMs.

The Sandbox VM comes configured with two virtual LAN adapters (NAT and Host-Only). The Sandbox OS is configured with three adapters (NAT and two alternate versions of Host-Only). It uses the NAT adapter to get to the outside world. You configure one of two Ethernet hardware (MAC) addresses with the VirtualBox console, and which hardware address comes up tells the Sandbox if it is the vm-ssoboxapp-01 host with private IP address 192.168.137.10 or the "-02" host with IP address ending in ".11".

The open format distribution file (the *.ova file that you install to get the Sandbox VM) the Sandbox VM with) sort of knows that there are supposed to be two virtual LAN adapters and it sort of knows that one of them is supposed to connect to the be NAT and one is to be Host-Only adapter and one is going to use the NAT service, but that depends on VirtualBox mapping information from what is supposed to be an open file format to two rather specific VirtualBox features. The first time you do this, you need to check that the two LAN adapters actually get connected correctly. There is an obvious conflict between an "open format" file that can be read by VirtualBox or VMware and configuration options like "Host-Only" that may be a VirtualBox technical term that other vendors name differently. So when you install the *.ova file, VirtualBox displays the proposed hardware configuration and gives you a chance to explicitly connect any dangling configuration items to specific local chocices. For example, if you did not follow the previous instructions and did not create the Host-Only adapter on the host computer, then there would be no Host-Only adapter to connect the Sandbox VM to, and then one of the two LAN adapters is left in an unclear state. Virtual hardware such as LAN adapters can be configured two LAN adapters is left with nothing it can connect to. If you do not fix the configuration problem at the start of the *.ova file import process, or you can reconfigure them in the VirtualBox management console installation, you can always fix it later before you start the VM. Select the Sandbox VM and click Settings - Network. Adapter 1 should be "Attached to" Host-only Adapter and Adapter 2 should be attached to NAT.

If you need to simulate a second VM, clone the Sandbox computer (as explained below) and then in the clone configuration you leave Adapter 1 attached to the same Host-only Adapter but now you expose the Advanced options and change the MAC Address to be one larger (change AD at the end to AE).

...