Flash Sale:75% Off Hosting + Free DomainEnds in13h47m14sView Plans
Hostvento logoHostvento

Set Up a Virtual Machine on Your Own Computer for Testing

This guide shows you how to build a safe practice server on your own computer. You will use free software called VirtualBox.

How-To Guides2 min read16 steps

What is a virtual machine?

A virtual machine, or VM, is a pretend computer that runs inside your real computer. It has its own system and its own files. If you break it, your real computer stays safe. That makes it a great place to test a website or try server commands before you use them on a real server.

What you need

  • A computer with at least 8 GB of memory and some free disk space.
  • VirtualBox, a free program that creates VMs. You can download it from the VirtualBox website.
  • An ISO file. This is a disk image, like a digital copy of an install disc. Ubuntu Server is a popular, free choice.

Steps

  1. Install VirtualBox and open it.
  2. Click New.
  3. Type a name for your VM, such as test-server.
  4. Choose your ISO file when asked, or pick it later.
  5. Set the memory. 2048 MB is a good start for a small test server.
  6. Set the number of processors. 2 is usually enough.
  7. Create a virtual hard disk. 20 GB is plenty for testing.
  8. Click Finish.
  9. Select your new VM and open Settings, then Network.
  10. Change Attached to to Bridged Adapter. This gives the VM its own address on your home network. You can then reach it from your computer.
  11. Click OK, then click Start.
  12. Follow the on-screen installer. Choose a username and password you will remember.
  13. When the install ends, restart the VM and log in.

Reach your test server

  1. Inside the VM, type ip a. This shows the VM's network address.
  2. Install a web server if you want to test a site. On Ubuntu, type sudo apt install apache2.
  3. On your real computer, open a browser and type the address from step 1.
Tip: Use Machine, then Take Snapshot before a risky test. A snapshot is a saved moment in time. You can go back to it if something breaks.

Your virtual machine only exists on your own computer. It is not your Hostvento hosting. Use it to practise, then repeat the steps on your real server when you feel ready.

Quick recap

  • A VM is a pretend computer inside your computer.
  • VirtualBox is a free tool to make one.
  • You need an ISO file to install the system.
  • Use Bridged Adapter to reach it from your network.
  • Take snapshots before risky tests.