[Pkg-libvirt-maintainers] Bug#598149: Bug#598149: libvirt-bin: autostart fails on reboot

Jean-Louis Dupond jean-louis at dupond.be
Mon Sep 27 08:26:43 UTC 2010


On Mon, 27 Sep 2010 09:06:22 +0200, Guido Günther <agx at sigxcpu.org> wrote:
> Hi Jean,
> Are you using dependency based booting? Please check if the network is
> fully up when libvirt-bin starts (e.g. by dumping the output of
> ifconfing in the init script). It should be since we have a dependency
> on $network in the init script.
> Cheers,
>  -- Guido

Hi Guido,

I am using squeeze with dependency based booting.

So I modified the libvirt-bin in init.d:
  start)
        if check_start_libvirtd_option; then
                log_daemon_msg "Starting $DESC" "$NAME"
                if running ;  then
                        log_progress_msg "already running"
                        log_end_msg 0
                        exit 0
                fi
                rm -f /var/run/libvirtd.pid
                /sbin/ifconfig > /root/if-boot
                start-stop-daemon --start --quiet --pidfile $PIDFILE \
                        --exec $DAEMON -- $libvirtd_opts
                if running; then
                        log_end_msg 0
                else
                        log_end_msg 1
                fi
        fi
        ;;


After a reboot I checked /root/if-boot.
All the tap devices were created successfully, but still I got the
following error:

Sep 27 10:21:22 cloud libvirtd: 10:21:22.407: error :
qemudReadLogOutput:2118 : internal error Process exited while reading
console log output: char device redirected to /dev/pts/1#012could not open
/dev/net/tun: Permission denied#012
Sep 27 10:21:22 cloud libvirtd: 10:21:22.407: error :
qemuAutostartDomain:827 : Failed to autostart VM 'dupondje': internal error
Process exited while reading console log output: char device redirected to
/dev/pts/1#012could not open /dev/net/tun: Permission denied#012


What I also see in the libvirt logs:

On reboot it starts with:
LC_ALL=C PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
HOME=/ QEMU_AUDIO_DRV=none /usr/bin/kvm -S -M pc-0.12 -enable-kvm -m 1024
-smp 2,sockets=2,cores=1,threads=1 -name dupondje -uuid
28e9972d-c3ef-dfff-792e-5f80cd51a68a -nodefaults -chardev
socket,id=monitor,path=/var/lib/libvirt/qemu/dupondje.monitor,server,nowait
-mon chardev=monitor,mode=readline -rtc base=utc -boot dc -drive
if=none,media=cdrom,id=drive-ide0-1-0,readonly=on,format=raw -device
ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 -drive
file=/var/lib/libvirt/images/dupondje,if=none,id=drive-virtio-disk0,boot=on,format=raw
-device
virtio-blk-pci,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,id=virtio-disk0
-device
virtio-net-pci,vlan=0,id=net0,mac=52:54:00:xxx:xx:xx,bus=pci.0,addr=0x6
-net tap,ifname=tap2,script=no,vlan=0,name=hostnet0 -chardev pty,id=serial0
-device isa-serial,chardev=serial0 -usb -vnc 127.0.0.1:0 -vga cirrus
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3
char device redirected to /dev/pts/1
could not open /dev/net/tun: Permission denied

When I manually do /etc/init.d/libvirt-bin restart it does: (see the
HOME=/root USER=root LOGNAME=root). But that should make any difference?
LC_ALL=C PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
HOME=/root USER=root LOGNAME=root QEMU_AUDIO_DRV=none /usr/bin/kvm -S -M
pc-0.12 -enable-kvm -m 1024 -smp 2,sockets=2,cores=1,threads=1 -name
dupondje -uuid 28e9972d-c3ef-dfff-792e-5f80cd51a68a -nodefaults -chardev
socket,id=monitor,path=/var/lib/libvirt/qemu/dupondje.monitor,server,nowait
-mon chardev=monitor,mode=readline -rtc base=utc -boot dc -drive
if=none,media=cdrom,id=drive-ide0-1-0,readonly=on,format=raw -device
ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 -drive
file=/var/lib/libvirt/images/dupondje,if=none,id=drive-virtio-disk0,boot=on,format=raw
-device
virtio-blk-pci,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,id=virtio-disk0
-device
virtio-net-pci,vlan=0,id=net0,mac=52:54:00:xx:xx:xx,bus=pci.0,addr=0x6 -net
tap,ifname=tap2,script=no,vlan=0,name=hostnet0 -chardev pty,id=serial0
-device isa-serial,chardev=serial0 -usb -vnc 127.0.0.1:0 -vga cirrus
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3

Thanks for the follow up!






More information about the Pkg-libvirt-maintainers mailing list