macOS Configuration Guide
EE4717 / IM4717 WEB APPLICATION DESIGN
Prerequisite
- You should have VirtualBox installed and opened.
- You should have just imported the
.ova
virtual machine file provided by the school.
Setup Steps
#1 - Create a new Host-only Network Adapter
- Click on File → Host Network Manager... from the menu bar.
- Click on the Create button.
- Click on the Properties button.
- Click on the IPv4 Network Mask field. (To make sure that the IPv4 value is not reverted)
- Click on Apply to confirm.
- Click on Close.
#2 - Add SMB Port Forwarding
- Click on the virtual machine that you have just imported.
- Click on the Settings button.
- Click on the Network button.
- Under Adapter 1, click on the text Advanced.
- Click on the Port Forwarding button.
- Click on the Green Plus Icon button.
- Click on the OK button twice to save and close Settings.
- Start your virtual machine.
- Your web server should be live at http://192.168.56.2 and http://192.168.56.2:20000.
- If you are unable to load the page at http://192.168.56.2, please change the Host Port of
web
from80
to8080
andsmb
from445
to4450
. Your web server url is now http://192.168.56.2:8080.
#3 - Set up the executable for the folder mapping
- Create a new text file named
map_osx.txt
using your favourite text or code editor.
- Paste in the following code.
#TODO: Update the 'x' in user based on the second number of tutorial group. #Example, if your tutorial group is F311, then your user should be f31ee. user="f3xee" #DO NOT CHANGE ANYTHING BELOW UNLESS YOU KNOW WHAT YOU ARE DOING folder="$user-shortcut" cwd="`dirname \"$0\"`" if [ -d "$cwd/$folder" ] then umount $cwd/$folder rm -r $cwd/$folder else mkdir $cwd/$folder mount_smbfs //$user:$user@192.168.56.2/$user $cwd/$folder fi osascript -e 'tell application "Terminal" to quit' & exit
- Update the
x
inuser
value according to the second number of your tutorial group.
- If you have changed the smb port to 4450, add
:4450
after@192.168.56.2
.
- Ensure that there is no extra text before or after the code block as shown above.
- Save the file as
map_osx.txt
.
- Close the editor.
- Rename the file in Finder, removing the
.txt
from the file name and confirm the prompt to remove the extension.
- Open Terminal. You may open through Spotlight Search (Press
⌘ command
+spacebar
).
- Type in
chmod +x
, with an extra trailing space after the+x
.
- Drag the
map_osx
file that you have created into theTerminal
window.❗For themap_osx
file that is dragged in, ensure that the name does not end with.txt
. If you see that your current command ends with.txt
, please follow the below points. a. Clear your current terminal screen by pressing^ control
+c
. b. Typemv
, with an extra trailing space. c. Drag the file into the terminal twice. d. Press thedelete
key until the.txt
is removed. e. Press the return key on your keyboard (Also known as the Enter key). f. Restart with Step 9 above.
- Press the return key on your keyboard (Also known as the Enter key).
- This file that you have just created is now an executable file.
Usage Instructions
- Your virtual machine should be powered on and be displaying the login screen before you can create a mount to the virtual machine folder.
- To mount the virtual machine folder, double click on the
map_osx
file.- If the virtual machine is not running, only an empty folder will be created.
- If the virtual machine is running, a shortcut to access the mount will be created.
- You may now access the mounted folder if your virtual machine is running.
- To unmount or to delete the empty folder, double click on the
map_osx
file.
Bonus Tips
Bypass Expired Certificate
Latest version of Google Chrome and Safari will disable access to pages with expired certificates.
If you are unable to access https://192.168.56.2:20000, please download Mozilla Firefox.
Update on August 12, 2021 by Yumeng:
You may want to try the option 2 in this link Chrome: Bypass “Your connection is not private” Message.
Strange steps, but it works for me ꉂ ೭(˵¯̴͒ꇴ¯̴͒˵)౨
Scale Virtual Machine Window
Due to the high resolution displays on Macs, the virtual machine window might be very small.
With the virtual machine in focus, click on the View → Virtual Screen 1 → Scale to 200% to scale it up.

Proper Shutdown of Virtual Machine
When you press the close button of the virtual machine, you can pick among the following options as shown in the image on the right. Select the Send the shutdown signal option in order to shut it down properly.