LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud
User Name
Password
Linux - Virtualization and Cloud This forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.

Notices


Reply
  Search this Thread
Old 07-26-2011, 05:56 PM   #1
rhel5
Member
 
Registered: Mar 2009
Location: Bay Area, CA
Distribution: Redhat Enterprise Linux
Posts: 59

Rep: Reputation: 15
RHEL6.1 virt-manager error


I did a quick search but came up empty handed.

I am getting this error when I run virt-manager command:

[root@test-lnx Packages]# virt-manager
Traceback (most recent call last):
File "/usr/share/virt-manager/virt-manager.py", line 26, in ?
import libvirt
ImportError: No module named libvirt

Can someone please help me out? - Thanks much!!!

I have installed all the required virtualization packages outlined on the Redhat Virtualization Document.

[root@test-lnx Packages]# rpm -qa | grep -i kvm
qemu-kvm-0.12.1.2-2.160.el6.x86_64
qemu-kvm-tools-0.12.1.2-2.160.el6.x86_64

[root@test-8200e-lnx Packages]# rpm -qa | grep -i virt
libvirt-devel-0.8.7-18.el6.i686
libvirt-0.8.7-18.el6.x86_64
libvirt-python-0.8.7-18.el6.x86_64
perl-Sys-Virt-0.2.5-1.el6.x86_64
libvirt-java-0.4.7-1.el6.noarch
libvirt-client-0.8.7-18.el6.x86_64
libvirt-cim-0.5.11-3.el6.x86_64
fence-virtd-libvirt-0.2.1-8.el6.x86_64
fence-virtd-multicast-0.2.1-8.el6.x86_64
fence-virtd-0.2.1-8.el6.x86_64
libvirt-devel-0.8.7-18.el6.x86_64
virt-v2v-0.7.1-3.el6.x86_64
libvirt-client-0.8.7-18.el6.i686
libvirt-cim-0.5.11-3.el6.i686
fence-virtd-serial-0.2.1-8.el6.x86_64
virt-viewer-0.2.1-3.el6.x86_64
virt-what-1.3-4.4.el6.x86_64
virt-top-1.0.4-3.8.el6.x86_64
python-virtinst-0.500.5-3.el6.noarch
virt-manager-0.8.6-4.el6.noarch
libvirt-java-devel-0.4.7-1.el6.noarch
libvirt-qpid-0.2.22-6.el6.x86_64
 
Old 07-26-2011, 06:47 PM   #2
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653
Please verify libvirt-python is ok - 'rpm -V libvirt-python'

Last edited by kbp; 07-26-2011 at 06:51 PM.
 
Old 07-27-2011, 01:00 PM   #3
rhel5
Member
 
Registered: Mar 2009
Location: Bay Area, CA
Distribution: Redhat Enterprise Linux
Posts: 59

Original Poster
Rep: Reputation: 15
Thanks for replying back!

I figured out the problem... Rookie mistake!

My path variable was not properly set. Once I set it to the local /bin:/sbin:/usr/bin:/usr/sbin path, it worked like a charm.

It's strange how running /usr/bin/virt-manager also gives the same error. My guess it that the py script probably use the existing environment variables which was pointing somewhere else in my case.

virt-manager command is working now!

Now I have a new error:

It says "Error: No hypervisor options were found in this connection.

This usually means that QEMU or KVM is not installed on your machine, or the KVM modules are not loaded."

I already have QEMU/KVM installed

[root@test-8200e-lnx Packages]# rpm -qa | grep kvm
qemu-kvm-0.12.1.2-2.160.el6.x86_64
qemu-kvm-tools-0.12.1.2-2.160.el6.x86_64

KVM Modules seem to be loaded

[root@test-8200e-lnx Packages]# modprobe -l | grep -i kvm
kernel/arch/x86/kvm/kvm.ko
kernel/arch/x86/kvm/kvm-intel.ko
kernel/arch/x86/kvm/kvm-amd.ko

Last edited by rhel5; 07-27-2011 at 01:08 PM. Reason: updated new error
 
Old 07-27-2011, 07:36 PM   #4
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653
Strange that you have both amd and intel modules loaded, are you mixing cpus in the same server?
 
Old 07-28-2011, 08:19 PM   #5
D1ver
Member
 
Registered: Jan 2010
Distribution: Slackware 13.37
Posts: 598
Blog Entries: 3

Rep: Reputation: 190Reputation: 190
Hello,
I was getting a similar error regarding
Code:
"No hypervisor options were found in this connection. This usually means that QEMU or KVM is not installed on your machine, or the KVM modules are not loaded."
I found the answer in some obscure mail list response. I had to go into the computers Bios, in CPU settings and enable virtualisation support, which for some reason was disabled.

I hope this helps.
 
Old 07-29-2011, 11:14 AM   #6
dyasny
Member
 
Registered: Dec 2007
Location: Canada
Distribution: RHEL,Fedora
Posts: 995

Rep: Reputation: 115Reputation: 115
modprobe -l shows the modules you have, not the modules you've loaded.

try lsmod | grep kvm
 
Old 07-30-2011, 04:30 PM   #7
rhel5
Member
 
Registered: Mar 2009
Location: Bay Area, CA
Distribution: Redhat Enterprise Linux
Posts: 59

Original Poster
Rep: Reputation: 15
Thanks so much guys... I'll try it out later.

@ kbp - those modules were the default on boot. I'm running Intel Core i7 (2ng gen Sandybridge) on my desktop.

I'll try going into the BIOS and see if there's an option for virtualization...

On side note, cat /proc/cpuinfo does show it has flag to support virtualization.

I'll provide the lsmod output as dyasny suggested if it still doesn't work

===================

I tried running virtualization on my old laptop (32-bit), and I won't be able to do virtualization tests on that. The RHEL6 32-bit media doesn't have kvm package. I just found out that kvm is supported on 64-bit only. I just learned something new.
 
Old 07-31-2011, 02:34 AM   #8
dyasny
Member
 
Registered: Dec 2007
Location: Canada
Distribution: RHEL,Fedora
Posts: 995

Rep: Reputation: 115Reputation: 115
flags are system capabilities, if vt/vtx/vtd are disabled in bios, the flags will still be displayed.

btw, if VT is disabled and you enable it, make sure you also powercycle the system, just saving the bios changes is not enough for VT to kick in
 
Old 08-01-2011, 03:48 PM   #9
rhel5
Member
 
Registered: Mar 2009
Location: Bay Area, CA
Distribution: Redhat Enterprise Linux
Posts: 59

Original Poster
Rep: Reputation: 15
^^^ Thanks for the lesson. > dyasny

I checked the bios for any virtualization support flags that I may miss. There isn't an option for that in my bios. I am running it on HP 8200 Elite Desktop with Intel(R) Core(TM) i5-2500 CPU (not COre i7 as stated earlier).

Here is the CPU Flag:

flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 x2apic popcnt aes xsave avx lahf_lm ida arat epb xsaveopt pln pts tpr_shadow vnmi flexpriority ept vpi

lsmod shows:

[root@test-8200e-lnx ~]# lsmod
Module Size Used by
fuse 66138 0
ip6table_filter 2855 0
ip6_tables 19424 1 ip6table_filter
ebtable_nat 1975 0
ebtables 18101 1 ebtable_nat
ipt_MASQUERADE 2400 3
iptable_nat 6124 1
nf_nat 22788 2 ipt_MASQUERADE,iptable_nat
nf_conntrack_ipv4 9440 4 iptable_nat,nf_nat
nf_defrag_ipv4 1449 1 nf_conntrack_ipv4
xt_state 1458 1
nf_conntrack 79643 5 ipt_MASQUERADE,iptable_nat,nf_nat,nf_conntrack_ipv4,xt_state
ipt_REJECT 2349 2
xt_CHECKSUM 1269 1
iptable_mangle 3283 1
iptable_filter 2759 1
ip_tables 17765 3 iptable_nat,iptable_mangle,iptable_filter
bridge 74177 0
nfs 379314 74
nfsd 305544 13
lockd 74268 2 nfs,nfsd
nfs_acl 2613 2 nfs,nfsd
auth_rpcgss 44925 2 nfs,nfsd
exportfs 4202 1 nfsd
autofs4 27683 10
bnx2fc 104984 0
cnic 51939 1 bnx2fc
uio 10940 1 cnic
fcoe 20504 0
libfcoe 37740 2 bnx2fc,fcoe
libfc 105341 3 bnx2fc,fcoe,libfcoe
8021q 24413 0
garp 7310 1 8021q
stp 2107 2 bridge,garp
llc 5608 3 bridge,garp,stp
scsi_transport_fc 52002 3 bnx2fc,fcoe,libfc
scsi_tgt 12107 1 scsi_transport_fc
sunrpc 242213 170 nfs,nfsd,lockd,nfs_acl,auth_rpcgss
cachefiles 37082 1
fscache 46761 2 nfs,cachefiles
ipv6 322899 77 cnic
dm_mirror 14067 0
dm_region_hash 12136 1 dm_mirror
dm_log 10120 2 dm_mirror,dm_region_hash
vhost_net 29524 0
macvtap 7867 1 vhost_net
macvlan 9986 1 macvtap
tun 16953 2 vhost_net
kvm 300283 0
uinput 8182 0
tpm_infineon 9019 0
wmi 6221 0
sg 30186 0
microcode 112845 0
snd_hda_codec_hdmi 24750 1
snd_hda_codec_realtek 324232 1
snd_hda_intel 25261 2
snd_hda_codec 86585 3 snd_hda_codec_hdmi,snd_hda_codec_realtek,snd_hda_intel
snd_hwdep 6714 1 snd_hda_codec
snd_seq 56557 0
snd_seq_device 6626 1 snd_seq
snd_pcm 84700 3 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec
snd_timer 23087 2 snd_seq,snd_pcm
snd 70053 13 snd_hda_codec_hdmi,snd_hda_codec_realtek,snd_hda_intel,snd_hda_codec,snd_hwdep,snd_seq,snd_seq_devic e,snd_pcm,snd_timer
soundcore 8052 1 snd
snd_page_alloc 8628 2 snd_hda_intel,snd_pcm
i2c_i801 11133 0
serio_raw 4816 0
iTCO_wdt 12060 0
iTCO_vendor_support 3022 1 iTCO_wdt
ext4 359703 2
mbcache 7918 1 ext4
jbd2 88800 1 ext4
sr_mod 16194 0
cdrom 39769 1 sr_mod
sd_mod 38196 4
crc_t10dif 1507 1 sd_mod
ahci 40197 3
e1000e 213969 0
ata_generic 3611 0
pata_acpi 3667 0
i915 429596 2
drm_kms_helper 34896 1 i915
drm 213686 3 i915,drm_kms_helper
i2c_algo_bit 5728 1 i915
i2c_core 31274 5 i2c_i801,i915,drm_kms_helper,drm,i2c_algo_bit
video 20966 1 i915
output 2471 1 video
dm_mod 75539 2 dm_mirror,dm_log
 
Old 08-02-2011, 01:38 AM   #10
dyasny
Member
 
Registered: Dec 2007
Location: Canada
Distribution: RHEL,Fedora
Posts: 995

Rep: Reputation: 115Reputation: 115
kvm 300283 0
is there

but no kvm_intel or ksm
 
Old 08-04-2011, 12:17 PM   #11
rhel5
Member
 
Registered: Mar 2009
Location: Bay Area, CA
Distribution: Redhat Enterprise Linux
Posts: 59

Original Poster
Rep: Reputation: 15
Thanks dyasny....

Looks like you found it! I think the reason is because it's missing the kvm_intel module as you stated.

The other laptop with kvm_intel and kvm module loaded at boot works fine with virt-manager.

Now how can I load the module?

I tried with modprobe kvm_intel, it give me an error:

[root@test-8200e-lnx ~]# modprobe kvm_intel
FATAL: Error inserting kvm_intel (/lib/modules/2.6.32-131.0.15.el6.x86_64/kernel/arch/x86/kvm/kvm-intel.ko): Operation not supported

If I try to force it to load I get this:

[root@test-8200e-lnx ~]# modprobe -f kvm_intel
FATAL: Error inserting kvm_intel (/lib/modules/2.6.32-131.0.15.el6.x86_64/kernel/arch/x86/kvm/kvm-intel.ko): Key was rejected by service
 
Old 08-04-2011, 03:25 PM   #12
dyasny
Member
 
Registered: Dec 2007
Location: Canada
Distribution: RHEL,Fedora
Posts: 995

Rep: Reputation: 115Reputation: 115
when you modprobe kvm_intel, what is shown in /var/log/messages?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Xen error on connection with virt-manager janinelumc Linux - Desktop 5 12-29-2010 08:05 AM
Virt-Manager - Error Message on Startup mickeyboa Fedora 0 06-27-2010 11:30 AM
LXer: Hacking libvirt/virsh/virt-manager/virt-install at Xen 4.0 Dom0 on top of Ubunt LXer Syndicated Linux News 0 05-06-2010 02:50 PM
LXer: Virt-install&Virt-manager at Xen 4.0-rc8 (2.6.32.10 pvops) Dom0 on top Ubuntu K LXer Syndicated Linux News 0 03-26-2010 09:41 PM
Debian 5.0 Network-Manager interfers with vnet0 bridging to eth0 for virt-manager coolphive Linux - Newbie 2 05-28-2009 08:51 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud

All times are GMT -5. The time now is 03:39 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration