2

I have built a Debian Live Stick using this guide and Jessie instead of Wheezy. The reason being I want to have a Live Stick with Cuckoo Sandbox and KVM/QEMU installed. I also had to switch syslinux with extlinux because FAT32 could not handle a filesystem with the VMs inside (>4gB size). I can boot it and everything seems in place, but a lot of daemons are not running.

Currently I am struggling to get libvirtd to run. I'm using xterm since gnome-terminal refuses to startup and I tried using /etc/init.d/libvirtd start and it fails:

libvirtd.serviceJob for libvirtd.service failed.

systemctl status libvirtd.service gives:

libvirtd.service: main process exited, code=exited, status=1/FAILURE
Failed to start Virtualization daemon.
Unit libvirtd.service entered failed state.

with journalctl -xn giving basically the same information.

Has anybody clues on how to get those daemons to run (at best at startup)?

Thanks and best regards

Edit 1

Ahhh, I found more information in the /var/log/libvirt/libvirtd.log

info : libvirt version: 1.2.9, package: 9+deb8u2 (buildd 2016-03-25-21:58.25 x86-csail-01)
error : virtFileGetHugepageSize:2934 : not a hugetlbfs mount: '/dev/hugepages'
error : virStateInitialize.749 : Initialization of QEMU state driver faild: internal error: not a hugetlbfs mount: '/dev/hugepages'
error : daemonRunStateInit:921 : Driver state initialization failed

Google tells me hugepages is for custom/bigger RAM pagesizes. But according to my /etc/libvirt/libvirtd.conf I have hugepages commented (which is the default)

Edit 2

For my libvirtd.conf. Note: I changed log_level back to 3.

Edit 3

I installed cuckoo and kvm using this guide although I altered a few steps (using stable instead of testing Debian), swapped some packages with others and left out packages not relevant for my use-case. When just now trying to install QEMU/KVM while on the live linux yields the same errors as when trying to start it. So I ran apt-get install qemu-kvm libvirt-clients libvirt-daemon virt-manager and added the user to the according groups:

usermod -a -G kvm cuckoo
usermod -a -G libvirt cuckoo

Edit 4

I altered the guide and I'll try to explain the important parts. I only have two users: root and cuckoo. sudo is not installed and cuckoo is in the cuckoo and the kvm and libvirt groups. It is responsible for running cuckoo and kvm/qemu.

Edit 5

While on the live system I removed kvm with

apt-get purge qemu-kvm libvirt-clients libvirt-daemon virt-manager
apt-get clean
apt-get autoremove

and reinstalled it with

apt-get install qemu-kvm libvirt-clients libvirt-daemon virt-manager

then I received then following error from apt

Job for libvirtd.service failed. See 'systemctl status libvirtd.service' and 'journalctl -xn' for details.
invoke-rc.d: initscript libvirtd, action "start" failed.
dpkg: error processing package libvirt-daemon-system (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up libx86-1:i386 (1.1+ds1-10) ...
Setting up bridge-utils (1.5-9) ...
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory

Maybe it has to do with the locales? I have a German keyboard layout installed and set /etc/default/locale to LANG=de_DE.UTF-8. Maybe this is wrong and also why gnome-terminal doesn't start?


2
  • Comments are not for extended discussion; this conversation has been moved to chat.
    – terdon
    Commented Aug 17, 2016 at 15:03
  • run locale-gen "de_DE.UTF-8" and dpkg-reconfigure locales and try again. Commented Aug 17, 2016 at 15:03

1 Answer 1

0

After much deliberation and messing around with configuration files and failed reinstall attempts, here is the solution if you are German:

locale-gen "de_DE.UTF-8"

dpkg-reconfigure locales

and reinstall the qemu-kvm components.

Edit for people from the future

This only works in this particular case as the initial "hugepage" errors were irrelevant. It turns out that they were just a by-product of errors that occurred during installation of the qemu-kvm components.

These errors themselves were due to the locale settings.

5
  • When doing the reconfiguation use "SPACE" to mark de_DE.UTF-8 and only then press "ENTER" so it really configure it. Commented Aug 17, 2016 at 15:12
  • What do locales have to do with hugepages? How does this solution work? Commented Aug 17, 2016 at 19:17
  • We established that the hugepage errors stopped a little while after beginning the troubleshooting process and OP tried to reinstall. The post install cleanup failed with an error about locales so I suggested this fix. This appears to have been the issue the whole time for this particular case. Commented Aug 17, 2016 at 19:20
  • Correct. Shall I remove the logs about hugepages? It might mislead people who are googling with similiar issues. Commented Aug 18, 2016 at 7:22
  • I edited my answer to clarify. Commented Aug 18, 2016 at 10:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .