If you are setting up a website on a remote server you are hiring, then 
life is difficult. Setting things up often requires a lot of trial and 
error. Googling how to do it is useful but comes up with many many bum 
steers. Using a virtual machine on your own laptop with a duplicate of the 
operating system on the remote machine makes life a lot easier. I wasted a 
lot of time finding out how to best set up a virtual machine, so here are 
some tips to ease the path for other users.

Use virtual box. This allows you to have snapshots. These are brilliant as 
they allow you to return the system to this point at a later date. So after 
each successful step you can take a snapshot. This really helps with the 
trial and error approach.

Do not use livecds. Most operating systems income with a simpe livecd and a 
much larger multiple DVD  installation. Do not use the livecds, these will 
cause unexpected and unpredictable problems. However the full installation 
approach works reliably. Use 1GB of ram for the virtual machine. 

When you do the installation of a linux OS, it rather alarmingly asks if it 
can format your hard disk, destroying all the data on it. It evens names 
your actual hard drive. However provided that it says the size of the disk 
is 8GB, then you can safely let it format the drive, it is only formatting 
the virtual drive not your hard disk.

The easiest way of communicating between your normal OS and the virtual 
machine is via a flash USB drive. By clicking on 'devices' and then USB 
devices,  you can switch the usb drive to work with either system (only one 
at a time). Clearly ensure all files are closed before switching the flash 
drive.

The virtual box does successfully access the internet using a bridge with 
your main operating system's connection.

I used this virtual box approach to develop a script for Nginx with Uwsgi 
and Web2py on Centos 5. This prevented my site being down for significant 
amounts of time.

Peter


Reply via email to