Smoothwall Firewall project

Showing posts with label redhat. Show all posts
Showing posts with label redhat. 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.

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




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.

Monday, 31 October 2011

Using the lightweight Fedora LXDE desktop for snappier Virtual machines


While having a look at Fedora 16 beta within Virtualbox virtualization software, I decided to use a more lightweight desktop environment.

Over the last couple of years as hardware has improved the desktop systems that sit on top of X windows have started to become more complex and powerful, but as a side effect have become resource intensive, which is not ideal for virtual machines.

There are many great different types of lightweight desktop environments, but one that is now supported by all the main distributions is LXDE.

Fedora 16 installation was a breeze - though I recommend upgrading Virtualbox to version 4.1.4 before you start for better support.

The lighter desktop has indeed made a massive improvement over speed and repsonsiveness to the Gnome 3 shell I installed on the Fedora 15 image I tested.

The menus and layout my be a little legacy for some, and perhaps for everyday use, but when most of the time is spent in a terminal widow, that is not the end of the world.

Here is a snap of the initial machine once installed.





There are many new features in this release of Fedora, including the latest 3.1 kernel, deltarpms with presto , the use of systemd instead of the now very old SysV daemon management & control and the use of specifically locked ethernet hardware to configuration definitions - so you see p2p1 instead of eth0 for instance.

The final release is only a few days aways, and for people who like cutting edge open source software Fedora is a good choice.

Give it a try and see what you think.

Wednesday, 12 October 2011

The FUD used against Linux , really annoys me



If you are not familiar with the term FUD, it stands for Fear, Uncertainty and doubt, which are more commonly described as lies in technical circles. They are used by marketing people to stop people using others products, just in case.

Over the years I have seen this tactic used many times by large corporations to scare companies into buying their product's, but none have used it more often and more perniciously than Microsoft.

Well, they have tried everything against Linux, and have told lies by the bucket load, yet still the system gains market share, where today you can almost guarantee that if you go somewhere on the web, the server powering that site will be Linux.

I have also used it on my laptops for years, and this summer on holiday put it through it's paces , but taking it with me to do some work while on the road in Spain. It never missed a beat. Every little dusty side street eating house that offered WIFI, I could connect to, I could do whatever I needed, whenever I needed, without fail. The one device that did let me down on occasion was my iPad, rarely, but it did.

So the facts are Ubuntu Linux on my Dell laptop 100% success, Apple iPad 98% success.

I love my iPad, so I'm not making some cheap point about it , but a fact is a fact.

So the next time someone tells you something about Linux, do some research and find out the facts. Linux is not perfect, but then neither are any of the systems offered, but Linux is free and you can laways help make it better.

Less FUD, and more facts please.

Here is a link to try it for yourself.

Ubuntu Linux

Tuesday, 23 June 2009

Linux Chromium browser additional features added

Chromium new options screenshot

I downloaded the latest version of chromium for Linux on my Ubuntu Dell XPS 1330 this evening to have a look at converting the .deb files to rpms for another machine running Redhat using the Debian Alien utility, and I noticed the version had been bumped again to 3.0.191. So I gave it a quick once over and noticed that the options menu item "Personal Stuff" has become populated with considerably more choices. Here is a screen grab of the new options, which offer amongst other new features the ability to save your site specific passwords and manage them.

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.

Wednesday, 10 June 2009

Fedora 11 has been released




Fedora 11 Tour

The latest release of the Redhat Development distribution Fedora 11 has been launched and it is available for download. I suspect the mirrors will be red hot for the next couple of days/weeks, but this is a worthy replacement.

Have a look at the release notes here.

Release Notes

There are many new features, including updates to the Plymouth boot process with customisable themes. There still isn't a Dom0 for Xen, but this is slated to be released with Fedora 12 later in the year. As Redhat is moving more towards using KVM, and the debates about Xen getting included in the kernel upstream, this is not that surprising. There are however many new virtualization features that make this a moot point. You can always run the xenner application to work around running Xen Domu guests or just use Fedora 8 , which has Dom0 support.

Thursday, 4 June 2009

Using a Redhat Enterprise DVD iso as your repository




If you work with a lot of secure systems as I do, it is not always possible to have a direct connection to the Internet or indeed one at all. Now with Redhat Enterprise Linux this can be an issue, as you effectively lose access to the Add/Remove function of the operating system, so here is a way around the problem.



First we need to mount the iso image of the version of RHEL you have installed to a loopback device. You can do this simply from the command line, or if you are going to do this alot, you are better off putting the mount statement in your /etc/fstab file, look at the pictures for the syntax.

Once this is mounted on the directory you are going to use, you need to add a new repository file in the /etc/yum.repos.d directory, lets call it rhel-iso.repo, and again this is shown in detail in the picture. If you use the same directories as I have , then this will cause you less hassle when you try it.

Once you have added this file, and checked the iso has been mounted you need to set up yum, so firstly do this:

yum clean all

and then

yum update


The results should look like this:



You are now ready to go, so that when you click on Add/Remove software you will get a screen like this:



The only thing left to do is get the iso to automount, now if you look at the screen grab above, you will see that I'm using the mount -a command in the Gnome autostart sessions screen. You can do this in other ways, but as I'm going to be using the GUI, this works perfectly.

Voila, you now have full access to the RHEL 5 DVD/iso so you can install software once the server has been put in a cage, far from the rest of the Planet. You can also carry the iso around on your USB stick and use this technique when you need to install software.

Wednesday, 27 May 2009

New Ubuntu Magazine launched

Now, for a lot of Linux purists, this is about as close as you get to Microsoft launching their own proprietary distribution ;-)

The truth is, no matter how you cut and slice it, Ubuntu is the one distro out their that is getting onto millions of desktops, is being pre-installed on machines, and offers a great user experience. Yes, I know Fedora and Suse , name your favourite distro here, use the same basic components like Gnome, but the Ubuntu team have put together a decent desktop distro, and using the Debian package management system - apt - doesn't do them any harm either. Having worked with Redhat/Fedora yum for years, I know which one I prefer.

Another point I should mention here, and it is an extremely important issue, is that there is a lot more software more easily available for Ubuntu/Debian. Just look at my post on the site on how I had to muck around just to get truecrypt installed on Redhat.

Anyway, have a look here at what is being launched, and if you use Ubuntu, I would certainly give the first half dozen issues a go and see it you like it. The article in the first issue on package building for Debian has to worth the cover price alone.

Tuesday, 26 May 2009

Google Chromium goes Alpha release on Linux

I have been following the latest builds of Chromium on Linux, specifically Ubuntu as Fabien Tassin has done such a wonderful job of building the source using the Canonical launchpad system. An I noticed today that this has now gone Alpha release, so we can now start feeding back findings to the development team.

As the splash page says there is still things that don't work, and other things that need more work, but as I have posted before, this has started to be more stable by the release.

I have had a good look around the web for other system versions, for Fedora or Redhat without any luck, so if someone knows of a set of RPM's then I would be grateful, as it will save me building it from source on those environments.

See here for screenshot of the new Alpha splash screen:

chromium_linux_browser_alpha_version
Linux Chromium Alpha Release

Thursday, 21 May 2009

Installing Truecrypt 6.2.2 on Redhat enterprise with a xen kernel

I have just started a job where we are using RH 5 enterprise as our client of choice, and it has just reminded me why I moved to using Ubuntu from Fedora on the desktop. Don't get me wrong RH EL on the servers is great , and very stable, but when it comes to the client , the RPM dependancy hell can drive you to distraction.

Anyway, I had need to install Truecrypt onto one of the clients, and I fell into the RPM dependency hell, so I thought I would point out the RPMS you need to download and install to get this working easily on your Redhat client.

All the RPM's you need are listed below and the kernel I was using when I did it, I downloaded them all from here RPM's

Install in this order , this was down on a machine with the following kernel - 2.6.18-128.1.10.el5xen - so your versions could differ - check your kernel first with 'uname -a':


wxGTK-2.8.9-1el5.rf.i386.rpm
libfuse-2.7.4-1.el5.pp.i386.rpm
libfuse-kmdl-2.6.18-128.1.10.el5xe-2.7.4-8_10.el5.i686.rpm
fuse-2.7.4-8_10.el5.i386.rpm
truecrypt-6.2-2.el5.pp.i386.rpm

It works a treat , and does what I needed it to do, but with Ubuntu this would have been a simple single command, and the installation files were available directly from the application installation site, c'est la vie, I hope this saves you some time.

Friday, 24 April 2009

Centos 5 is an excellent Xen virtualization enterprise distribution

I had need to set up a Xen virtual server recently , and wanted to use the Redhat Enterprise 5 series to do some testing. Unfortunately these days, you only get 30 days update trial support so I decide to use a binary compatible distro instead and I picked on Centos. There are a few, but I have always had the best success with Centos, so why change a winning combination.

This has been around for a while now, and has been working hard to stay with the Redhat releases, and are only a month or two behind them when released. This is really a none issue for business users, as being at the cutting edge is exactly where they don't want to be.

I installed it on an AMD dual core X2 powered server, with 6GB of RAM and 5TB of disk space, which acts as my virtual testing server. As a virtual server it is not that large these days, but it allows me to run several virtual machines with ease.

The anaconda install process detected everything, and the for those people who are used to Fedora or Redhat , the process is identical (not surprising), with just a change of art work. It is a real credit here to Redhat for being a real community player and putting their source code out there for other projects to do this, and the Centos team for taking the time and effort to implement it. Just make sure you select the virtualize section when picking which applications to install on the server.
in
The new tools for managing both para-virtualized and full virtualized machines with Centos, using libvirt, worked without a single hitch, and I had an Ubuntu test virtual server up and running in literally minutes. The new GUI virtualization management tool works well. It is most definitely not a VMware virtual center or the Citrix Xen Enterprise management tools, but then it is free and for a simple virtual setup works well.

The performance was very good on this test server, and the Xen implementation - 3.0.3 - in the 5.2 release worked flawlessly.

If you are looking to build a virtual server for home or the office, then this distribution should be on your short list as it offers full functionality without the costs. You of course don't get the great technical support that Redhat offers, but the Centos community forums I looked at were full of quality answers, and anyone with a good background in IT infrastructure should not have any issues, unless you are a paper MCSE of course ;-)