Davomut
Posts: 3
Joined: Thu Feb 14, 2019 6:07 am

TeamSpeak 3 server with QEMU

Thu Feb 14, 2019 6:25 am

Hi. I just buy RPI 3 and I try runing TS3 server with QEMU with this instructions :
sudo apt-get build-dep qemu
wget http://wiki.qemu-project.org/download/q ... .0.tar.bz2
...extract...
./configure --target-list=i386-linux-user 2>&1 |tee configure.log
make -j4 2>&1 |tee build.log
sudo make install

wget http://dl.4players.de/ts/releases/3.0.1 ... .4.tar.bz2
tar xjvf teamspeak3-server_linux_x86-3.0.12.4.tar.bz2

Modifiy ts3server_minimal_runscript.sh for ease of use :
- ./ts3server [email protected]
+ /usr/local/bin/qemu-i386 ./ts3server [email protected]
Here above is old version from QEMU and TS3, but I try if its work like this.

OR :
wget https://download.qemu.org/qemu-3.1.0.tar.xz
tar xvJf qemu-3.1.0.tar.xz
cd qemu-3.1.0
./configure
make
But allways got :
[email protected]errypi:~ $ /home/pi/teamspeak3-server_linux_x86/ts3server_minimal_runscript.sh
/lib/ld-linux.so.2: No such file or directory
Any little help to push me?...please :-)

I know there is Exagear and it's working just fine for 72hours, but I don't really want to pay 30 dolars becouse just one software...it's lame! When if running RPI cost me 8-9 dollars max for a year.

Or where I can download Raspbian img with QEMU and other things what I need for TS3 server ready for working?

Or another suggestion to help me?

fruitoftheloom
Posts: 19561
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: TeamSpeak 3 server with QEMU

Thu Feb 14, 2019 1:53 pm

Davomut wrote:
Thu Feb 14, 2019 6:25 am
Hi. I just buy RPI 3 and I try runing TS3 server with QEMU with this instructions :
sudo apt-get build-dep qemu
wget http://wiki.qemu-project.org/download/q ... .0.tar.bz2
...extract...
./configure --target-list=i386-linux-user 2>&1 |tee configure.log
make -j4 2>&1 |tee build.log
sudo make install

wget http://dl.4players.de/ts/releases/3.0.1 ... .4.tar.bz2
tar xjvf teamspeak3-server_linux_x86-3.0.12.4.tar.bz2

Modifiy ts3server_minimal_runscript.sh for ease of use :
- ./ts3server [email protected]
+ /usr/local/bin/qemu-i386 ./ts3server [email protected]
Here above is old version from QEMU and TS3, but I try if its work like this.

OR :
wget https://download.qemu.org/qemu-3.1.0.tar.xz
tar xvJf qemu-3.1.0.tar.xz
cd qemu-3.1.0
./configure
make
But allways got :
[email protected]:~ $ /home/pi/teamspeak3-server_linux_x86/ts3server_minimal_runscript.sh
/lib/ld-linux.so.2: No such file or directory
Any little help to push me?...please :-)

I know there is Exagear and it's working just fine for 72hours, but I don't really want to pay 30 dolars becouse just one software...it's lame! When if running RPI cost me 8-9 dollars max for a year.

Or where I can download Raspbian img with QEMU and other things what I need for TS3 server ready for working?

Or another suggestion to help me?

If running Raspbian Stretch with Desktop Operating System then you can install Qemu from the repositories:

Code: Select all

sudo apt update
sudo apt install qemu
adieu

My other Computer is an Asus CS10 ChromeBit running Chrome Operating System.
HP Envy 4500 Wireless Printer supported by HPLIP software in Raspbian Buster.
Raspberry Pi Model 2B v1.1

Davomut
Posts: 3
Joined: Thu Feb 14, 2019 6:07 am

Re: TeamSpeak 3 server with QEMU

Thu Feb 14, 2019 4:05 pm

Ok, I did now, but still..../lib/ld-linux.so.2: No such file or directory

Davomut
Posts: 3
Joined: Thu Feb 14, 2019 6:07 am

Re: TeamSpeak 3 server with QEMU

Thu Feb 14, 2019 4:41 pm

Or i get :
[email protected]:~ $ /home/pi/teamspeak3-server_linux_x86/ts3server_startscript.sh start
Starting the TeamSpeak 3 server
/lib/ld-linux.so.2: No such file or directory
TeamSpeak 3 server could not start

BabySittor
Posts: 1
Joined: Fri Mar 08, 2019 8:32 am

Re: TeamSpeak 3 server with QEMU

Fri Mar 08, 2019 8:34 am

Hi ! I tried the same thing and I also got the same error message :cry:
If you found a solution can you tell me what to do to correct it ?

Inspir
Posts: 4
Joined: Thu May 09, 2019 6:06 pm

Re: TeamSpeak 3 server with QEMU

Thu May 09, 2019 6:17 pm

It seems like you are missing ld-linux.so.2 . Check out this link: https://unix.stackexchange.com/question ... l-via-qemu. I am also interested in installing TS3 on RPi, so I will see if it works.
You can also try full emulation, but it will be very slow. Install Debian or another x86 system on your PC using QEMU (minimal install, possibly try even a lighter distro), install TS3 server with systemd service to launch it on startup and launch the system image from Raspberry Pi. It will be a lot slower, however. Updating the system will be a pain.

fruitoftheloom
Posts: 19561
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: TeamSpeak 3 server with QEMU

Thu May 09, 2019 6:52 pm

Inspir wrote:
Thu May 09, 2019 6:17 pm
It seems like you are missing ld-linux.so.2 . Check out this link: https://unix.stackexchange.com/question ... l-via-qemu. I am also interested in installing TS3 on RPi, so I will see if it works.
You can also try full emulation, but it will be very slow. Install Debian or another x86 system on your PC using QEMU (minimal install, possibly try even a lighter distro), install TS3 server with systemd service to launch it on startup and launch the system image from Raspberry Pi. It will be a lot slower, however. Updating the system will be a pain.

The linked you posted stated Debian Armel, very old and obsolete Operating System which was only used for around 6 months when the first RPi model was released.


Debian Stretch has several packages relating to Qemu:

https://packages.debian.org/source/stretch/qemu
adieu

My other Computer is an Asus CS10 ChromeBit running Chrome Operating System.
HP Envy 4500 Wireless Printer supported by HPLIP software in Raspbian Buster.
Raspberry Pi Model 2B v1.1

Inspir
Posts: 4
Joined: Thu May 09, 2019 6:06 pm

Re: TeamSpeak 3 server with QEMU

Sat May 11, 2019 7:16 pm

Ok, so I have a nice tutorial about how to run any (lightweight) i386 or x86_64 program on your Raspberry. I managed to run a TeamSpeak3 server on my B+, but I currently can't join. I suspect that it's because B+ is too weak, as the CPU usage is constantly 100%, even though my RPi is overclocked to 1100MHz. You may be more lucky with a more powerful single board computer! This tutorial uses schroot and qemu-user static, Ubuntu image is created in it. If you want another distro, change a few commands!

EDIT: The tutorial below needs to be updated to use systemd-nspawn instead of schroot. Before I do this, you can Google about it! I was able to run a TS3 server and it almost fully works, not laggy at all!
On my Raspberry Pi B+! It takes 30 minutes to start (mainly precomputing puzzle), it spams with an error "Unsupported ancillary data: 0/8" in console, and it says that "myteamspeak id is invalid" and "The TeamSpeak server could not validate your myTeamSpeak ID. Some myTeamSpeak related services are not available." when joining the server. However, the server isn't laggy at all. The CPU usage is between 10% and 20% with two users on server.
This issue is probably a QEMU bug, maybe related to why Eltechs recommends older server version for RPi Zero and older (https://eltechs.com/teamspeak-3-server- ... y-pi-zero/). This doesn't mean I won't attempt to solve this issue! It's possible that this bug is solved in later QEMU versions.

1. Install required packages on your PC:

Code: Select all

sudo apt install debootstrap ubuntu-keyring
2. Create an image. It should be at least 450MiB, but I recommend more:

Code: Select all

sudo dd if=/dev/zero of=~/linux.img status=progress bs=1MiB count=1024
3. Format the image:

Code: Select all

sudo mkfs.ext4 -F ~/linux.img
4. Mount the image:

Code: Select all

mkdir ~/linux
sudo mount -o loop,rw ~/linux.img ~/linux
5. Install the system. Include any essential packages you may need:

Code: Select all

sudo debootstrap --include=ca-certificates,software-properties-common,nano,wget,curl,htop,screen,ncurses-term --arch=i386 bionic ~/linux
6. The system should now be installed. Unmount the file:

Code: Select all

sudo umount ~/linux
7. Copy the file to your RPi using any method.
Make it owned by root:

Code: Select all

sudo chown root ~/linux.img
Tip: if you have issues copying the file (it „hangs” at 100%, usually when your pendrive or SD is slow), remount your pendrive/microSD with „sync” option:

Code: Select all

sudo mount -o remount,rw,sync /path/where/drive/is/mounted
8. Install required software on your Raspberry:

Code: Select all

sudo apt install qemu-user-static schroot 
9. Create a file /etc/schroot/chroot.d/ubuntu on your Pi:

Code: Select all

[ubuntu]
description=Ubuntu 18.04
file=/home/pi/linux.img
root-users=username
users=username
type=loopback
personality=linux32
#message-verbosity=verbose #for debugging
9.1. Uncomment some lines in /etc/schroot/default/nssdatabases if you run DietPi!

Code: Select all

(…)
#services
#protocols
#networks
(...)
10. Mount the image:

Code: Select all

sudo mount -o loop,rw ~/linux.img ~/linux
11. Copy QEMU binary:

Code: Select all

sudo cp /usr/bin/qemu-i386-static ~/linux/usr/bin
12. Unmount the image:

Code: Select all

sudo umount ~/linux
13. Install (unpack) the software you want (e.g. TS3 server) in your home folder. Schroot mounts it by default in chrooted system, and it is a very useful option – you can e.g. update the image without touching your server and without a lot of downtime – you stop your server, replace the image with updated version and start the server again!
14. This is self-explanatory:

Code: Select all

schroot -c ubuntu
Tip: if you have any issues, uncomment the line "message-verbosity=verbose" in /etc/schroot/chroot.d/ubuntu and look into what is being printed! If schroot says that a file does not exist, it may be a file on your native system (you probably should look into /etc/schroot/default/nssdatabases then), or it might just mean that an executable file can't be executed for some reason - see if you copied QEMU correctly!
15. Start the server and enjoy (enjoy the utterly slow speed)!
Tip: if "sudo" does not work, try "sudo -S [command]"
TODO: Compile latest QEMU using latest GCC and use it. It may significantly improve speed and resolve some bugs!

I hope I helped someone to run a x86 program on his SBC! I wait for feedback and info whether anyone succesfully ran a TS3 server or another useful program!

You are free to modify and distribute this tutorial. In this case, it would be nice if you included a link to this thread and/or my username (I also use a nickname DarkoGNU)!

Inspir
Posts: 4
Joined: Thu May 09, 2019 6:06 pm

Re: TeamSpeak 3 server with QEMU

Wed May 15, 2019 6:55 pm

Hey! Does anyone here know something about QEMU and libraries? I have compiled QEMU 4.0.0, using default GCC (I'm still thinking about using latest GCC), but TeamSpeak 3 server still appears to be bugged. When I type lsof -p <TS3_PID> (on the host system), I get this:
https://pastebin.com/rctCLah2
When I run e.g. stat /lib/i386-linux-gnu/librt-2.27.so on the chrooted system, it says that the file exists. What is wrong? Can I fix it? I think that it is the only thing that prevents the TS3 from being fully functional (without saying that server license is invalid to every connected user).

EDIT: It appears that the "invalid myteamspeak id" issue is the result of a QEMU bug. I discovered it by running TS3 server in QEMU full system emulation using my x86 PC. I need to research it more by using latest QEMU instead of the one provided by Ubuntu repo and by seeing whether this issue persist when using KVM. If KVM (passing instructions to host CPU instead of emulation) resolves the issue, I am going to report a bug.
I have already devoted too much time to this crazy idea - running fully functional TS3 server on QEMU. I may not update the guide above, but I will think about it when I have some free time. Certainly, I won't work on it until the QEMU bug (which I'm almost sure exists and causes the issue with downloading revocation list, what causes the "red messages" on client) gets resolved.

Return to “Networking and servers”