Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 1 | |
| 2 | Running Toaster in VirtualBox |
| 3 | ============================= |
| 4 | |
| 5 | Toaster is launched via the command in VM: |
| 6 | |
| 7 | $ source toaster start webport=<IPADDR:PORT> |
| 8 | |
| 9 | The interaction with Toaster web server is done via a host internet |
| 10 | browser. |
| 11 | The particular steps depend on the actual networking being used |
| 12 | by the VirtualBox. |
| 13 | |
| 14 | |
| 15 | Bridged Network |
| 16 | =============== |
| 17 | |
| 18 | Find out your VM network IP address: |
| 19 | |
| 20 | $ ifconfig |
| 21 | |
| 22 | IP address is listed under eth0 inet addr. |
| 23 | It should be something like: |
| 24 | inet addr:192.168.1.18 |
| 25 | |
| 26 | Launch the Toaster web server in VM: |
| 27 | |
| 28 | $ source toaster start webport=192.168.1.18:8000 |
| 29 | |
| 30 | Interact with the Toaster web server with your host browser using URL: |
| 31 | |
| 32 | http://192.168.1.18:8000 |
| 33 | |
| 34 | |
| 35 | NAT Network |
| 36 | =========== |
| 37 | Find out your VM network IP address: |
| 38 | |
| 39 | $ ifconfig |
| 40 | |
| 41 | IP address is listed under eth0 inet addr. |
| 42 | For NAT network it should be something like: |
| 43 | inet addr:10.0.2.15 |
| 44 | |
| 45 | When using NAT network, the VM web server can be accessed using |
| 46 | Port Forwarding. |
| 47 | |
| 48 | Using the VirtualBox GUI, navigate to: |
| 49 | Settings->Network->Adapter1 |
| 50 | |
| 51 | You should set: |
| 52 | Attached to: NAT |
| 53 | |
| 54 | Select "Advanced", click on "Port Forwarding" |
| 55 | |
| 56 | This will open a new dialog box "Port Forwarding Rules". |
| 57 | Create a new rule that looks like this: |
| 58 | |
| 59 | | Name | Protocol | Host IP | Host Port | Guest IP | Guest Port | |
| 60 | +-------+----------+---------+-----------+----------+------------+ |
| 61 | | Rule1 | TCP | | 8000 | | 8000 | |
| 62 | ------------------------------------------------------------------ |
| 63 | |
| 64 | Now we can launch the Toaster web server in VM: |
| 65 | |
| 66 | $ source toaster start webport=10.0.2.15:8000 |
| 67 | |
| 68 | Interact with the Toaster web server with your host browser using URL: |
| 69 | |
| 70 | http://127.0.0.1:8000 |
| 71 | |
| 72 | |
| 73 | |
| 74 | |
| 75 | |
| 76 | |
| 77 | |
| 78 | |