Libvirt und Qemu-KVM unter CentOS kompilieren

Zuerst müssen einige Pakete installiert werden:
# yum install libpciaccess-devel device-mapper-devel libxml2-devel python-devel libnl-devel

Libvirt Code runterladen, entpacken, konfigurieren, kompilieren:

cd /usr/src
wget http://libvirt.org/sources/libvirt-1.0.6.tar.gz
tar xzfv libvirt-1.0.6.tar
rm libvirt-1.0.6.tar
cd libvirt-1.0.6 
./configure --prefix=/usr --localstatedir=/var --sysconfdir=/etc
make -j9
make install
ldconfig

Libvirt kann nun gestartet und zum Autostart hinzugefügt werden:
# service libvirtd start
# chkconfig libvirtd on

Das ganze für Qemu:

yum install glib2-devel autoconf automake libtool
cd /usrc/src
wget http://wiki.qemu-project.org/download/qemu-1.4.2.tar.bz2
tar xzfv qemu-1.4.2.tar
rm qemu-1.4.2.tar.bz2
cd qemu-1.4.2.tar
./configure
make
make install

Nun können neue VMs erstellt werden. Es muss beachtet werden das als Emulator /usr/local/bin/qemu-system-x86_64 eingetragen wird.

####################

Mögliche Fehler:

1) Sofern libvirtd folgende Fehlermeldung liefert(/var/log/libvirt/libvirtd.log):
error : virJSONValueToString:1150 : internal error No JSON parser implementation is available

muss ein json Parser nachinstalliert werden:

yum install yajl-devel

Danach muss erneut das configure, make und make install für libvirt ausgeführt werden. Beim configue muss man --with-yajl anhängen.

2) Probleme mit Zugriffsrechten:
sollte man unerklärbare Fehlermeldungen bezüglich Zugriffsrechten bekommen (access denied for /var/…) hilft es libvirt mit einer bestimmten Usergruppe für Qemu zu konfigurieren. Dazu hängt man an den configure Befehl --with-qemu-user=qemu --with-qemu-group=qemu an.

Nach einem make und make install muss noch ein chown root:kvm /dev/kvm ausgeführt werden, danach sind die Zugriffsprobleme verschwunden. Damit die Zugriffsrechte auch nach einem reboot passen muss in die Datei /lib/udev/rules.d/65-kvm.rules mit folgendem Inhalt erstellt werden:
KERNEL=="kvm", GROUP="kvm", MODE="0660"

3) Libvirt kann qemu-kvm nicht finden
Erhalt man beim Befehl virsh version folgende Ausgabe:
virsh version Compiled against library: libvirt 1.0.6
Using library: libvirt 1.0.6
Verwende API: QEMU 1.0.6
Fehler: Abruf der Hypervisorversion scheiterte
Fehler: Interner Fehler Geeigneter Emulator für x86_64 konnte nicht gefunden werden

liegt es höchstwahrscheinlich daran das neuere Vanilla Versionen von qemu-kvm (die originalen Versionen der Entwickler, ohne Patches irgendwelcher Distributionen) sich unter /usr/local/bin/qemu-system-x86_64 ablegen, libvirt aber unter /usr/bin/qemu-kvm sucht. Dies lässt sich mit einem Symlink beheben:

ln -s /usr/local/bin/qemu-system-x86_64 /usr/bin/qemu-kvm

Danach passt die Ausgabe wieder:
-bash-4.1# virsh version
Compiled against library: libvirt 1.0.6
Using library: libvirt 1.0.6
Using API: QEMU 1.0.6
Running hypervisor: QEMU 1.4.2

-bash-4.1#

Posted in General, Linux, Virtualization | Leave a comment

Probleme mit Postfix

Wenn man SASL über Dovecot als Authentifizierungsbackend im Postfix benutzt und folgende Meldung erhält:
postfix/smtpd[4962]: connect from mein-tooler-server[seine.ip]
postfix/smtpd[4962]: warning: SASL: Connect to private/auth failed: Connection refused
postfix/smtpd[4962]: fatal: no SASL authentication mechanisms
postfix/master[1126]: warning: process /usr/lib/postfix/smtpd pid 4956 exit status 1
postfix/master[1126]: warning: /usr/lib/postfix/smtpd: bad command startup -- throttling
postfix/master[1126]: warning: process /usr/lib/postfix/smtpd pid 4957 exit status 1

sollte man einfach mal Dovecot starten, dann klappts auch ;)

Posted in General, Linux | Leave a comment

1und1 – Support at its best

Bei 1und1 ein Ticket eröffnet:

Sehr geehrte Damen und Herren,

seit gestern ist die von Ihnen gestellte Fritzbox 7390/Homeserver 50.000 defekt. Das zugehörige Netzteil liefert die geforderte Spannung von 12V, allerdings leuchtet an der Fritzbox keine einzige LED und Sie ist weder per WLAN noch LAN erreichbar. Auch das Trennen vom Stromnetz über mehrere Stunden führte beim nachfolgenden Wiederanschluss zu keinem Erfolg. Bitte schicken Sie mir schnellstmöglich ein Ersatzgerät.

Mit freundlichen Grüßen…

Reaktion von 1und1:
Autoreply mit Infos zum einrichten eines Routers + Ticket geschlossen

wtf

Posted in General | Leave a comment

Best of Geburtstagswünsche

[16:47:41] вσηєѕ™: ahjo..Alles Gute zum Geburtstag.. auf das jeder Code den du schreibst funktioniert. :) :D

Posted in General, Nerd Stuff | Leave a comment

Nerdig ist

Von https://9gag.com/marcoflores12

Posted in General, Nerd Stuff | Leave a comment

Nerdig ist

Gesehen bei http://pr0gramm.com/#newest/*/96486/2013/04/16j4lw

Posted in General, Nerd Stuff | Leave a comment

Linux Short Tip

Installation von MySQL Workbench ohne einen Oracle Account:
Einfach hier herunterladen :)

Posted in General, Linux, Short Tips | Leave a comment

Nerdig ist:

Posted in General, Nerd Stuff | Leave a comment

Linux Short Tip

Update von Archipel Client sowie Agent, Einrichtung von Websockets zur Performancesteigerung

Hier gibt es den Changelog der Archipel Updates: Changelog

Zum updaten des Clients hilft folgendes Script:

#!/bin/bash
cd /WEBSERVER
rm archipel -r
wget http://nightlies.archipelproject.org/latest-archipel-client.tar.gz
gunzip latest-archipel-client.tar.gz
tar xf latest-archipel-client.tar
rm latest-archipel-client.tar
mv Archipel archipel
chown WEBSERVER-USER:WEBSERVER-USER archipel

Den Archipel Agent updaten:
# git auschecken falls noch nicht getan:

git clone https://github.com/ArchipelProject/Archipel.git

# ansonsten das ausgecheckte git updaten:

git pull
git checkout @beta6
cd ArchipelAgent
python2.7 buildAgent -d

Zur Benutzung der Websockets müssen wir node.js installieren, dies geht unter einem Gentoo ejabberd wie folgt:
# Zuerst folgenden Part aus der /etc/jabber/ejabberd.cfg löschen oder den Port verlegen:

{5282, ejabberd_http, [
             http_bind,
             http_poll,
             web_admin
            ]},

Nun das eigentliche nodjs+module installieren

echo ">=net-libs/nodejs-0.10.0 ~amd64" >> /etc/portage/package.keywords
emerge -v nodejs expat screen
npm install log4js 
npm install eventpipe 
npm install ws 
npm install tav 
npm install dns-srv 
npm install ejs 
npm install node-uuid 
npm install node-lumberjack
npm install --python=$(which python2.7) ltx 
npm install --python=$(which python2.7) underscore 
npm install --python=$(which python2.7) node-expat 
cd /usr/src
git clone https://github.com/dhruvbird/node-xmpp-bosh.git
cd node-xmpp-bosh
screen ./run-server.js

Nun müssen noch einige Anpassungen an Archipel vorgenommen werden damit es mit Python2.7 gestartet wird und nicht 3.2 (was in vielen vielen Fehlermeldungen resultiert):
1. In der /usr/bin/runarchipel die Shebang Zeile von /usr/bin/python auf /usr/bin/python2.7 ändern
2. Am Anfang des Init Scripts für Archipel(/etc/init.d/archipel):

PYTHON=$(which python2.7)
$ARCHIPEL --config="$ARCHIPEL_CONF_FILE" >> /var/log/archipel-startup.log 2>&1</code> umändern in <code>$PYTHON $ARCHIPEL --config="$ARCHIPEL_CONF_FILE" >> /var/log/archipel-startup.log 2>&1

Nun kann Archipel gestartet werden:

/etc/init.d/archipel start

Über WEBSERVER/archipel klappt nun weiterhin der Login sofern man unter ‘XMPP Service’ nun ‘ws://FQDN:5280/’ und nicht ‘https://FQDN:5280/http-bind’ eingibt :)

Posted in General, Linux, Short Tips, Virtualization | Leave a comment

Rules of the Internet

1. Do not talk about /b/
2. Do NOT talk about /b/
3. We are Anonymous
4. Anonymous is legion
5. Anonymous never forgives
6. Anonymous can be a horrible, senseless, uncaring monster
7. Anonymous is still able to deliver
8. There are no real rules about posting
9. There are no real rules about moderation either – enjoy your ban
10. If you enjoy any rival sites – DON’T
11. All your carefully picked arguments can easily be ignored
12. Anything you say can and will be used against you
13. Anything you say can be turned into something else – fixed
14. Do not argue with trolls – it means that they win
15. The harder you try the harder you will fail
16. If you fail in epic proportions, it may just become a winning failure
17. Every win fails eventually
18. Everything that can be labeled can be hated
19. The more you hate it the stronger it gets
20. Nothing is to be taken seriously
21. Original content is original only for a few seconds before getting old
22. Copypasta is made to ruin every last bit of originality
23. Copypasta is made to ruin every last bit of originality
24. Every repost is always a repost of a repost
25. Relation to the original topic decreases with every single post
26. Any topic can be easily turned into something totally unrelated
27. Always question a person’s sexual preferences without any real reason
28. Always question a person’s gender – just in case it’s really a man
29. In the internet all girls are men and all kids are undercover FBI agents
30. There are no girls on the internet
31. TITS or GTFO – the choice is yours
32. You must have pictures to prove your statements
33. Lurk more – it’s never enough
34. There is porn of it, no exceptions
35. If no porn is found at the moment, it will be made
36. There will always be even more fucked up shit than what you just saw
37. You can not divide by zero (just because the calculator says so)
38. No real limits of any kind apply here – not even the sky
39. CAPSLOCK IS CRUISE CONTROL FOR COOL
40. EVEN WITH CRUISE CONTROL YOU STILL HAVE TO STEER
41. Desu isn’t funny. Seriously guys. It’s worse than Chuck Norris jokes.
42. Nothing is Sacred
43. The more beautiful and pure a thing is – the more satisfying it is to corrupt it
44. Even one positive comment about Japanese things can make you a weeaboo
45. When one sees a lion, one must get into the car.
46. There is always furry porn of it.
47. The pool is always closed.

Posted in General, Nerd Stuff | Leave a comment