PDA

View Full Version : Linux Server in Virtual Machine



VJ
29-04-11, 17:43
Ok, With BT Infinity I get really good upload speeds and i'm making the most of them ;)
http://www.speedtest.net/result/1274060727.png (Just did this from my PC with WLAN, so actual speeds through LAN could be a bit higher.

Downstairs we have a PC with spec:
AMD Phenom II X6 1090T Black Edition @ 3.2Ghz
Asus M4A89GTD PRO/USB3
4Gb DDR3 2Ghz RAM (Some G.Skill, can't remember)
and a bunch of hard drives connected up.
Windows 7 Ultimate x64

Right now, we use this to host media to transcode/stream to our PS3 aswell as being the family PC.

I've installed WAMP, so i can use it as a webserver aswell as this PC is on most of the time.

Now, I also run Steam game servers off this like L4D etc. (only one at a time!), but due to this being a family PC (there's usually someone using it) so i cant RDP to it :(, I can't always make adjustments and correct errors in the console (that appears when you're running a server).

So, I'm thinking...
Install VirtualBox, Get Ubuntu Desktop working on it and then
Follow this http://www.virtualbox.org/manual/ch07.html to make use of Remote Virtual Display (VRDP).

This way, I should be able to use the Virtual Box Machine, even if someone else is using the PC locally downstairs. ? :D

Good Idea? :)

Spaceboy
29-04-11, 17:53
if the steam game server stuff is command line you could just install a telnet / ssh server and do it that way ?

Otherwise VirtualBox + linux server should work fine so long as you limit the resources it can use so it doesn't interfere with the the rest of the PC's functions. Again if there's command line only game servers then a minimal install with ssh would be the way forward :thumb:

VJ
29-04-11, 18:02
if the steam game server stuff is command line you could just install a telnet / ssh server and do it that way ?

Otherwise VirtualBox + linux server should work fine so long as you limit the resources it can use so it doesn't interfere with the the rest of the PC's functions. Again if there's command line only game servers then a minimal install with ssh would be the way forward :thumb:

it's close to command line, but it's not, the console is like an application itself i think. Well it runs as an executable and i've never been able to get it to run from the same command prompt :( I'll give the virtualbox a go. I think 512mb ram should be more than enough, and with DDR3 getting cheaper (kind of), might be able to upgrade to 8Gb Ram ;)

Spaceboy
29-04-11, 18:43
Any excuse for an upgrade :rolleyes: :D

sounds good mate :)

VJ
29-04-11, 19:31
hehe, well this remote stuff is working nicely ;)
http://img832.imageshack.us/img832/9632/remoteubuntu.png

now, I just need to write a script to make my life easy, like what i did before with batch files



@ECHO OFF

Echo Changing Directory to C:\Dedicated Servers\Steam
cd "C:\Dedicated Servers\Steam"

Echo Updating Counter-Strike: Source
Start "Counter-Strike: Source Update" /WAIT HldsUpdateTool.exe -command update -game "Counter-Strike Source" -dir "C:\Dedicated Servers\Steam\CounterStrikeSource"
Echo Finished...

Echo Updating Left 4 Dead
Start "Left 4 Dead Update" /WAIT HldsUpdateTool.exe -command update -game left4dead -dir "C:\Dedicated Servers\Steam\Left4Dead"
Echo Finished...


Echo Updating Left 4 Dead 2
Start "Left 4 Dead 2 Update" /WAIT HldsUpdateTool.exe -command update -game left4dead2 -dir "C:\Dedicated Servers\Steam\Left4Dead2"
Echo Finished...

Echo Updating Team Fortress 2
Start "Team Fortress 2 Update" /WAIT Hldsupdatetool.exe -command update -game tf -dir "C:\Dedicated Servers\Steam\TeamFortress2"
Echo Finished...

Echo Updating Synergy
Start "Synergy Update" /WAIT HldsUpdateTool.exe -command update -game synergy -dir "C:\Dedicated Servers\Steam\Synergy"
Echo Finished...

Echo Update Completed...

pause

i know the extension for linux scripts is .sh, ill find a guide online then interpret it :)

VJ
30-04-11, 17:44
ok, its working well :)

Just a big issue i think.
Which type of network interface is better to use for this? NAT or Bridged?
at the moment i'm using NAT, and Left 4 Dead 2 and http are working through that well...

Now i'm trying to get webmin working, It uses Port 10000 UDP, and as stated in the VirtualBox user manual...

Receiving of UDP broadcasts is not reliable:
The guest does not reliably receive broadcasts, since, in order to save resources, it only listens for a certain amount of time after the guest has sent UDP data on a particular port. As a consequence, NetBios name resolution based on broadcasts does not always work (but WINS always works). As a workaround, you can use the numeric IP of the desired server in the \\server\share notation.

UDP broadcasts arn't reliable, and the work around is to type the IP address in (with the port), this works though :).
Just a bit of a pain to type in the IP when it changes every dhcp reset.

anyway, would bridged mode fix this issue?

Dukey
30-04-11, 17:48
if you apply this nifty little hack, you can have multiple concurrent different users on a Windows 7 machines, and can RDP to your heart's content :)

http://www.blogsdna.com/2336/enable-multiple-user-accessconcurrent-user-sessions-for-remote-desktop-on-windows-7.htm

VJ
30-04-11, 17:53
if you apply this nifty little hack, you can have multiple concurrent different users on a Windows 7 machines, and can RDP to your heart's content :)

http://www.blogsdna.com/2336/enable-multiple-user-accessconcurrent-user-sessions-for-remote-desktop-on-windows-7.htm

could've told me this yesterday? ¬¬
hmm ill stick with linux, its soo much cooler ;)

Dukey
30-04-11, 18:18
could've told me this yesterday? ¬¬
hmm ill stick with linux, its soo much cooler ;)

Sorry! ;)

Linux is much cooler, get used to using the terminal and you'll be automating tasks with CRON and shell scripts in no time.

SSH is also a really handy way of accessing a server, run it without Gnome!
:thumb:

Jackster
30-04-11, 18:20
I use Linux for most of my game servers.

It is a lot better than Windows as the OS uses a lot less ram.

Also, SSH is better on Linux than what ever Windows has.

There is a free Game panel you could use Dukey.

Ill try getting you the link.

It basically automates things for you.

Dukey
30-04-11, 18:38
Sounds handy :thumb:

iGoD ReLeNtLeS
30-04-11, 20:52
Use bridged mode, and set a static ip:


sudo nano /etc/network/interfaces

Change the eth0 device so it looks something like this



# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.1.100 (IP address you want the VM to run on)
netmask 255.255.255.0
gateway 192.168.1.1 (IP of your router)


Then press Ctrl + X, Press y to confirm changes, enter to save file.

Next just run


sudo /etc/init.d/networking restart

Then run... ... To ensure the settings have been enabled :thumb:


ipconfig

VJ
01-05-11, 20:35
if you apply this nifty little hack, you can have multiple concurrent different users on a Windows 7 machines, and can RDP to your heart's content :)

http://www.blogsdna.com/2336/enable-multiple-user-accessconcurrent-user-sessions-for-remote-desktop-on-windows-7.htm

just for notice...
I ran it, said it only supported Windows 7 Build 7000 (beta)...
but me being me, I edited the install file and changed it so that it would run on build 7600(the release of windows 7..)..

I've now broken Windows' Remote Desktop :D :( :picard:

anyway. I've had everything working apart from bind9, which unfortunately keeps popping up attempting to start (and failing) and making any new servers i try to install fail aswell ¬¬

So... I'm gonna start fresh with Ubuntu 10.04, instead of 11.04, and follow this guide http://www.howtoforge.com/perfect-server-ubuntu-10.04-lucid-lynx-ispconfig-3.. but GUI.. I can't live without a GUI unfortunately :(

Dukey
01-05-11, 21:13
just for notice...
I ran it, said it only supported Windows 7 Build 7000 (beta)...
but me being me, I edited the install file and changed it so that it would run on build 7600(the release of windows 7..)..

I've now broken Windows' Remote Desktop :D :( :picard:


Oooh err, sorry! have hacked a few RDPs in the past without issue :/

VJ
01-05-11, 21:51
Oooh err, sorry! have hacked a few RDPs in the past without issue :/

haha dw, it's not a necessity anymore :thumb:
I'll sort it eventually, with a lot of googling