I came across this problem while setting up Docker on my OSX environment , and after searching the web , I found a method that works well, and cures the problem.
Basically once the Virtualbox VM is created you need to edit the network adapter drivers and set them to "PCNET-FAST III" instead of the paravirtualised drivers. You need to do both adapters, and then restart boot2docker.
You will notice that you get the correct settings now in your /etc/resolv.conf file.
This was annoying me, and meant I had to reset the settings in the above file everytime I start docker - which is not ideal.
Hope this saves you some time.
Showing posts with label virtualization. Show all posts
Showing posts with label virtualization. Show all posts
Thursday, 11 June 2015
VM created by boot2docker init does not have DNS set up correctly - heres how to fix it
I came across this problem while setting up Docker on my OSX environment , and after searching the web , I found a method that works well, and cures the problem.
Basically once the Virtualbox VM is created you need to edit the network adapter drivers and set them to "PCNET-FAST III" instead of the paravirtualised drivers. You need to do both adapters, and then restart boot2docker.
You will notice that you get the correct settings now in your /etc/resolv.conf file.
This was annoying me, and meant I had to reset the settings in the above file everytime I start docker - which is not ideal.
Hope this saves you some time.
Labels:
Apple,
boot2docker,
centos,
DNS,
docker,
fedora,
linux,
OSX,
redhat,
Ubuntu,
virtualbox,
virtualization
Sunday, 31 August 2014
Using Docker to run rtorrent to reduce your servers resource requirements
Let me state early and clearly , any one who thinks Docker is a new technology, knows nothing about IT and even less about virtualisation. So if some smartalec in your office starts spouting about this new technology, take them down a peg or two with a few links to Solaris containers, OpenVZ or LXC.
What the Docker team have done extremely well, is make these ancient technologies very accessible and very easy to use, with a well defined tool set and API. This they must be highly praised for.
In the words of Einstein however, they work on the shoulders of giants, who did a lot of the heavy lifting, and let us all not forget this.
I have been using containers for years, and we worked on a very successful cloud at Nokia using OpenVZ, where we built our own tools.
So I thought I would give Docker a spin on one of my cloud servers and just kick the tyres to start. I picked an application I use a lot for downloading Linux ISO's so it seemed a good choice. It was very straight forward indeed.
The host operating system was CentOS 6.5 - which I'm growing less fond of as each week passes, as in the fast moving cloud space, Ubuntu is simply better. It was installed however, and I couldn't be bothered to change it. You need to enable the EPEL repository and install docker with yum.
I decided to download and use the userland tools of a Docker Ubuntu image - but whatever image you choose - the host kernel is the one that will be used. This is to do with the historically well thought out ABI built into the Linux kernel that allows this all to work.
Once the image was retrieved from the Docker registry - I fired up a container with Ubuntu 14.04 tools and installed screen, rtorrent , vim and htop.
I always run rtorrent with screen so I can just leave it running and come back to it when required. Also importantly - when starting your container use /bin/bash so you can have an interactive session with it to be able to go back and check your screen/rtorrent session. A command like the following will do.
docker run -i -t my-ubuntu-image /bin/bash
Be care however when you want to exit this container , DON'T type exit but CTRL-p, CTRL-q , so everything keeps running and you can reattach to the container when you wish to check on progress.
This uses significantly less resources than spinning up a KVM virtual image to do the same job, as it uses the resources of the host system that are already running.
I have deliberately not put all the commands need to do this here , as the Docker documentation is good and very clear, so duplication is pointless
Labels:
bitorrent,
centos,
docker,
epel,
kvm,
linux,
linux containers,
lxc,
openvz,
redhat,
rtorrent,
solaris containers.,
Ubuntu,
virtualization
Thursday, 3 April 2014
Fixing a problem with VMware vcloud when putting a Virtual Machine back into the cloud Catalog
If you use vcloud, then I'm sure you have pushed fully patched and configured virtual machines back into the catalog as gold masters many times. If you have customised scripts, then you may or may not have come across this problem.
However yesterday, I came across a problem where the custom script settings within vcloud version 5.5 were not working, and the init scripts were not be run when you created a new vapp. This is a setting that tells the VM, if they have been run or not
It turns out the code for pushing VM's back into the catalog was not resetting the static file needed, to tell the init scripts to run correctly. If you look in .customisation in roots home directory, you can see the file it is looking for.
So , the work around - after much digging around in the code to find the file that VMware tools were looking for - is as follows
On a Linux system just type the following.
touch /.guest-customisation-post-reboot-pending
Once this file is in place, shutdown your VM, copy it back to the catalog, and all will be fine on the next start - it will run your desired init scripts as you wanted in the first place ;-)
Hope this saves you some time.
Wednesday, 15 August 2012
Using puppet with Virtualbox to speed up client additions install
One of the first things you need to do when you create a new VM is install the client additions code, which offers enhanced networking,screen sizing, cut & paste and general host/client integration. With Centos 6.3 Live CD installs , several of the needed rpm packages that allow the install are missing.
I have a puppet master installed and configured - which is beyond the scope of this post - but if you need help doing that, then just buy or download the Pro Puppet book, which covers this topic very clearly for any operating system.
Pro Puppet book
Make sure every machine can resolve all DNS entries properly , either with a DNS server or by hosts files - if you must. Every machine needs to resolve puppet.mynetwork.com and puppet.
You also need to install ruby , ruby-libs ,ruby-shadow , puppet and facter or you won't be able to connect to the puppet master in the first place. You can do this as part of your post-install kickstart or manually. You will also need to add the Fedora mainatained EPEL repo to get the latest versions of these.
The important elements that you need to install are make, gcc and kernel-devel and I also always add vim.
You need to define each of these in the modules sections under /etc/puppet/modules on the puppet master with their own directory structure of:
/etc/puppet/modules/make/files
/etc/puppet/modules/make/manifests
/etc/puppet/modules/make/templates
Within the manifests directory you need to add an init.pp, and for vim it will look like this:
class vim {
package { vim-enhanced:
ensure => present,
}
}
You can obviously do a lot more in these files, but this is just to show what is needed for this task.
You also need to make sure you include these modules in the node.pp file in the /etc/puppet/manifests directory. Like this:
node /^testmac\d+\.mynetwork\.com/ {
include vim
include make
include kernel-devel
include gcc
}
The guest server in my environment follows this naming scheme and the regular expressions allow you to have as many as you like.
To connect your new VM to the puppetmaster you can run the following command and make sure that the certificate is allowed on the server:
puppet agent --server=puppet.mynetwork.com --no-daemonize --verbose
Once the client server has the cert's installed correctly, then run this command again to auto install all the rpms needed for you to install the client additions. The client additions can be installed from the GUI or the command line, which ever you prefer.
You can now also manage all your VM's with puppet , and make your virtual dev/test environment a lot easier to manage.
Monday, 5 December 2011
How to add another hard disk to your Xen virtual machine

If like me you have many Xen virtual machines that have been running for a while, you will likely come across the problem of having to increase the disk space, as the services or jobs the virtual machine offers over time changes.
Now you could increase the size of the existing disk, but I always feel that offers a level of risk, which with adding a new disk and using LVM or a new mount goes away.
Ok, so firstly we need to create a new virtual disk on the physical harddisk with the following command:
dd if=/dev/zero of=vm01-disk2.img bs=1G count=50
This will give us 50GB of new space. You can of course change the size to what ever you require, if your physical disk space will allow it.
Then we need to edit the Xen virtual machine configuration file and add in the new disk.
On my virtual machine host this is in /etc/xen/vm01
The line that needs to be altered is obviously the disk line, like so
disk = [ "tap:aio:/opt/xendisks/vm01.img,xvda,w",\
"tap:aio:/opt/xendisks/vm01-disk2.img,xvdb,w" ]
NB Notice the slash which allows the configuration line to expand over two lines in the configuration file.
Once you have done this, you can use the virsh and xm commands to restart the virtual machine , so that the new disk is available inside the virtual machine.
Once your VM has re-booted, you will notice another disk, which you can then either add to your LVM configuration, or just format and mount in a new directory. Here is my new mount as an example.
/dev/xvdb 50G 19G 29G 39% /opt/tomcat
Tuesday, 15 March 2011
Changing the network settings with VMware player 3.1 on Linux

I came across an issue today, where I wanted to remove one of the virtual network interfaces that gets installed when you install VMware player. This turned out to be relatively straight forward, once you know where to look.
In VMware workstation , you get a great graphical tool to amend and alter the virtual network configuration, but not so with the free VMplayer.
The reason I wanted to do this was remove the virtual interface vmnet8, as I'm not using any NAT's interfaces, so this is not needed and will only consume resources.
Firstly point your favourite editor at /etc/vmware/networking as a root user and then modify the file like so.
7 answer VNET_8_DHCP no
8 answer VNET_8_DHCP_CFG_HASH B9130F0FB783D3AC081BDA79708F4635E63130A4
9 answer VNET_8_HOSTONLY_NETMASK 255.255.255.0
10 answer VNET_8_HOSTONLY_SUBNET 172.16.73.0
11 answer VNET_8_NAT no
12 answer VNET_8_VIRTUAL_ADAPTER no
The key , is that you have turned all the VNET_8 answers to no instead of yes.
Once this is safely saved, run the following commands to re-start the networking.
sudo vmware-networks --stop ; sudo vmware-networks --start
Once you have done this, if you now issue an /sbin/ifconfig you will notice that vmnet8 does now not appear.
Wednesday, 10 November 2010
Is upgrading to the Intel i5 laptop processor worth the effort

In a word, yes . As you may have read on this blog a few weeks ago , I tried an experiment with using an SSD harddisk for the operating system in conjunction with an external 500GB hybrid disk for all the more volatile parts of the OS, like /var and /tmp.
This was a resounding successful with a marked ramp in performance across the whole operating system and applications, to the point now , that all other machines seem like sloth's in comparison.
I had a need to upgrade my work laptop recently, specifically for more CPU cores and access to that lastest hardware virtualization extensions. I use the laptop extensively for virtualization, so I picked the Dell Latitude E6410. This is a really good work horse, but more importantly it comes with the Intel i5 processor.
This has had a very positive affect on the whole systems performance when running virtual guests with VirtualBox - my current virtualization platform of choice - to the extent that I can now over commit on memory and cpu's , plus the density I can achieve on this box has literally doubled.
I always keep a system monitor going to see how hard the system us working, and while on the old E6400, with two virtual machines running , the system would be noticeable slower, now with four virtual guests running, there is still plenty of head room for the other applications I need to run.
If are about to upgrade, and you need the ability to run multiple virtual guests, then I would definitely recommend the extra spend on this processor. The more memory the better, but I'm happily working with 4GB currently, but I can take this up to 8GB if the need should arise.
Well done Dell this is a grand machine for running Linux.
Labels:
Dell,
Intel,
linux,
open source,
Ubuntu,
virtualbox,
virtualization
Thursday, 22 July 2010
Is Ubuntu thinking about switching to Chromium in 10.10?

While testing with the latest daily build I thought I would look through the App store to see if Google was in there, and instead I found a Chromium version (fully open source) version which is pinned to the exact same release code as the stable release of Google Chrome.
Now I get why in the base installation they don't want the Google Chrome release, but the Chromium version has up until now always been bleeding edge. So by taking the same stable version and just building the open source bits make it very easy to now include this.
As it stands today, you get FF 3.6, and it is very unlikely that FF 4.0 will be ready in the development timeframe for Ubuntu 10.10, but Chromium is ready now, and offers a much faster experience than FF. Now, version 5 of Chrome/Chromium is not perfect, but for 99% of peoples surfing needs it works fine.
Now, this is me finding something in repositories and making 5 from 2 + 2, but it really wouldn't take that much of a step, and it would be a real differentiator between the distro's. They must be thinking about it, otherwise why go to all this problem.
Have a look yourself and see what you think.
Wednesday, 19 May 2010
VirtualBox 3.2 with OSX support is launched

Having just upgraded to the latest version and tested with my Windows 7 virtual image on an Ubuntu 10.04 host, I can confirm that this release has hit many of it's targets for speed improvements, and the network and disk I/O are noticeable faster.
The ability to add CPU's on the fly to OSes - that support it - will also be useful to many users, as will the support of SAS disks. It worth noting that all traces of the Sun ownership is being removed and turned into Oracles branding, and I wonder how long this will remain free ;-).
It would appear that this is going to be a key component for them moving forward, which is not that surprising.
Unfortunately, the OSX support is only for Apple hardware officially,
Here are the release notes:
Performance
New Latest Intel hardware support – Harnessing the latest in chip-level support for virtualization, VirtualBox 3.2 supports new Intel Core i5 and i7 processor and Intel Xeon processor 5600 Series support for Unrestricted Guest Execution bringing faster boot times for everything from Windows to Solaris guests;
New Large Page support – Reducing the size and overhead of key system resources, Large Page support delivers increased performance by enabling faster lookups and shorter table creation times.
New In-hypervisor Networking – Significant optimization of the networking subsystem has reduced context switching between guests and host, increasing network throughput by up to 25%.
New New Storage I/O subsystem – VirtualBox 3.2 offers a completely re-worked virtual disk subsystem which utilizes asynchronous I/O to achieve high-performance whilst maintaining high data integrity;
New Remote Video Acceleration – The unique built-in VirtualBox Remote Display Protocol (VRDP), which is primarily used in virtual desktop infrastructure deployments, has been enhanced to deliver video acceleration. This delivers a rich user experience coupled with reduced computational expense, which is vital when servers are running hundreds of virtual machines;
Power
New Page Fusion – Traditional Page Sharing techniques have suffered from long and expensive cache construction as pages are scrutinized as candidates for de-duplication. Taking a smarter approach, VirtualBox Page Fusion uses intelligence in the guest virtual machine to determine much more rapidly and accurately those pages which can be eliminated thereby increasing the capacity or vm density of the system;
New Memory Ballooning – Ballooning provides another method to increase vm density by allowing the memory of one guest to be recouped and made available to others;
New Multiple Virtual Monitors – VirtualBox 3.2 now supports multi-headed virtual machines with up to 8 virtual monitors attached to a guest. Each virtual monitor can be a host window, or be mapped to the hosts physical monitors;
New Hot-plug CPU's – Modern operating systems such Windows Server 2008 x64 Data Center Edition or the latest Linux server platforms allow CPUs to be dynamically inserted into a system to provide incremental computing power while the system is running. Version 3.2 introduces support for Hot-plug vCPUs, allowing VirtualBox virtual machines to be given more power, with zero-downtime of the guest;
New Virtual SAS Controller – VirtualBox 3.2 now offers a virtual Serial Attached SCSI (SAS) controller, enabling it to run the most demanding of high-end guests;
New Online Snapshot Merging – Snapshots are powerful but can eat up disk space and need to be pruned from time to time. Historically, machines have needed to be turned off to delete or merge snapshots but with VirtualBox 3.2 this operation can be done whilst the machines are running. This allows sophisticated system management with minimal interruption of operations;
New OVF Enhancements – VirtualBox has supported the OVF standard for virtual machine portability for some time. Now with 3.2, VirtualBox specific configuration data is also stored in the standard allowing richer virtual machine definitions without compromising portability;
New Guest Automation – The Guest Automation APIs allow host-based logic to drive operations in the guest;
Platforms
New USB Keyboard and Mouse – Support more guests that require USB input devices;
New Oracle Enterprise Linux 5.5 – Support for the latest version of Oracle's flagship Linux platform;
New Ubuntu 10.04 (“Lucid Lynx”) – Support for both the desktop and server version of the popular Ubuntu Linux distribution;
New Mac OS X – On Apple hardware only, support for creating virtual machines running Mac OS X.
Wednesday, 12 May 2010
Using Linux kernel KVM and Virtualbox virtualization on one machine with Ubuntu
As I like to use many forms of virtualization to check out new features and tricks, as they are all different, then you can hit problems with the different kernel modules that get loaded at boot time. To solve this problem I have written this simple script to unload the Linux KVM modules when I wish to use Virtualbox, and then allow me to simply load them when I want to use KVM instead.
It also allows me to check if the modules are loaded, and uses a nice graphic password prompt as you have to execute this as a root user.
During testing I have found that loading the KVM modules while you have Virtualbox running is not the best of ideas, not surprisingly ;-)
Here is the script - I have had to split it up into two screen shots, otherwise I lose the formatting, which makes it harder to read.

It also allows me to check if the modules are loaded, and uses a nice graphic password prompt as you have to execute this as a root user.
During testing I have found that loading the KVM modules while you have Virtualbox running is not the best of ideas, not surprisingly ;-)
Here is the script - I have had to split it up into two screen shots, otherwise I lose the formatting, which makes it harder to read.

Tuesday, 27 April 2010
Upgrading Ubuntu 9.10 to Ubuntu 10.04 in a virtual machine
As you will know the next major long term release of Ubuntu is about to ship in 3 days time so I thought I would do a test upgrade to make sure all was working well and there were no real show stoppers. This is a controlled environment, so won't be exactly the same as a machine that has been in use for a while, but is none the less a good initial test. If it doesn't work here, then it is definitely not going to work on a machine that has been in use for a while.
So, I installed a 9.10 i386 desktop virtual machine , using Virtualbox 3.1.6 on an Ubuntu 9.10 host. See the pictures below. This has had the Virtualbox tools installed.

I then ran a complete update on the virtual machine to make sure the machine had the latest packages before starting the upgrade.
I then ran


Once the process had completed, which took just over an hour with a very fast internet connection, I was able to selct to remove the now obsolete packages and complete the install.


I then re-installed the Virtualbox tools, as we now have a new kernel and the system was up and running without any issues and the Virtualbox tools were working as expected, see below.

So this does leave a really good feeling for all of my machine upgrades that will be taking place after the release of the final version on Thursday.
If you are new to operating system upgrades, then I can't recommend this process enough for making sure you are confident before doing it on your work machine.
So, I installed a 9.10 i386 desktop virtual machine , using Virtualbox 3.1.6 on an Ubuntu 9.10 host. See the pictures below. This has had the Virtualbox tools installed.

I then ran a complete update on the virtual machine to make sure the machine had the latest packages before starting the upgrade.
I then ran
update-manager -dto start the upgrade process.


Once the process had completed, which took just over an hour with a very fast internet connection, I was able to selct to remove the now obsolete packages and complete the install.


I then re-installed the Virtualbox tools, as we now have a new kernel and the system was up and running without any issues and the Virtualbox tools were working as expected, see below.

So this does leave a really good feeling for all of my machine upgrades that will be taking place after the release of the final version on Thursday.
If you are new to operating system upgrades, then I can't recommend this process enough for making sure you are confident before doing it on your work machine.
Thursday, 1 April 2010
An Ubuntu 10.04 virtual machine with Virtualbox on Ubuntu 9.10
As I'm sure most of you do, I don't just jump to the latest versions of operating systems until I have had a good look at it before hand in a virtual machine. It doesn't completely guarantee that you wont have any problems with a bare metal installation, but it will give you a good understanding before you start.
The latest version of Virtualbox for Linux - 3.1.6 r59338 - arrived two days ago and the new virtual machine guest tools make it significantly more usable. The picture below shows that version.

This enables more fine grained testing of the Ubuntu 10.04 release with much better graphics and enhanced performance, all of which are gratefully received.
I would recommend downloaded this combination and having a look at the latest offering that is about to be delivered by the Ubuntu community as it's going to be a good one.
Ubuntu 10.04 beta
Virtualbox
The latest version of Virtualbox for Linux - 3.1.6 r59338 - arrived two days ago and the new virtual machine guest tools make it significantly more usable. The picture below shows that version.

This enables more fine grained testing of the Ubuntu 10.04 release with much better graphics and enhanced performance, all of which are gratefully received.
I would recommend downloaded this combination and having a look at the latest offering that is about to be delivered by the Ubuntu community as it's going to be a good one.
Ubuntu 10.04 beta
Virtualbox
Friday, 19 March 2010
VMware Workstation 7.1 beta
I have just started beta testing VMware workstation 7.1 on Ubuntu 9.10 and have found that performance is not all that it should be. To be fair several other better testers have also discovered this , and the VMware team have started the investigation to get this fixed.
I have successfully installed the Alpha 3 version of Ubuntu 10.04 to test this release, and although some of the VMware tools did not work perfectly, I was able to bring up the virtual machine and have an initial look at the new OS.
Anyway, here is a list of the changes that are taking place for the new release.
I have successfully installed the Alpha 3 version of Ubuntu 10.04 to test this release, and although some of the VMware tools did not work perfectly, I was able to bring up the virtual machine and have an initial look at the new OS.
Anyway, here is a list of the changes that are taking place for the new release.
The VMware Workstation 7.1 Beta includes several new features and hundreds of minor improvements. Some release highlights include:
OpenGL 2.1 support for Windows 7 and Vista guests: The addition of hardware accelerated OpenGL 2.1 support to the WDDM driver enables many more graphics applications to run inside of your virtual machines.
Improved graphics performance: Significant enhancements have been made to the VMware WDDM driver that have produced benchmark results that are up to 80% faster. The updated driver also produces smoother video playback and addresses many reported rendering issues. Of course games run better as well!
8-way SMP support plus virtual disks up to 2TB in size: The virtual hardware continues to become more powerful to meet the needs of Workstation customers who are running server class applications.
OVF 1.0 support: Including the OVF Tool with this release enables users to easily import or export virtual machines and vApps and move them to vSphere or up into the cloud.
Direct Launch: Blur the distinction between running native and virtual applications by launching an application installed in a virtual machine directly from the start menu or taskbar of the host system.
Automatic software updates: These VMware applications can now detect when a new version is released and are able to update at the click of a button.
Fedora 12 virtual machines: We are excited about finally offering support for running one of the most popular Linux distributions on the planet!
Monday, 15 March 2010
Some issues while Checking Ubuntu Lucid 10.04 Alpha 3 in Virtualbox
I have been keeping up with the latest development builds of what will become Ubuntu 10.04 and all has been going reasonably well until the latest kernel install today. It appears that some of the code has been pack-ported from the latest upstream kernel - 2.6.33 - to the latest kernel in lucid - 2.6.32-16 - and it is causing an issue with Virtualbox.
After checking the forums, there is a kernel patch to fix this - see here
Basically, you need to edit this file -
This code is installed with the Virtualbox tools that you must install before this file will be appear on the hard disk.
See the picture below:

Once you have edited this file and saved it , run the following command
This will stop the problems with kernel crashes and the graphics not working correctly.
If you are also having problems with the mouse disappearing, then you need to turn off the visual affects in
Menu -> System -> Preferences -> Appearance
Set it to none, and the mouse will come back to life.
This is shaping up to be a great release, and once a few rough edges have been removed it will be an extremely useful addition to the ubuntu family.
After checking the forums, there is a kernel patch to fix this - see here
Basically, you need to edit this file -
/usr/src/vboxvideo-3.1.4/vboxvideo_drm.c
This code is installed with the Virtualbox tools that you must install before this file will be appear on the hard disk.
See the picture below:

Once you have edited this file and saved it , run the following command
sudo /etc/init.d/vboxadd setup
This will stop the problems with kernel crashes and the graphics not working correctly.
If you are also having problems with the mouse disappearing, then you need to turn off the visual affects in
Menu -> System -> Preferences -> Appearance
Set it to none, and the mouse will come back to life.
This is shaping up to be a great release, and once a few rough edges have been removed it will be an extremely useful addition to the ubuntu family.
Saturday, 6 February 2010
Is cloud computing really that new and original
I have been working in IT for more years than I care to remember, but it seems that if you wait around long enough, technologies that I have used before, suddenly become the flavour of the month and re-appear with smart presentations from slick young people in nicely tailored suits to tell us all how different it all is this time.
This happened with virtualization, where if you are brutally honest , the only key difference to what IBM were doing decades ago, was that the technologists got it to run on the Intel architecture, with all it's horribly legacy memory management et al.
So to the cloud, which in essence is the ability to leverage the power and storage of a remote machine to achieve the task's that you were used to doing locally, sound familiar, it certainly does to me. Literally decades ago people used to share resources on an IBM mainframe to run their payroll or business finance systems, which would be physically a long way away - people couldn't afford their own mainframes - and people would attach via modems and dumb terminals.
This is exactly what we are moving towards with the concept of the "Cloud is the machine". The local device can become significantly less powerful as all the real processing of the services is done remotely. This leads to much cheaper consumer devices, whether they be phones, iPads or netbooks. The services that people also want to use today are also becoming more and more central service orientated, things like YouTube, Twitter, Facebook, Blogging, Email, Instant Messaging etc.
I now their are many new technologies like HTML5 and improved Javascript performance that will improve the ability of the clients to do some work locally, but they are not going to be over tasked. The new breed of Intel Atom and ARM processors will be more than powerful enough to cope with the enhanced new GPU's that are appearing almost daily.
There will always be some tasks that are best suited to having a large powerful computer locally as their are many tasks that don't virtualize well, but we are talking about a small percentage for many users who today in 2010 consider the net to be the reason for owning a computer in the first place.
This happened with virtualization, where if you are brutally honest , the only key difference to what IBM were doing decades ago, was that the technologists got it to run on the Intel architecture, with all it's horribly legacy memory management et al.
So to the cloud, which in essence is the ability to leverage the power and storage of a remote machine to achieve the task's that you were used to doing locally, sound familiar, it certainly does to me. Literally decades ago people used to share resources on an IBM mainframe to run their payroll or business finance systems, which would be physically a long way away - people couldn't afford their own mainframes - and people would attach via modems and dumb terminals.
This is exactly what we are moving towards with the concept of the "Cloud is the machine". The local device can become significantly less powerful as all the real processing of the services is done remotely. This leads to much cheaper consumer devices, whether they be phones, iPads or netbooks. The services that people also want to use today are also becoming more and more central service orientated, things like YouTube, Twitter, Facebook, Blogging, Email, Instant Messaging etc.
I now their are many new technologies like HTML5 and improved Javascript performance that will improve the ability of the clients to do some work locally, but they are not going to be over tasked. The new breed of Intel Atom and ARM processors will be more than powerful enough to cope with the enhanced new GPU's that are appearing almost daily.
There will always be some tasks that are best suited to having a large powerful computer locally as their are many tasks that don't virtualize well, but we are talking about a small percentage for many users who today in 2010 consider the net to be the reason for owning a computer in the first place.
Wednesday, 2 December 2009
Managing Jumpbox virtual machines with Redhat Enterprise

I have long run the great Jumpbox virtual machines with Redhat EL 5 and Xen, but they have always had a different start up process to other machines, as the configuration file is slightly different.
I decided it would be much neater to control all the Xen based virtual machines with virt-manager, the GUI VM management tool supplied with RH5.4
It was a lot easier to do than I thought, basically I created a fully virtualized machine, with a phoney disk image. It is important to remember that the jumpbox VM's are not paravirtualized, and use qemu for their device's.
Now all I had to do was open the file that virt-manager had created in the /etc/xen sub-directory and edit it.
I changed the MAC address of the virtual NIC to that it was intended to be, and changed the virtual disk images that it pointed too.
The full file is below , and shows all the important parts. Voila , it run's like a charm and is now just another Xen virtual image that I can manage with the standard tools.
name = "fs-wiki"
uuid = "2d10f9db-a6df-ce50-c2b0-8255d80af734"
maxmem = 512
memory = 512
vcpus = 1
builder = "hvm"
kernel = "/usr/lib/xen/boot/hvmloader"
boot = "c"
pae = 1
acpi = 1
apic = 1
localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
device_model = "/usr/lib64/xen/bin/qemu-dm"
sdl = 0
vnc = 1
vncunused = 1
keymap = "en-gb"
disk = [ "file:/var/lib/xen/images/moinmoin-1.1.9/disks/root/root.hdd,hda,w", "file:/var/lib/xen/images/moinmoin-1.1.9/disks/data/data.xen,hdb,w", ",hdc:cdrom,r" ]
vif = [ "mac=00:16:3e:16:d2:24,bridge=xenbr0,script=vif-bridge,vifname=vif12.0" ]
parallel = "none"
serial = "pty"
Monday, 30 November 2009
Using a Xen virtual appliance to manage your VMware servers
One of the great things about virtualization is the amount of money you can save companies, not just in hardware costs, but also the on going costs of keeping machines in a data centre and a rack, and feeding them with power and air conditioning.
Well, I built several ESXi servers for the current bank balance filling company, and they needed an easy and affordable way to manage them on the cheap. Now, I have always thought that VMware workstation is very affordable, so I built a Vmware virtual appliance to look after the servers with Vmware vSphere client. This however proved too expensive for them and they wanted something at zero cost to the company.
It is obvious that the management virtual appliance has to be on a different virtual infrastructure to that which it is supporting, so I built another virtual appliance , this time on our Xen server. As the virtual appliance has to be built with windows XP as it's base and then security hardened, the Xen server has to have the Intel processor enhancements turned on in the BIOS, otherwise it just won't fly.
The Xen server is based on RedHat Enterprise Linux 5.4, which comes with a lot of enhancements to the virtual machine management program - virt-manager, and it is very straight forward now to configure new virtual machines.
All I had to do to allow remote management of this appliance was to turn on the terminal services process within XP, and now people can use the "remote desktop connection" program to access this VM and control the ESXi servers using vSphere client.
Xen offers great performance, and this solution works really well, and didn't cost a penny.
Well, I built several ESXi servers for the current bank balance filling company, and they needed an easy and affordable way to manage them on the cheap. Now, I have always thought that VMware workstation is very affordable, so I built a Vmware virtual appliance to look after the servers with Vmware vSphere client. This however proved too expensive for them and they wanted something at zero cost to the company.
It is obvious that the management virtual appliance has to be on a different virtual infrastructure to that which it is supporting, so I built another virtual appliance , this time on our Xen server. As the virtual appliance has to be built with windows XP as it's base and then security hardened, the Xen server has to have the Intel processor enhancements turned on in the BIOS, otherwise it just won't fly.
The Xen server is based on RedHat Enterprise Linux 5.4, which comes with a lot of enhancements to the virtual machine management program - virt-manager, and it is very straight forward now to configure new virtual machines.
All I had to do to allow remote management of this appliance was to turn on the terminal services process within XP, and now people can use the "remote desktop connection" program to access this VM and control the ESXi servers using vSphere client.
Xen offers great performance, and this solution works really well, and didn't cost a penny.
Friday, 20 November 2009
If you want real virtual speed with your Jumpbox appliances use Xen not ESXi
As you will have seen on my blog recently we had a situation that meant I had to move one of our Jumpbox virtual appliances from a failed Xen server to a new ESXi server. Now these servers are exactly the same specification, HP DL380 G5 with 32GB RAM and 2 x Dual Core Intel Xeon CPU's , so not exactly supercomputers, but more than enougth to do what we want with them.
Well here is the thing, Jumpbox say that VMware are one of their main supported platforms and , Tier 1 partners I think they call it, and open source Xen is Tier 3. So how come then the virtual appliance runs significantly faster on Redhat Enterprise than it does on Vmware ESXi? When I say significantly, I'm not joking. The virtual appliance is the moinmoin wiki. On the ESXi platform trying to edit a post is painfully slow, 30 seconds to open the editor. On Xen it is 1-2 seconds at most, so I don't need a stop watch to see something is wrong.
I have gone through the settings for the Vmware server, something I don't have to do with Xen, and given it garanteed resources and CPU power, no difference. I could, if I fancied wasting a small part of my life, investigate the Advanced settings for the ESXi server, but again why would I when with Xen it just flys?
I don't know the answer thats for sure, and especially when you know that the Jumpbox appliance is running with the QEMU hardware emulator on Xen, as it's not para-virtualized! Emulators as I'm sure you know are not supposed to be that fast.
I think I'm going to chat to Jumpbox about this, as it really does seem odd. The only thing that may have affected the performacne is the fact that I had to migrate the appliance to ESX format from Server format, but surely once this process is completed the virtual image should be good to go.
Well here is the thing, Jumpbox say that VMware are one of their main supported platforms and , Tier 1 partners I think they call it, and open source Xen is Tier 3. So how come then the virtual appliance runs significantly faster on Redhat Enterprise than it does on Vmware ESXi? When I say significantly, I'm not joking. The virtual appliance is the moinmoin wiki. On the ESXi platform trying to edit a post is painfully slow, 30 seconds to open the editor. On Xen it is 1-2 seconds at most, so I don't need a stop watch to see something is wrong.
I have gone through the settings for the Vmware server, something I don't have to do with Xen, and given it garanteed resources and CPU power, no difference. I could, if I fancied wasting a small part of my life, investigate the Advanced settings for the ESXi server, but again why would I when with Xen it just flys?
I don't know the answer thats for sure, and especially when you know that the Jumpbox appliance is running with the QEMU hardware emulator on Xen, as it's not para-virtualized! Emulators as I'm sure you know are not supposed to be that fast.
I think I'm going to chat to Jumpbox about this, as it really does seem odd. The only thing that may have affected the performacne is the fact that I had to migrate the appliance to ESX format from Server format, but surely once this process is completed the virtual image should be good to go.
Thursday, 12 November 2009
Upgrading VMware tools in your Jumpbox virtual appliance
If you migrate a Jumpbox virtual appliance between virtual hosts, for instance, form a VMware Server or VMware workstation to an ESXi server, the already installed configs and installed drivers maybe out of date or the wrong version, and the management screens will complain and let you know about it. This is very easily cured.
Firstly , make sure you have ssh enabled on your virtual machine, and log in as root or admin. Once logged in, go back to your management application, which for ESXi will be the vSphere Client, and select the virtual machine and select install vmware tools from the right button click on that virtual appliance.
This will have effectively mount an iso with the files on, which you must now mount from your ssh terminal window using a command like this:
mount /dev/cdrom /media/cdrom - (you may need to create that directory)
They move into that directory and cp the file VMwareTools-4......(whatever).tar.gz to say /tmp
Go into /tmp and untar the above file, and then move into the directory it creates.
Run the following command and hit enter when asked, after reading the output, but for a standard Jumpbox, just hitting enter will do:
./vmware-install.pl
At the end of the process you can either reboot the virtual machine, or type in the following command:
/etc/init.d/networking stop; rmmod pcnet32; rmmod vmxnet; modprobe vmxnet; /etc/init.d/networking start
Make sure you have the semi colons and type it all on one line.
Voila, you now have the latest vmware tools, which means you are running the optimum networking drivers which is important for performance
Firstly , make sure you have ssh enabled on your virtual machine, and log in as root or admin. Once logged in, go back to your management application, which for ESXi will be the vSphere Client, and select the virtual machine and select install vmware tools from the right button click on that virtual appliance.
This will have effectively mount an iso with the files on, which you must now mount from your ssh terminal window using a command like this:
mount /dev/cdrom /media/cdrom - (you may need to create that directory)
They move into that directory and cp the file VMwareTools-4......(whatever).tar.gz to say /tmp
Go into /tmp and untar the above file, and then move into the directory it creates.
Run the following command and hit enter when asked, after reading the output, but for a standard Jumpbox, just hitting enter will do:
./vmware-install.pl
At the end of the process you can either reboot the virtual machine, or type in the following command:
/etc/init.d/networking stop; rmmod pcnet32; rmmod vmxnet; modprobe vmxnet; /etc/init.d/networking start
Make sure you have the semi colons and type it all on one line.
Voila, you now have the latest vmware tools, which means you are running the optimum networking drivers which is important for performance
Moving a Jumpbox virtual appliance from Xen to VMware ESX
We had a server failure here yesterday , which was a standalone Redhat Xen virtual server with a few non critical applications on, thus the single server. While we were waiting for HP to get a new motherboard delivered I decided we needed to get our Wiki back and running quickly, and the only available virtual server was one running VMware ESXi.
When you download a Jumpbox appliance it comes ready to run on several types of virtual environment, but VMware ESX is not one of them. It happily supports VMware workstation or server, but the filesystem on ESX is different.
There are two ways to convert the virtual image, the easy way or the hard way, both work.
The easy way is to download the VMware converter utility which basically takes the uncompressed virtual appliance you downloaded, and automagically uploads it to your ESX host , if you have it on line. You can just convert the appliance and upload it yourself later if you prefer.
Job done. I could then get on with setting the IP address of the virtual machine back to it's original setting and restoring from backup it's complete configuration and data. Took about 20 minutes, but you would need to factor in the size of your appliance, the speed of your network and the size of the backup. That is one of the great things about Jumpbox virtual machines, their backup and restores are a nailed on perfect solution and have worked here everytime. We happen to use an NFS mount on our NAS server, but you can back up to Amazon EC2 if you were web connected.
The second way , is to manually upload the virtual appliance files to the ESX datastore, and then run the vmfstools from an ssh shell. Setting up the shell on ESXi is a job in itself, go here or here for more info.
There is a detailed article on doing this here.
I think you will agree that using the converter tool is just a little easier ;-).
When you download a Jumpbox appliance it comes ready to run on several types of virtual environment, but VMware ESX is not one of them. It happily supports VMware workstation or server, but the filesystem on ESX is different.
There are two ways to convert the virtual image, the easy way or the hard way, both work.
The easy way is to download the VMware converter utility which basically takes the uncompressed virtual appliance you downloaded, and automagically uploads it to your ESX host , if you have it on line. You can just convert the appliance and upload it yourself later if you prefer.
Job done. I could then get on with setting the IP address of the virtual machine back to it's original setting and restoring from backup it's complete configuration and data. Took about 20 minutes, but you would need to factor in the size of your appliance, the speed of your network and the size of the backup. That is one of the great things about Jumpbox virtual machines, their backup and restores are a nailed on perfect solution and have worked here everytime. We happen to use an NFS mount on our NAS server, but you can back up to Amazon EC2 if you were web connected.
The second way , is to manually upload the virtual appliance files to the ESX datastore, and then run the vmfstools from an ssh shell. Setting up the shell on ESXi is a job in itself, go here or here for more info.
There is a detailed article on doing this here.
I think you will agree that using the converter tool is just a little easier ;-).
Subscribe to:
Posts (Atom)





