Tips and tricks on developing web sites

Creating a Windows 10 Web Server VM

Creating a Windows 10 VM

Virtual Machine Software (VM)

If you want to test out a new piece of software or Operating System, try using a Virtual Machine (VM). If you don’t like the result, just delete it and no harm is done to your computer. If you mess it up, replace the VM with a backup file and you are back in business. The only area where VMs don’t do well is for testing out games that require a lot of 3D video power. Another neat thing you can do with VM’s is set up an isolated network between them. If you want to learn about Ethical hacking, VM’s are a great way to do it. There are quite a few programs out there that can host a virtual machine such as VirtualBox, VMware and Microsoft’s Hyper-V. I like VirtualBox because it completely free, reliable and is frequently updated. You can download VirtualBox and the VirtualBox extensions at You need both downloads.

What do you need for a system to host a Virtual Machine? I’d suggest at least a dual-core processor and 4GB RAM. Obviously, the more powerful the computer you have the better. If you run the VM on an SSD or NVMe drive you will notice a huge performance boost. Dual monitors are also a good idea. I use my left monitor to check my Emails, do Google searches, and process graphics and the right monitor hosts the VM. Hopefully, your VM system allows you to use a bi-directional clipboard between the two screens which is quite handy.

Most packages will bury your virtual machines somewhere in your user account. I like to make backups of my VM’s all the time, so I prefer to store them in C:\VM. To change that setting in VirtualBox, select Preferences and change the Default Machine Folder to C:\VM. Next, install the Guest Additions file you downloaded by double-clicking on it. That’s about it for getting VirtualBox going.

Enable BIOS Virtualization

Before you install your VM software make sure that you have enabled AMD-V or Intel’s VT-d if your system supports it. You can turn this setting on in the BIOS on your computer. To get into the BIOS reboot the PC and press the delete, F1, enter, Alt, f4 or f10 key before your operating system loads. Each manufacturer has its own key to press to get into the BIOS so do a Google search to find that. The virtualization option may be listed as Intel Virtualization Technology, Virtualization or something similar to that.

Getting Windows 10

You can create an install image for Windows 10 by downloading the Windows 10 media creation tool (look for the Create Windows 10 installation media heading on the site). Run the program and wait for it to Get things ready. When asked What do you want to do? select the Create installation media option. Uncheck the Use the recommended options for this PC option. I’d suggest using the 64-bit version of Windows since most software is 64-bit these days.

If you want to make a bootable USB key, pick that option and use an 8GB or larger USB drive.

If you want an ISO image to install on a Virtual Machine, choose the ISO file option, and save the ISO to a directory you will remember like C:\ISO. It may take a while to get the ISO, it is around 4.5 GB.

Create a Windows 10 VM in VirtualBox

In the Virtual Box Manager, click on New and Setup the Virtual Box as follows, using the default values except for those listed below. You will have to create the VM and then right-click on it to change some of the properties I suggest.

Right-click on VM to change additional preferences
  • Make a 50 GB Dynamically allocated physical hard disk. This is a dynamic disk, so it will get bigger in size as needed. By the time you install Windows the Dynamic disk with take up about 20 GB.
  • General->Basic->Type->Windows
  • General->Basic->Version->Windows 10 (64-bit)
  • System->Advanced->Shared Clipboard->Bidirectional
  • System->Motherboard->Base Memory->With a 16GB system, I use 4096 MB. Use up to 1/4 or your RAM.
  • System->Processor->1 or 2 processors should be fine
  • System->Processor->Enable Nested VT-x/AMD-V
  • Display->Screen->Video Memory->256 MB
  • Display->Screen->Enable 3D Acceleration
  • Network->Adapter 1->Bridged Adapter (if you want to browse you network, NAT otherwise)
  • User Interface->Show at Top of Screen (this is just my personal preference)

Now that the Virtual Machine is configured, highlight it and click on the Green Start arrow. It will ask you to Select a start-up disk. Click on the Folder with the green up arrow and then Add. Pick the Windows 10 ISO you downloaded earlier

After that you are into the standard Windows installation process. When asked for a product key click on I don’t have a product key at the bottom of the screen. Pick the version of Windows you want to install. Windows 10 Home x64 is usually more than adequate. When you get to Which type of installation do you want? pick Custom: Install Windows only (advanced). The installer will allocate the entire virtual drive and you are on your way. It will reboot after the initial setup and then ask you for your country and keyboard preferences. Eventually, your get to Let’s add your account. I don’t want my Virtual Machines to share anything with my regular accounts (like Google or Microsoft) so I use a local computer account. You can select admin as an account name. It will ask for a password, type in admin again and then it will report an Opps.. message. Just ignore that. You will be asked Who is going to use this PC? Pick a login name (ie admin) and a password you will remember. Three password recovery questions will be asked, it doesn’t really matter what you pick for those either. Keep them simple.

You will then get to the Choose privacy settings screen. I either disable or choose the minimum all of those. I disable Cortana when asked.

When Windows boots up, go to the Devices menu at the top of the window and Insert Guest Additions CD image… If the CD doesn’t autostart, just go to File Manager and select the CD drive. While you are there you should go to the View menu and enable File name extensions. Under the Options menu View enable Show hidden files, folders, and drives and Display the full path in the title bar. Click on Apply/OK and then double click on VBoxWindowsAdditions.exe file and install/trust everything it asks you to. The virtual computer will ask to restart and you are almost done with the Windows installation.

When you get to the log-in screen, I suggest you shut down the Virtual machine and when back in the VirtualBox Manager Clone it by right-clicking. For MAC Address Policy: select Generate new MAC addresses. It is good to make a clone at this point. A name like W10base is handy. Later on, if you want a new Windows 10 machine, just clone that and you won’t have to install Windows all over again.

Backup your VM Often

The easiest way to back up your VM’s is to shut the VM down, go into your VM folder (C:\VM is what I use) and copy the VM\vmcomputername folder to a folder like C:\VMBACK\vmcomputername That way if something goes wrong, you can just replace the C:\VM\vmcomputername folder with your backup. Make sure you backup before making major changes to your VM.

File Sharing

Start your Virtual Machine and log in. This is a great time to change the hostname of the VM. Go to Settings, System->About. There is a Rename this PC option there. Pick a name like WEBSERV so it is easily recognizable on your network. You will be asked to reboot and log in again. Click on File Manager and Network. You will get a message about Network Discovery being turned off. Click OK, and you will see a yellow band appear offering for you to turn on network discovery and file sharing. Enable discovery by selecting No, make the network…blah blah. You should now be able to browse your network. If you can’t, double-check in VirtualBox manager that your VM’s Network option Attached to: is Bridged Adapter.

If you aren’t on a network, you can either work solely on the VM or use the Shared Folders option under settings for the VM in VirtualBox Manager.

Menu Transparency

You may notice that the start menu does not display properly in Windows 10. Windows likes to apply a transparency setting to the menus that might affect legibility. To fix that, press the Windows Key+U to go to the Settings panel. Click on Display and turn off Show transparency in Windows

You can also change this using regedit and set HKEY_CURRENT _USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize\EnableTransparency and set it to 0.

hosts file configuration

For now, let’s assume you own domain and want to set up a single HTTP site on your VM. First, we need to tell your VM to look for locally rather than on the internet. Right now if you type into your browser address bar you will go out to the internet and retrieve that public site (give it a try). We need our VM to look at its Apache server instead for To do that you modify your VM’s loopback mechanism with has an IP address of and has a default name of localhost.

To make local and use the loopback mechanism, your edit your VM’s C:\windows\system32\drivers\etc\hosts file. This is a hidden system file, you need to edit it with notepad running as Administrator. You can do that by clicking on the Windows Start button (lower left) and type notepad. On the notepad icon right-click and select Run As Administrator. Click Open and navigate to C:\windows\system32\drivers\etc and then type hosts as the filename. Note that you won’t see the hosts file in that folder because it is a hidden system file. Add a new line and type in but use the domain name you have selected. Note that you do not add the www prefix. You can add any number of local domains to this file.

With previous versions of Windows, you had to restart the computer to see the change. In Windows 10 they have eliminated the need to do that. In your VM browser type in and you will now see the Xampp page show up.