Smoothwall Firewall project

Showing posts with label VMware. Show all posts
Showing posts with label VMware. Show all posts

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.

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

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 ;-).

Monday, 14 September 2009

Latest VMware workstation release works well with Ubuntu 2.6.31 kernel



I recently upgraded the kernel on my notebook to play with the kernel mode setting to speed up the graphics with the Intel graphics card, which it did admirably, so I would be loathed to go back to an earlier kernel.

VMware and the latest kernels haven't always got along nicely , but on this occasion it was simply a matter of attempting to start VMware player, it detected a new kernel, and compiled the drivers for me, can't get much easier than that.

It then allowed me to start my old VMware images without a hitch.

Here is a screenshot of what it did:



The version for Linux has come a long way since it's early days, and it really is very simple to use now for even the most new learners of the platform.

The only problem that I'm currently having with this version of workstation is the resume from suspend ,which is extremely slow, but this could be down to the debug code in the installation. VirtualBox truly puts it to shame on the same hardware currently, but only a true comparison can be once it is released.

Thursday, 11 June 2009

Getting a Jumpbox VM to work with Redhat EL 5 64 bit

If you use virtualization a lot , then I'm sure you will have come across a great company that offers a whole range of pre-built open source virtual images. That company is Jumpbox. I have used several of their images with great success, and the time to deploy is extremely quick, especially with VMware ESX or VMware server.

On this occasion though I wanted to get a moinmoin wiki going on a 64bit Redhat Xen server, and the default install script supplied with the images is for 32bit systems. It fails, telling you it can't find qemu, which is true as it won't given the default script. Also note that you must have hardware virtualization switched on in the BIOS to get these images to work on 32 or 64 bit systems.

You have to make a minor change to one part of the config file, JumpBox.xen , simply because this is where RH put the 64bit version of qemu.

Here is the section that needs changing.

devfiles = [
'/usr/lib/xen/bin/qemu-dm',
'/usr/lib/xen-ioemu-3.0/bin/qemu-dm'
]

I changed the line '/usr/lib/xen/bin/qemu-dm' to '/usr/lib64/xen/bin/qemu-dm'

You then use the start script "xm create -c JumpBox.xen", and the virtual machine is then visible in the virtual manager on the host server.

Saturday, 4 April 2009

Using VMware workstation on Ubuntu to manage your ESX environment

The perceived wisdom in VMware circles is that the machine that handles your ESX server licenses and management virtual centre should be installed onto a normal server with a copy of a Microsoft OS installed.
In an effort to leverage ever last once out of my virtualized infrastructure , I decide the other day to install the network components of my ESX setup on a windows XP virtual image on my desktop. The installation went without a hitch, and once the license server was up and running I was able to log into the management software, via the virtual centre client without a hitch. Now this was on a quad core workstation, and I only used the built in SQL database for the management software instead of a full oracle or MSSQL database, but it is running extremely well with Ubuntu as the host operating system for VMware workstation.

I would not recommend this obviously for a large data centre implementation, but for testing or a small implementation this works a treat, and it also saves using another PC and Ubuntu is an excellent host for the setup.

Sunday, 22 March 2009

Using VMware to move an IT department across London

I have been using virtualization in many forms now for years, and when the job appeared to move my IT department across London, with as little disruption as possible, I thought VMware player and workstation could come to my aid, and they did.

The key tool that really helped me was a free one from VMware called VMware converter, which allows you to virtualize a windows installation on a physical machine to a virtual image. It is not a quick process, and you have to get the timing right with the users data, but machines can be done over night, so no disruption there.

Once all the machines were done, it was just a matter of moving all those images to the new premises along with any other data that had been captured after the image was made. We did this with a NAS server, which was small and compact, but held 2TB of data, as some of these virtual images were quiet large, though you can shrink them when you convert them, which we did.

We deployed all of these images onto machines onot quad core HP machines with Ubuntu Linux 8.04 and VMplayer 2.0. We could have used VMware workstation, but then not all of the users ever need to create new images or change their existing one. We there bought only a handful of workstation licences so that power users could create or manage the images for others.

This allowed all of the staff to turn up on the Monday morning with their machines exactly as they had left them on the Friday evening, no downtime, and no wasted time having to re-install the same applications onto new machines.

If the team had all been using virtual images in the first place , this would have made this whole process even easier, and it is another good reason for people to start using virtualized desktops.

It does also open up the possibility of having a thin Hypervisor layer on the desktop so that all it does is service the needs of the virtual client, very much like they are doing in the server world with Ubuntu JEOS. It also allows the team to use many different virtual images for all sorts of development tasks which is extremely useful, which is a great side affect of this process.

A great feature of all of the components used in this solution is that they are all free , apart from VMware workstation, and it would be possible to do exactly the same thing using open source components , if there were either a good P2V ( physical to virtual) tool, or even one that converts VMware images to Xen or KVM.

It worked perfectly, and has been doing so for over a year now, so I can heartily recommend this process to anyone looking to achieve the same sort of move.

Friday, 13 March 2009

Using VMware Server to help save the Planet

I know that all the many new forms of Virtualization can be put to all sorts of tasks today, but I used VMware server 2 the other day to save having to deploy a screen and keyboard for a Windows application box. I have been using and looking at the latest KVM hypervisor in Ubuntu as this I feel will be the future of Virtualization on the Open Source roadmap, but for this implementation I felt VMware would do the job quickly, and without fuss.

The requirement was to set up a simple Windows machine to load the license manager for Mercury Loadrunner performance tool, which will only run on Windows. Now we could have just dumped this onto a lightly loaded windows server, if we had any, which we don't, so I decided to turn this into an XP virtual image.

Normally, this would require you to have the box setup with a screen and keyboard, which is a complete waste of equipment, and makes managing this single application box a real problem.

So as I try and Virtualize everything these days, I decided to Virtualize the XP instance, and install it on the same box , just with Ubuntu server 8.10 and VMware server 2.0 (latest build).

This now means I can stick that box in the server room with no screen and keyboard and manage it remotely with the VMware console and VNC , alongside all my other virtual images. That's because Linux allows me to run it without a screen attached.It will also benefit from all the backup services that are provided there and a computer monitor didn't need to be manufactured or ever powered on.

We can also use this virtual image for other small application requirements as they come along, so the effect will only be more positive over time. I have already thought that we can use it as a TFTP server for network equipment configuration file backups.

I did have some fun and games getting VMware web manager to work on this box, which was down to a miss configuration of the loopback network interface, but it now runs a treat. It would have been helpful to have more diagnostic output from the Java servlets, but that's another tale.

Thursday, 1 January 2009

Happy New Year Tux

I read a blog by a long time Linux supporter , Stephen J Vaughan, and he made a statement that in his opinion the year of the Linux desktop had already come and gone. Well I have been mulling over this thought for a few days and I have to say I agree with him.

I'm currently posting this from my Eeepc running Eeebuntu Linux, and I haven't used anything on my desktop/laptop computer since 1998 that wasn't a version of one kind of Linux or another. As I work in the IT industry and have to communicate with other people who use Microsoft, it is obvious that it is perfectly possible for them to co-exist, as I'm doing it on a daily basis.

I'm also a big user of virtual environments, and I have an XP virtual machine on my works desktop, but I honestly haven't powered that up in long time. I tend to use the virtualisation software, KVM at the moment, for testing new operating systems, like Opensolaris etc.

Yes I do agree with you Stephen,the perennial question no longer needs to be asked, it is as irrelevant as asking if this is going to be the year of the laptop.

I think a far more interesting question, is when will Microsoft deliver a decent and relevant operating system since the release of XP seven years ago? Linux is delivering today on a whole range of products, including multiple processor types. I can get the same command prompt on everything from an IBM z90 mainframe to my Google phone, seemless. Same Bash, same commands, no new interface to learn and assimilate.

I also use firefox, which is a great broswer, but more importantly it also runs on every operating system I need to use, again no need to learn another application, just because I have to work with Solaris today. Can you say the same about IE. Suddenly their technological silo concept looks very dated and very last century.

I think the ball is firmly in Redmonds court to deliver, the view from planet Tux is looking decidedly rosey.

So my new years question has to be , "When are Microsoft going to deliver anything Interesting".

Wednesday, 24 December 2008

Why do I use Ubuntu?

I just read this meme from Jono Bacon, and he asks all users of this operating system to say why they use it. I thought that was a decent challenge and one worth taking up.

I have been using Linux for over a decade now, thanks to someone called Paul Branston, who I worked with at Freeserve in Leeds. Paul had been using Unix/Linux since birth I think, and a person whose gravitas when he spoke about Operating Systems was definitely important to take notice of. I was working at Freeserve mainly on Firewalls and networking but also did work on the Microsoft clusters they used, really buggy and unreliable things, but thats another tale.

I used Windows as a desktop system, simple because like most other techies it came on the PC I was given. I experienced many problems with it, and it kept crashing , but I hadn't been inclined to look for anything to replace it. Paul recommend I give Linux a go on my laptop and see how it got on. Well it was a Toshiba laptop with Red Hat 5.0, and getting it installed was like wrestling with a snake. Laptop hardware then was not the same as todays.

I have used Sun OS for years, and had learned the command line in University, so I roled up my sleeves and kept at it. I eventually got it all working, even the built in modem, and just stuck with Red Hat , and after Redhat changed, just moved onto Fedora Linux. They offer a great Linux distro, but Fedora does have some drawbacks for new users, mostly media support. So when I had an issue upgrading from Fedora 8 to Fedora 9 I thought I would give Ubuntu a try.

Well I have to say I'm glad I did, as moving to Ubuntu is worth the effort just for the package manager. It is a well rounded Linux distro that currently does everything you need to get up and running quickly and efficiently. I have installed it onto every machine I own, and every friends and family machine that I look after and it has been extremely reliable. I do use an Ubuntu derivative ,Linux Mint , where I feel the user doesn't want to do any work after installing.I have bought several machines from Dell with Ubuntu pre-installed and they have been extremely reliable and useful.

Today I work on an Ubuntu distro, Eeebuntu, release for the Asus Eeepc netbooks, so I've now installed it there as well. It works extremely well on these small footprint machines.

As I sit and type this post today, I think that for an all round desktop Operating System , this sets the bench mark. I still keep an eye on what the others are doing, and Fedora 10 has received good reviews, but I don't feel the need to move back at the moment. I have installed it in a virtual image, and that is were it will stay for now.

So yes I'm glad I moved and I would recommend it to anyone wanting to give Linux a try.

Ubuntu

Wednesday, 3 September 2008

Googles new browser shows potential - but is it just the start of something bigger?

I suppose a lot of people were caught off guard with the launch on Monday of Googles' new Chrome internet browser. There have been rumours coming out of California for a while about projects they were working on, a Linux OS being the loudest , outside of the published labs site, but this caught me by surprise.

Unfortunately for someone who only uses Linux on all of his machines, I had to dust off my VMware virtual machine with windows XP , to install this beta. Google have told me that they are working hard on the MAC and the Linux versions and they will be delivered soon, but we shall see. If you go to the download site with a Linux browser you can register your email address to be updated when it is ready. Register for Linux version

The install was very painless, and because every person in the office had downloaded the beta, the install executable was already in the networks proxy cache, so it was almost instantaneously retrieved. Installing it was a matter of closing the browser you originally used to download it, so chrome could grab the bookmarks etc, and that was it. As an aside I would recommend reading the comic book introduction to chrome as it does contain some very interesting information on how the browser fits together. I especially like the sandbox security segregation of each tab, and the fact the whole project is open source, and based on the great work of the KDE developers in the form of Webkit.

The first thing that really hits you is the speed of the browser, especially as I was running this in a virtual machine. As this is an early beta it can only improve over time, and must be a real concern for IE8 which is already getting a reputation as being bloated and slow. The interface is uncluttered, which I liked, and the trusty old combo of Ctrl-T gives you a new tab. These tabs are easily moved around , and can be dragged into new windows if you want. The ability to look at the resources that each tab is using is very handy, just by pressing Shift-Escape. You can then click on the nerd button to have a look in more detail. The chrome configuration options offers the usual settings, including the proxy you use, SSL certificates etc.

There is an incognito tab selection, which means that once you kill that tab, all browsing history gets destroyed, and Google says that you might use this for buying flowers for your loved one, I'm sure there are other uses no doubt.The new single URL bar does indeed work well, with anything you type bringing up previously loaded web pages or Google searches. It also remembers searches you did while on Amazon for instance, so they also will appear when you start typing in the bar.

At the time of righting there didn't appear any easy way to install extensions, RSS feeds or manage bookmarks, like Firefox allows, but I'm sure this is coming. Adobe Flash installed easily enough so I can't imagine the guys at Google have left this out of their plans. You can also set-up web application launchers from the options menu, so you can have one-click access to Gmail for instance. This is very similar to Mozilla prism, so not that ground breaking

This is just a first look, and once it is available on Linux, and there are a decent amount of extensions I will take another look and see how it compares with Firefox 3, which to be fair is still a fantastic browser, and the browser I will continue to use for the foreseeable future.

I do think though this raises some very interesting technical and strategic issues. This browser has to be one of the most powerful and technically advanced yet delivered by anyone, and it would not take that much effort to put a small virtual layer underneath it to offer a full solution for SaaS or webapps. This would then create an environment that does not need a monster Intel PC to run on, and could use an Eeepc 1000 or a Dell 910 Inspiron for instance. Could this be one of the pieces with Google Gears that needed to fall into place for Google to offer an extremely lightweight Operating System with embedded Browser? I for one will be watching this part of the potential development space very closely.