Kernel Virtual Machine and Informix

Under: | |

Motivated by article on using Xen and Informix on Developerworks (http://www.ibm.com/developerworks/db2/library/techarticle/dm-0807fuerderer/index.html) and by Eric's comment I'll try to give a similar step-by-step explanation on how to setup KVM virtual machines on Linux box if you need a playground to test new features or proof-of-concept projects. Originally, I commented it seems easier to setup KVM than Xen, and hopefully I'll show it is. Except maybe for one bit :) And that's networking. More on that later. I'm assuming the next hardware configuration:

  • Linux box with Debian or Ubuntu installed (32 bit in my case)
  • CPU that supports virtualisation (egrep "vmx|svm" /proc/cpuinfo)

First, install the following packages:

  • uml-utilities
  • kvm
  • vde2
  • qemu
  • dnsmasq

Then, append following modules to /etc/modules

  • kvm_intel
  • tun

If you have AMD processor use kvm_amd instead of kvm_intel. Load/test new modules before proceeding:

modprobe kvm_intel

modprobe tun

Up to now everything is once off task. You need root/sudo privileges to do it. We have all necessary packages and kernel modules loaded (and configured for possible subsequent machine reboots).

Next for the virtual machine (VM) creation. Create an empty disk image:

qemu-img create -f qcow vm-disk.img 4G

Assuming you have a ISO image of your operating system for the new virtual machine in guestos.iso (Debian or Ubuntu, of course :)), install your guest OS like this:

kvm -no-acpi -m 384 -cdrom guestos.iso -hda vm-disk.img -boot d

And that's about it. If you're satisfied with your guest OS installation, power off the VM and in subsequent startups change your "-boot" flag from 'd' to 'c' to boot from the first virtual hard disk, not from ISO image. Install IDS as usual and start using it.

In the next blog entry I'll show how to setup networking both between the VM's and outside world. We'll need it if we want to setup any useful Informix environment and access it from outside of the VM itself.

The third entry will show how to very quickly create a new VM by copying the existing one and changing just a few config params. Any feedback appreciated!

Kernel Virtual Machine and Informix

Davorin,

thank you for writing this interesting blog entry.

I'm sure it helps people working on Linux and looking for possible virtualization possibilities with Informix.

-Eric

How do I post a new message on this board?

I got into this screen bey clicking on "Add a new comment" but that makes it look like a reply to dkremenjas's post. Sorry about that. But I don't see any button that says "Post new topic".

Bit of help, please anyone?

Thanks.
-- Jacob

Re: How do I post a new message on this board?

Jacob,

you can send me an email (eric@informix-zone.com) with one sentence about what you like to blog about and I will upgrade your account to be a trusted user. Then you will be able to create your own blog entries.

However, if you have a support question regarding Informix, I would suggest that you post your question to this IBM forum:

IBM IDS Developer and User Forum

The forum is monitored by the IBM support engineers and you will get qualified answers there.

Thank you.

-Eric