Pages

Unixbhaskar's Blog

Thursday, December 8, 2011

Using kvm on Arch Linux to install CentOS 6

This is mighty interesting and damn easy thing to do for better way to use and test new releases.I am gonna show you how you can exploit the power of KVM with minimal fuss.So here we go:

I am sitting on Arch Linux and got to bring in the kvm thing into the box..so I went ahead and do this :


bhaskar@ArchLinux_12:24:23_Thu Dec 08:~> sudo pacman -S qemu-kvm
resolving dependencies...
looking for inter-conflicts...

Targets (2): vde2-2.3.1-1 qemu-kvm-0.15.1-1

Total Download Size: 1.96 MB
Total Installed Size: 10.31 MB

Proceed with installation? [Y/n] y
:: Retrieving packages from extra...
vde2-2.3.1-1-i686 177.1K 58.0K/s 00:00:03 [#####################################################################] 100%
qemu-kvm-0.15.1-1-i686 1829.6K 62.8K/s 00:00:29 [#####################################################################] 100%
(2/2) checking package integrity [#####################################################################] 100%
(2/2) checking for file conflicts [#####################################################################] 100%
....
.....



Then I add myself to the kvm group like below:


bhaskar@ArchLinux_12:26:58_Thu Dec 08:~> sudo /usr/sbin/usermod -G kvm -a bhaskar

bhaskar@ArchLinux_12:27:12_Thu Dec 08:~> id bhaskar
uid=1000(bhaskar) gid=1000(bhaskar) groups=1000(bhaskar),92(audio),78(kvm)



Next, I modprobe two kernel module to integrate with the system like below:



bhaskar@ArchLinux_12:27:58_Thu Dec 08:~> sudo /sbin/modprobe kvm-intel

bhaskar@ArchLinux_12:28:10_Thu Dec 08:~> sudo /sbin/modprobe kvm



And the result shows like this :


bhaskar@ArchLinux_12:28:24_Thu Dec 08:~> sudo /bin/lsmod | grep kvm*
kvm_intel 116373 0
kvm 294406 1 kvm_intel



Then,the final step ,oh btw I have the ISO image of CentOS6 already downloaded in my system, so it easy to use...

So I went ahead like this to boot it from that ISO file by kvm:


bhaskar@ArchLinux_12:39:04_Thu Dec 08:~> qemu-kvm -enable-kvm -cdrom /home/bhaskar/Downloads/CentOS-6.0-i386-bin-DVD.iso


And here is how it look like the initial screen:



So ,pretty easy..huh..you can pass hell lot of option to that command line of qemu-kvm to fine tune you instances.

Hope this will help.

Cheers!
Bhaskar

Tuesday, December 6, 2011

How to get over Mutt's saga of "Unknown variables"

I have wrote an article about Mutt here . Now I have changed the system and trying to build it to different system and I am getting this errors:


bhaskar@GentooLinux_15:01:02_Tue Dec 06:~> mutt
Error in /home/bhaskar/.muttrc, line 12: imap_user: unknown variable
Error in /home/bhaskar/.muttrc, line 13: imap_pass: unknown variable
Error in /home/bhaskar/.muttrc, line 45: message_cachedir: unknown variable
Error in /home/bhaskar/.muttrc, line 58: smtp_url: unknown variable
Error in /home/bhaskar/.muttrc, line 59: smtp_pass: unknown variable
Error in /home/bhaskar/.muttrc, line 60: too few arguments



Pretty ordinary!! huh...no so..I was bemused for sometime then discover that when I pull in Mutt on Gentoo it failed to activate those flags and hence causing problem, here is the evidence of lacking those facilities:


bhaskar@GentooLinux_15:22:37_Tue Dec 06:~> mutt -v
Mutt 1.5.21 (2010-09-15, Gentoo 1.5.21-r1)
Copyright (C) 1996-2009 Michael R. Elkins and others.
Mutt comes with ABSOLUTELY NO WARRANTY; for details type `mutt -vv'.
Mutt is free software, and you are welcome to redistribute it
under certain conditions; type `mutt -vv' for details.

System: Linux 3.0.6-gentoo (i686)
ncurses: ncurses 5.9.20110404 (compiled with 5.9)
hcache backend: GDBM version 1.8.3. 10/15/2002 (built Aug 2 2011 22:18:59)
Compile options:
-DOMAIN
-DEBUG
+HOMESPOOL -USE_SETGID +USE_DOTLOCK +DL_STANDALONE -USE_FCNTL +USE_FLOCK
-USE_POP -USE_NNTP -USE_IMAP -USE_SMTP
-USE_SSL_OPENSSL -USE_SSL_GNUTLS -USE_SASL -USE_GSS -HAVE_GETADDRINFO
-HAVE_REGCOMP +USE_GNU_REGEX +COMPRESSED
+HAVE_COLOR +HAVE_START_COLOR +HAVE_TYPEAHEAD +HAVE_BKGDSET
+HAVE_CURS_SET +HAVE_META +HAVE_RESIZETERM
+CRYPT_BACKEND_CLASSIC_PGP -CRYPT_BACKEND_CLASSIC_SMIME -CRYPT_BACKEND_GPGME
-EXACT_ADDRESS -SUN_ATTACHMENT
+ENABLE_NLS -LOCALES_HACK +HAVE_WC_FUNCS +HAVE_LANGINFO_CODESET +HAVE_LANGINFO_YESEXPR
+HAVE_ICONV -ICONV_NONTRANS -HAVE_LIBIDN +HAVE_GETSID +USE_HCACHE
-ISPELL
SENDMAIL="/usr/sbin/sendmail"
MAILPATH="Maildir"
PKGDATADIR="/usr/share/mutt"
SYSCONFDIR="/etc/mutt"
EXECSHELL="/bin/sh"
MIXMASTER="mixmaster"
To contact the developers, please mail to .
To report a bug, please visit http://bugs.mutt.org/.

dgc.subjrx
fg.smarttime
vvv.initials
vvv.quote
vvv.nntp
patch-1.5.20hg.pdmef.progress.vl.2
rr.compressed
patch-1.5.4.lpr.collapse_flagged Lukas P. Ruf


The minus(-) prepended variables are not activated..so I need to activate them,which is causing trouble.

Now I need to reinstall mutt with all those enabled..so here we go :

First I have to set some use flags in /etc/portage/package.use/mutt.use file:


mail-client/mutt imap smtp pop gnutls mbox gpg smime sasl


And off I go to fetch Mutt one more time with those flags enable:


bhaskar@GentooLinux_15:35:56_Tue Dec 06:~> sudo emerge -av mutt

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild R ] mail-client/mutt-1.5.21-r1 USE="berkdb crypt gdbm gnutls* gpg* imap* mbox* nls pop* sasl* smime* smtp* ssl -debug -doc -idn -nntp -qdbm -sidebar -tokyocabinet" 0 kB

Total: 1 package (1 reinstall), Size of downloads: 0 kB

Would you like to merge these packages? [Yes/No] y



Look at the asterix appended values,which is exactly I did mentioned in the mutt.use file.


Now I can access Mutt without problem :)

Hope this will help.

Cheers!
Bhaskar