How to Install Minecraft Server on Windows 8 Hyper-V Ubuntu Server in 60s

6
Posted April 9, 2013 by Patrick Kennedy in Software
Install Minecraft on Hyper-V Ubuntu Start Minecraft

We have had many readers ask how to setup their own Minecraft server. For those that do not know, Minecraft is a breakout hit in gaming selling many millions of copies yet starting from an independent developer. One of the great things about Minecraft’s independent route to market is that there is no “corporate” server requirement which plagues games like recent installments of Call of Duty. That means users are free to setup their own Minecraft servers at home, colocated or elsewhere. The model is very reminiscent to the Counter-Strike scene in the 2000-2001 time frame. Today we are going to show how to install Minecraft server on Windows 8 Hyper-V Ubuntu. This is an easy setup that uses little power and is great for hosting LAN games.

Test Configuration

To make this as relevant as possible to the test case my personal workstation is going to be used.

  1. CPU(s): Intel Core i7-3930K
  2. Motherboard: ASUS P9X79 WS
  3. Memory: 32GB (8x 4GB) G.Skill Ripjaws X DDR3 1600
  4. Drives: Corsair Force3 120GBOCZ Vertex 3 120GB and 2x Samsung 840 Pro 256GB
  5. Chassis: Corsair Carbide 500R
  6. Power Supply: Corsair AX850 850w 80 Plus Gold
  7. OS: Microsoft Windows 8 Pro with Hyper-V and Ubuntu Server 12.10

One key aspect here is that the machine has a lot of very fast SSD storage. Traditional rotating disks can cause a Minecraft server to hang for players during disk access.

Prerequisite: Install Ubuntu on Windows 8 Hyper-V

Installing Ubuntu on Windows 8 Hyper-V is very easy. Hyper-V integration components are included with the major distributions making installation faster than with CentOS and many other distributions. Use the guide on how to install Ubuntu on Windows 8 Hyper-V in a few minutes. For a Minecraft server it is suggested that one uses the x64 server version. The workstation version uses more disk space and requires additional memory to run. Since Minecraft is very memory intensive, it is best to waste memory.

One major note here is that one wants the Minecraft server  Hyper-V data store to run on a SSD.

Install Minecraft Server on Windows 8 Hyper-V Ubuntu in 60 seconds

Now for the fun part, getting a basic Minecraft server running in less than 60 seconds. Of course, if one has a slow Internet connection it may take slightly longer.

The first step to install Minecraft server on Windows 8 Hyper-V is to install java. For this guide we are going to use java7. Use the following command to install java on Ubuntu:

sudo apt-get install openjdk-7-jre-headless

Here is a screenshot of what this will look like (may be slightly different if you already did sudo apt-get upgrade):

Install Minecraft on Hyper-V Ubuntu JAVA

Install Minecraft on Hyper-V Ubuntu JAVA

Now that the Ubuntu server has java installed, you can get the files needed to install Minecraft server. First you will want to create a directory. For a simple server like this, I like to use minecraft-server as my directory so that is:

mkdir ~/minecraft-server

After this one needs to get the Minecraft Server files:

wget -O ~/minecraft-server/server.jar https://s3.amazonaws.com/MinecraftDownload/launcher/minecraft_server.jar

That command is greatly simplified because it uses the same path. Bukkit includes version numbers which makes things a bit more difficult. Here is what this all looks like:

Install Minecraft on Hyper-V Ubuntu Minecraft Standard

Install Minecraft on Hyper-V Ubuntu Minecraft Standard

At this point one has installed Minecraft server on Windows 8 Hyper-V Ubuntu. One really cool thing is that by using this type of installation, you can move it to another Windows 8 Pro, Windows 8 Enterprise, Windows Server 2008 R2, Windows Server 2012 or Hyper-V server machine easily. Just import the virtual machine and you are ready to go on a dedicated server box later.

Now the next step is to launch Minecraft server after it is installed. For this I tend to use the following commands:

cd minecraft-server

java -Xmx2048M -Xms2048M -jar server.jar nogui

That launches a 2GB of RAM minecraft server which most desktops can support. If one wanted to use something like the Microsoft Surface Pro as the Hyper-V host, those numbers should be lowered to 1024M due to limitations with 4GB of RAM. An important factor here is that the more RAM the Hyper-V host has, the more it can allocate the the Ubuntu VM and the Minecraft server. Here is what that looks like:

Install Minecraft on Hyper-V Ubuntu Start Minecraft

Install Minecraft on Hyper-V Ubuntu Start Minecraft

That’s all there was and it only took about a minute to get up and running with the Minecraft server in Hyper-V on a Ubuntu VM. Of course there is a slightly better way.

Scripting the Minecraft Server Installation on Ubuntu

While entering commands is fun, we can use a simple bash script to do the installation. Just log into (using SSH or the Hyper-V console) the Ubuntu VM and fire up a text editor. I use nano a lot so the command would be:

nano minecraft-server-install.sh

Now one can just copy the following lines into the text editor and save/ write out changes.

#!/usr/local/bin/bash
sudo apt-get install openjdk-7-jre-headless
mkdir ~/minecraft-server && wget -O ~/minecraft-server/server.jar https://s3.amazonaws.com/MinecraftDownload/launcher/minecraft_server.jar

Once this is complete, one can run:

sh minecraft-server-install.sh

At which point the bash script will run, download and install java and Minecraft server. For those that want to do this on both Hyper-V and non Hyper-V Ubuntu installations, one can just download that script and complete installations in under 20 seconds each time.

Conclusion

Hopefully that helped. Always open to other suggestions and if we want, happy to do the same with bukkit or similar Minecraft server installations. The really cool thing here is that the installation is very portable since it is in Hyper-V and runs on many machines since Microsoft has brought Windows 8 Hyper-V to the masses.

Feel free to suggest other options.


About the Author

Patrick Kennedy

Patrick has been running ServeTheHome since 2009 and covers a wide variety of home and small business IT topics. For his day job, Patrick is a management consultant focused in the technology industry and has worked with numerous large hardware and storage vendors in the Silicon Valley. The goal of STH is simply to help users find some information about basic server building blocks. If you have any helpful information please feel free to post on the forums.

6 Comments


  1.  
    Yuri

    Guys, I don’t get “How to do something by Captain Obvious” kind of articles. What’s happening to STH?




    •  

      Yuri, as Stephen mentioned, feel free to suggest or contribute content that you would like to see.

      Also of significant note: Things that are obvious to one person may not be obvious to others. We get several requests each week on this topic alone.




  2.  
    Stephen Davis

    Yuri – Sorry you are not liking the recent how-to articles. There is only so much news and products we can afford to buy & test. So sometimes we create articles based on projects we have going on or something fun we recently did. The Xen articles are a good example of this. I have been building out a public cloud prototype and am simply documenting it here for others to benefit.

    If there is something specific that you are interested in or you have ideas, we would love to hear them. Please join us on the forums. We have a sub-forum dedicated to main site article ideas.
    http://forums.servethehome.com/servethehome-com-article-suggestions/




  3.  
    xena

    Well +1 to Yuri, same thougts here. As regular visitor of this site for 2 years I see a downward curve in quality or rather quality of choice of topics. Year-two ago we have articles about 4 sockets motheboards, raid cards test, great articles about ibm1015 for example followed great ebay auction etc… thats what make you really special and unique and you get readers around world(in my case from central eu location). With topics like minecraft or memtest you take this site so to lowend that people start checking if they really are on STH or on some of the billion hw&sw reviews junk sites. Cmon Patrick, you found this site and make it very special for people from IT ranks or highend enthusiastic folks and we was very happy with information we find on you site. But now its feel like you throw your old readers over deck and get simple stuff instead of giving us high quality food we have become accustomed to. Just few my cents…




  4.  
    Morko

    It wasn’t all for nothing though. I found this article interesting and helpful. First I tried this http://www.smh.com.au/digital-life/computers/blogs/gadgets-on-the-go/setting-up-a-minecraft-home-server-20120823-24own.html, great tutorial but it didn’t serve all angles I was looking for so yeah, thanks for the post. ;)





Leave a Response

(required)


Newly Reviewed
 
  • Intel 730 480GB SSD - Power Capacitors
  • Intel 730 SSD
  • SanDisk CloudSpeed 1000E
  • Intel 730 SSD
  • Intel DC P3700 400GB Internal View
  • AppliedMicro X-Gene