IT things, skip down a bit if not your thing 🙂
At work I have been using Virtualbox to manage virtual machines. As an open source replacement for VMware or Microsoft’s VirtualPC I like it, its got the backing of Sun Microsystems (now owned by Oracle) There are regular updates and active forums for support. When I first heard of it from a colleague 3 years ago, you can literally throw almost any operating system at it, I used one of the first betas of Windows 7, various Linux distros, and things like Android, the fast becoming popular phone operating system, and all of these worked first time with very little issues.
In a nut shell, it makes a PC into multiple independent computers to run several systems at once, meaning less physical hardware to run servers, test PCs and other things. The host (physical lump of metal) machine can be Windows, Mac or Linux.
This saves our organisation money as we have less actual hardware, patches and updates are easier manage and less power consumption and disk space used.
Each host that controls virtual machines has folders on the root of a drive as follows, with shortcuts onto the desktop:-
I wrote some documentation what I have done for work, this is not exhaustive, nor have I read much in the way of best practices for virtualisation. But it is what has worked well for me. At the moment I have a server which uses macros with Microsoft Excel and Outlook to process helpdesk app for our home repair team. I didn’t create this system as there was no documentation for it, I took it off a physical PC, virtualised it and stored it safely on a dedicated server. By stripping out unnecessary applications (Windows Media player, Adobe Acrobat etc) , it only needs about 8Gb of disk space. I also have our SAP finance app which is on an Windows 2000 server box virtualised which made it one heck of a lot easier to apply patches and updates and do maintenance. This week a normal Windows XP PC used by a member of staff who is the US which is only controlled by a VPN connection has been converted and stored the same way.
On the root of the drive I have made several folders on each host PC as follows:-
– for real running machines currently used in production. When planning backups, these cannot be copied easily as files will be ‘locked’ as they are actively in use.
– Copies of critical virtual machines before making any changes. In the event of a change or update breaks the configuration, you can revert back to a previous build. Make this folder sharable over the network.
– VMs used for experimental use. These don’t need to be backed up.
– copies of CDs, operating system media, service packs, etc. Instead of needing physical media inside the host, these come in handy, as you can do changes to the host remotely with VNC or Remote desktop (RDP) and grab the CD you want from here.
Best settings for typical configuration
- Use modern hardware for your host. You should have a PC with a dual core processor which support hardware assisted virtualisation, Intel and AMD’s recent chips do this. You should have at the very least 2Gb of RAM, preferably 4, and a mirrored disk RAID array where you VMs are going to sit, as a safety net in case of one disk fails. Below make sure VT-x/AMD-V is ticked if you do have the one of the newest Intel/AMD cpus that support it. It will work without this, but this is definitely recommended to have decent hardware.
- OS for the host. I am using plain old Windows XP (32 bit, with SP3) as a host, this isn’t ideal for several reasons. You can’t run 64 bit guests, such as Vista, 7 and all recent Linux distros have 64 bit versions. Secondly, standard plain-jane XP only can cope with a maximum of 3.5Gb of memory, so if you have 4Gb or more, the extra memory is redundant. We don’t have licences for any other OS to be used as a host, and I don’t know enough about Linux to do system administration this way, but for those who do, it would be a good plan.
- Disable sound, USB, floppy drive, serial port, support, etc you are unlikely to need these.
- Once the Virtual machine has booted, install the guest addons. This is a clever set of drivers that let the VM integrate well with the guest environment, you get proper video card drivers, mouse pointer will work seamlessly with the host.
- Make sure you set network card settings to bridged (default choice is NAT) If you don’t do this, the network card doesn’t work properly, and after I switched the setting from NAT to Bridged it still didn’t work, so I ended up building a new VM.
- Disable the blue/green Windows XP trim on both VMs running Windows XP and the hosts, this boosts performance. To do this:- goto control panel / system / advanced / tick box for best performance / ok.
- Install only the bare essential applications on the host. My host, just has AVG antivirus, Infrarecorder, (CD burning) VNC and latest RDP for remote access, Internet Explorer 8 (This PC is not used for web browsing, its there as part of the updates) I purposely left out things like Adobe Acrobat, as it will mean another set of updates to worry about.
- Use a specific IP range for your VMs, I choose 192.168.x.90-99.
- Put a second network card in your host, you can make your VMs work choose which network card to use (upto 4) as I have found today, one network connection stretches things, when you have a dedicated finance server and another PC which requires a user to use remote VPN connection to it, which kept dropping. Today, I took the server down and put an extra NIC card and directed the remote user’s VM to this.
Known issues and risks
- When changing settings on a virtual machine, consider this like a real PC, the VM must be shut down for any changes made in configuration. Changes to memory, disks, etc cannot be done whilst the VM is running.
- Make sure your host does not have Windows updates on automatic. Otherwise unexpected reboots to the host will happen when patches get rolled out.
- When installing Virtualbox, the installation will add and extra virtual network card to the host system, it will also temporarly break network connectivity on the main network card you are using, normally RDP will attempt to reconnect soon after. Tip! Download and install the latest version of RDP, there is a new version Microsoft released with Win7, this works happily with XP, and has some improvements on this old version. 🙂
- Some legacy operating systems (or at least if they are converted from physical to virtual) may hang upon boot up. With Windows 2000 Server I built you need to tick the box for IO APIC.
- When rebooting some VMs, you may experience a system hang with green stripes, you need to manually restart the VM. This does not impact the VM or damage any system files, but just remember if you remotely reboot that system you might need to manually reboot. Since I moved from 3.2.8 to 3.2.10 this problem seems to have gone I think.
- Dont be too enthusiastic to indiscriminately install a new version of Virtualbox without making careful back ups of your VMs. Be prepared for possible problems, seeing as many Virtualbox users have said their VMs failed to boot or crashed if a new version of Virtualbox was installed, due to differences in the way it handles the virtual hardware.
- The feature that suspend VMs (click the X in the corner, there is an option to send shutdown signal, force a shutdown or suspend a VM) seems to give an odd issue that slows the clock down. This could cause some odd side effects with important servers, so I suggest not using this.
This set up works well for a smaller organisation like us, feel free to comment if you have questions.
One thing I would like to ask, and that if anyone can recommend an app I can run on my host, to monitor network, memory, CPU and hard disk space to make sure I don’t overtax my server with too many tasks.