Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
libvirt can't start kvm's after update
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
bookwood
Tux's lil' helper
Tux's lil' helper


Joined: 06 Oct 2005
Posts: 136
Location: Dortmund

PostPosted: Mon Dec 16, 2013 1:13 pm    Post subject: libvirt can't start kvm's after update Reply with quote

Hi all,
I use since 2 years libvirt on my laptop. Yesterday I switched to systemd, because I had a udev systemd blocker. I detect in libvirt the systemd useflag and aktivate it global. It's my Laptop and I use KDE with the kde systemd profile.

When I start my KVM vm in libvirt:
Code:
 
virsh # start integration
error: Failed to start domain integration
error: Launch helper exited with unknown return code 1


dmesg shows a systemd warning:
Code:

[ 5834.761980] systemd-sysctl[23994]: Overwriting earlier assignment of kernel/sysrq in file '/usr/lib64/sysctl.d/60-gentoo.conf'.
[ 5834.995605] device vnet0 entered promiscuous mode
[ 5835.105525] virbr3: port 2(vnet0) entered listening state
[ 5835.105551] virbr3: port 2(vnet0) entered listening state
[ 5835.247855] virbr3: port 2(vnet0) entered disabled state
[ 5835.248083] device vnet0 left promiscuous mode
[ 5835.248084] virbr3: port 2(vnet0) entered disabled state


The two years old very well working /etc/conf.d/net (since this update)
Code:

config_lo=( "127.0.0.1/8"
            "127.0.0.2/8" )
tuntap_tap0="tap"
bridge_br0="tap0 eth0"
#config_wlan0=( "null" )
config_eth0="null"
config_tap0="null"
depend_tap0() {
        need net.eth0
}
config_br0="dhcp"
mac_br0="xx:xx:0a:5b:xx:xx"
dhcpcd_br0=" -b -t 90 -h hal9000 "
depend_br0() {
        need net.tap0 net.eth0
}
brctl_br0="setfd 0 sethello 0 stp off"
fallback_br0="null"


I compare the permissions /dev/net/tun with an other machine where kvm and libvirt running fine, no change.
Code:

ls -l /dev/net/tun
crw-rw-rw- 1 root root 10, 200 16. Dez 16:43 /dev/net/tun

The qemu command from /var/log/libvirt/qemu/integration.log chrash like the following:
Code:


qemu-system-x86_64: -netdev tap,fd=20,id=hostnet0,vhost=on,vhostfd=21: TUNGETIFF ioctl() failed: Bad file descriptor
TUNSETOFFLOAD ioctl() failed: Bad file descriptor
qemu-system-x86_64: -netdev tap,fd=20,id=hostnet0,vhost=on,vhostfd=21: vhost-net requested but could not be initialized
qemu-system-x86_64: -netdev tap,fd=20,id=hostnet0,vhost=on,vhostfd=21: Device 'tap' could not be initialized


But tap0 exists
ifconfig tap0
Code:
 
tap0      Protokoll:Ethernet  Hardware Adresse 52:1a:b7:61:bd:a4 
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          Kollisionen:0 Sendewarteschlangenlänge:500
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)



my emerge --info
http://bpaste.net/show/159025/

I think it could be a systemd konfiguration issue?

Thanks in advance
Back to top
View user's profile Send private message
PeeJay
n00b
n00b


Joined: 15 Aug 2004
Posts: 46
Location: Sydney, Australia

PostPosted: Tue Dec 17, 2013 2:25 am    Post subject: Reply with quote

Have you got the tun module loaded? I had similar troubles recently which was caused by the tun module not being loaded for some reason.
Back to top
View user's profile Send private message
bookwood
Tux's lil' helper
Tux's lil' helper


Joined: 06 Oct 2005
Posts: 136
Location: Dortmund

PostPosted: Tue Dec 17, 2013 9:44 am    Post subject: Reply with quote

The tun module is loaded and vhost-net also:
Code:

lsmod | grep tun
tun                    16225  4

ll /dev/vhost-net
crw------- 1 root root 10, 238 Oct 31 19:46 /dev/vhost-net



My system runs two year's without problems since the update to systemd :?
Back to top
View user's profile Send private message
bookwood
Tux's lil' helper
Tux's lil' helper


Joined: 06 Oct 2005
Posts: 136
Location: Dortmund

PostPosted: Thu Dec 19, 2013 8:23 am    Post subject: Reply with quote

The problem is systemd:
https://bugs.gentoo.org/show_bug.cgi?id=493246
Now I will switch my system back to the main profile and I will try to switch back to udev to get a stable system again.

I think its not a good idea to update productive Gentoo libvirt/kvm hosts at the moment, because you got a broken system.
Back to top
View user's profile Send private message
bookwood
Tux's lil' helper
Tux's lil' helper


Joined: 06 Oct 2005
Posts: 136
Location: Dortmund

PostPosted: Mon Dec 23, 2013 12:56 pm    Post subject: Reply with quote

I solved the problem and uninstall banshee and switch to the default/linux/amd64/13.0/desktop/kde profile. The package banshee forces the installation of the gnome-settings-daemon and the systemd. I uninstall banshee, gnome-settings-daemon and systemd. Every systemd dependency is gone and I could reinstall udev-208.

Qemu and libvirt running fine again.
Back to top
View user's profile Send private message
miket
Guru
Guru


Joined: 28 Apr 2007
Posts: 510
Location: Gainesville, FL, USA

PostPosted: Mon Dec 23, 2013 2:29 pm    Post subject: Reply with quote

It's a great thing that you found what pulled in systemd as a dependency and saw 1) you could live without it and 2) it would not be overly painful to go back to a systemd-free system. Congratulations for getting back to a running system.

Your experience highlights the most troublesome aspect of systemd: it is the product of a developer who is intent on the rapid rollout of machine-breaking features without regard for sufficient testing and who has managed to cajole most of the world onto his bandwagon. It is a dangerous mix for anyone trying to keep his or her machines running stably.

It is really unfortunate that so may interesting tools are tied to libgnome. Gnome, unlike KDE, has saddled itself with hard dependencies on systemd and friends. KDE, fortunately, is more modular. It has to be: it works on many systems, including OSX and Windows.

I see systemd as being especially problematic in Gentoo. Whereas the builders of binary distributions can freeze at one set of packages and be sure that all the packages at their respective versions play nicely, Gentoo keeps up with the reckless pace of systemd and introduces periodic mayhem because of it.

Oh well, I'm afraid I'll rain on the parade a bit more. When I started three years ago or so with the idea of taking advantage of virtualization with KVM, I took a pretty good look at libvirt. I decided that though it looked nice, it just had too much in the way of dependencies. No libvirt for me. I worked out the networking according to the wiki and made scripts to give me my qemu command lines. I was in control of what it did and I was happy. Things have gone very well for me with KVM that way.

If you'd like a nice graphical VM configurer and launcher, I recommend AQEMU. I use that on a laptop to start Windows images so that I can test web pages in versions of MSIE, and the AQEMU works great. (I'm just glad I don't have to use Windows except for this testing!)

Good luck to you.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum