Tuesday, July 27, 2010

Virtualization new era starts with KVM...

KVM (Kernel-based Virtual Machine) has been accepted by kernel gurus such as Linus Torvalds and Andrew Morton for inclusion in version 2.6.20 of the Linux kernel, developers said earlier this week. The system consists of a loadable kernel module and a user component, and is licensed under the GNU General Public License.

KVM links: KVM website, KVM whitepaper, Qumranet,

KVM is a patch to the Linux kernel that is more like VServer, Solaris containers, or microkernels [see footnote], where the OS still sits directly on the hardware. Some aspects of the current KVM release (mostly pulled from their FAQ):

  • KVM guest OSs appear as a process and can be managed with top, kill, etc.
  • KVM requires either a VT capable Intel processor or an SVM capable AMD processor (which is a currently a big limitation for grid providers but this will become less and less of an issue as older clusters are phased out).
  • Uses QEMU for guest instantiation, but is not an emulator itself
  • Runs Windows 32bit already (with no apci)
  • I have yet to figure out if it relies on these kernel enhancements for OS level virtualization
  • The current implementation should probably be seen as a preview, Fraser Campbell reports that it was “decidedly slow” when he tried it.

Tuesday, June 22, 2010

memory ballooning

Memory ballooning allows you to have your guest dynamically change it’s memory usage by evicting unused memory during runtime. This is a useful feature because it reduces the impact your guest can have on memory usage of your host by giving up unused memory back to the host.

Certain guests (only Linux at the moment) have a balloon driver, so the host can have the guest allocate a certain amount of memory which the guest won't be able to use anymore and it can then be freed on the host.

Below command gives the information regarding free memory. Using balloon command you can change guest machine to change it’s memory allocation to the specified amount in MB which is 800MB in the below example.

(qemu) info balloon

The syntax for the command to actually perform memory ballooning is as follows.

(qemu) balloon 800


What is QEMU ?

QEMU is a FAST! processor emulator using dynamic translation to achieve good emulation speed.

QEMU supports two operating modes:

User-mode emulation allows a process built for one CPU to be executed on another (performing dynamic translation of the instructions for the host CPU and converting Linux system calls appropriately).

Full System mode emulation allows emulation of a full system,(for example a PC), including one or several processors and various peripherals. It can be used to launch different Operating Systems without rebooting the PC or to debug system code. including processor and assorted peripherals.

For system emulation, the following hardware targets are supported:

  • PC (x86 or x86_64 processor)
  • ISA PC (old style PC without PCI bus)
  • PREP (PowerPC processor)
  • G3 Beige PowerMac (PowerPC processor)
  • Mac99 PowerMac (PowerPC processor, in progress)
  • Sun4m/Sun4c/Sun4d (32-bit Sparc processor)
  • Sun4u/Sun4v (64-bit Sparc processor, in progress)
  • Malta board (32-bit and 64-bit MIPS processors)
  • MIPS Magnum (64-bit MIPS processor)
  • ARM Integrator/CP (ARM)
  • ARM Versatile baseboard (ARM)
  • ARM RealView Emulation/Platform baseboard (ARM)
  • Spitz, Akita, Borzoi, Terrier and Tosa PDAs (PXA270 processor)
  • Luminary Micro LM3S811EVB (ARM Cortex-M3)
  • Luminary Micro LM3S6965EVB (ARM Cortex-M3)
  • Freescale MCF5208EVB (ColdFire V2).
  • Arnewsh MCF5206 evaluation board (ColdFire V2).
  • Palm Tungsten|E PDA (OMAP310 processor)
  • N800 and N810 tablets (OMAP2420 processor)
  • MusicPal (MV88W8618 ARM processor)
  • Gumstix "Connex" and "Verdex" motherboards (PXA255/270).
  • Siemens SX1 smartphone (OMAP310 processor)
  • Syborg SVP base model (ARM Cortex-A8).
  • AXIS-Devboard88 (CRISv32 ETRAX-FS).
  • Petalogix Spartan 3aDSP1800 MMU ref design (MicroBlaze).

For user emulation, x86, PowerPC, ARM, 32-bit MIPS, Sparc32/64, ColdFire(m68k), CRISv32 and MicroBlaze CPUs are supported.


Building the QEMU accelerator

$ git://git.sv.gnu.org/qemu.git or http://git.sv.gnu.org/r/qemu.git
$ $ cd qemu
$ ./configure
$ make
$ make install

QEMU usage:

This command will create a 500MB hard disk image in QEMU's "qcow" format

qemu-img create -f qcow c.img 500M

$ qemu-img create -f qcow c.img 128M
Formating 'c.img', fmt=qcow, size=131072 kB
$
In this command the -f option is for the disk image format. The following formats are supported: raw, qcow, cow, vmdk and cloop. See also: .img and .iso.

Now you have an emulated disk (c.img) and a CD-ROM from which you can install your operating system. The next step is to install the operating system on your hard disk. This is done simply with qemu:

$ qemu -hda c.img -cdrom linux.iso -boot d

This will boot a virtual machine with 64MB of memory, booting from c.img.

$ qemu -hda c.img -boot c -m 64 -vnc :1

Wednesday, May 5, 2010

Top 10 stupid questions people ask you obvious situations

1. At the movies: When you meet acquaintances/friends…

Stupid Question:- Hey, what are you doing here?
Answer:- Dont u know, I sell tickets in black over here..

2. In the bus: A heavy lady wearing pointed high-heeled shoes steps on your feet…
Stupid Question:- Sorry, did that hurt?
Answer:- No, not at all, I’m on local anesthesia…..why don’t you try again.

3. At a funeral: One of the teary-eyed people ask…
Stupid Question:- Why, why him, of all people.
Answer:- Why? Would it rather have been you?

4. At a restaurant: When you ask the waiter
Stupid Question:- Is the “Butter Paneer Masala” good??
Answer:- No, its terrible and made of adulterated cement.
We occasionally also spit in it.

5. At a family get-together: When some distant aunt meets you after years
Stupid Question:-Munna,Chickoo, you’ve become so big.
Answer:- Well you haven’t particularly shrunk yourself.

6. When a friend announces her wedding, and you ask…
Stupid Question:- Is the guy you’re marrying good?
Answer:- No,he’s a miserable wife-beating isensitive lout…it’s just the money.

7. When you get woken up at midnight by a phone call…
Stupid Question:- Sorry. were you sleeping?
Answer:- No. I was doing research on whether the Zulu tribes in Africa marry or not. You thought I was sleeping…. you dumb witted moron.

8. When you see a friend/colleague with evidently shorter hair…
Stupid Question:- Hey have you had a haircut?
Answer:- No, its autumn and I’m shedding……

9. At the dentist when he’s sticking pointed objects in your mouth…
Stupid Question:- Tell me if it hurts?
Answer:- No it wont. It will just bleed.

10. You are smoking a cigarette and a cute woman in your office asks…
Stupid Question:- Oh, so you smoke.
Answer:- Gosh, it’s a miracle …………it was a piece of chalk and now it’s in flames!!!