Jump to content
RESET Forums (homeservershow.com)

Your lack of KVM disturbs me.....


darkside34
 Share

Recommended Posts

So, I have to ask, am I the only person that runs KVM on a home server?

 

 

I should probably preface;

 

 

I didn't come here to knock WHS and ESXi (we use ESXi at work for our primary hyper-visor cluster and I love it dearly), but I feel like I would be doing the open source community a disservice if I didn't evangelize at least a little bit.

 

 

So, my story for those interested;

 

 

First off, I did give ESXi 5 a try....mostly because my boss was curious about all the client-side improvements (which are massive) as was I. My original plan was to go with ESXi and buy a 2nd device (micro proliant or something of the sort) to serve out hard drives over iSCSI. However on my only-been-in-the-industry-for-6-months budget, this wasn't a reality. I had inherited 6 1tb 5400rpm hard drives from a friend, and was planning on sticking them all in said nas, but eventually talked myself out of it (good thing too, 5 of them were DOA.....not that I bothered to check).

 

 

At the point in the build where I received the hard drives, a double-hard-drive failure had killed all of my virtual machines, so I was eager to give something new a try. VMware is a fork of KVM, so I chose it over Xen, mostly because I wouldn't loose any capabilities I had with ESXi (and would gain a few as I found out).

 

 

So, I loaded it with ever-trusty Debian, and started my journey.

 

 

I had decided early on that I was ditching hardware raid altogether. MD raid on linux has amazing manageability, and plenty of speed to back that up as well. Originally I was booting my system from a 16gb flash drive on the internal USB port, but this wasn't cutting it so I sunk $70 into a mid-end 32gb SSD. I took the 1tb 7200rpm hitachi drive that survived the raid-5 holocaust generated by my old raid controller, and the one good 1tb 5400rpm drive from my friends collection and stuck them in a software raid-1. This isn't anywhere near my final configuration, I am going to buy 3x seagate 7200rpm 1tb drives here shortly, but for now it suffices. (This server has 4 internal warmswap drive bays, if I ever need more room Ill just buy a JBOD esata card and throw some drives in an external cage, make a new raid array, and add it to my lvm volume group).

 

Also, the benefits of LVM alone easily justify linux for a home server. There is nothing like rebuilding a raid-1 into a raid-5 without taking the data offline. :)

 

The KVM setup is where the LVM really comes in handy however. I actually run all of my VMs on block level storage on their own LVM logical volumes. This allows for super-fast performance compared to .vmdks or .qcow since it circumvents the file-system's read/write queue, and it allows for LVM snapshots to be used. It also allows me to dynamically expand discs whilst the independent file-systems are live, meaning I don't have to deal with the hassle of adding more virtual discs to a host that is running out of space. It also means I can do my backups in bash, like this: http://pastebin.com/i0M5p78Z (disclaimer; I've worked on that script for 30 minutes and it is nowhere near done, it does work however)

 

 

When I started working with this setup, I was using virsh (command line utility) to manage all of my VMs, but eventually a friend convinced me that I had to give virt-manager a try. So I daemonized a VNC session running on a different TTY just to run virt-manager (and the crashplan gui) screen-shots of both are below. (note these tools can all be run remotely if you have a spare linux box with x sitting around)

 

 

All in all this was a fairly simple task (did run into one issue where I couldn't mount an ISO over a symlink that had me chasing my tail [literally] for an hour) and I'm pretty confident the average power user could accomplish everything I have accomplished here rather easily. I am very impressed with the ease and performance of KVM, and we are actually considering building some small business hyper-visors around it at work following my little experiment. In either case, I hope someone gets something out of this write-up, and if anyone wants to give this a try but needs some help or a second set of eyes, just shoot me a PM or catch me on IRC (irc.freenode.net, normally hang out in #debian, #cisco, #vmware, and ##/r/sysadmin under the name 'cerettala', private chats are welcome)

 

Obligatory Specs:

 

IBM system x3100 M4

 

E3-1220 Xeon processor

16GB buffered ECC RAM

dual gigabit NIC (intel chipset)

 

Picture of the system itself: https://lh5.googleusercontent.com/-SrGhEdS_o_g/T3DNppwC8gI/AAAAAAAADdE/bP3Gs2_kDSE/s903/IMG_20120207_175634.jpg

Virt manager screens: (sorry about the resolution, these were taken on my 1366x768 notebook) https://lh5.googleusercontent.com/-L1w0tXVeGC0/T3Fl-Rae09I/AAAAAAAADdY/nhqSONr3mlY/s903/virt-manager1.png

https://lh4.googleusercontent.com/-NW9SUbYNLYM/T3Fl_OAcUFI/AAAAAAAADdg/gaqI1OQlfCU/s903/virt-manager2.png

Link to comment
Share on other sites

  • Replies 23
  • Created
  • Last Reply

Top Posters In This Topic

  • jmwills

    6

  • ikon

    7

  • darkside34

    6

Thanks for posting. It's very interesting. I saw where you're backing VMs using a script but I couldn't find where you're backing up client PCs with the ability to do bare-metal restores. Can KVM do that? I only ask because that is my primary use case for WHS (I suspect it is for many others in these forums too). In fact, I'm now looking at changing my WHS2011 setup so that the main box runs Sever 2K8r2 as a Domain Controller and WHS2011 in a Hyper-V VM. The only thing the WHS2011 VM would do is back up client PCs for bare-metal restores.

Link to comment
Share on other sites

You might want to consider a 2008R2 box with a VM DC. That way, if the DC goes down, the network is not affected that much.

Link to comment
Share on other sites

Thanks for posting. It's very interesting. I saw where you're backing VMs using a script but I couldn't find where you're backing up client PCs with the ability to do bare-metal restores. Can KVM do that? I only ask because that is my primary use case for WHS (I suspect it is for many others in these forums too). In fact, I'm now looking at changing my WHS2011 setup so that the main box runs Sever 2K8r2 as a Domain Controller and WHS2011 in a Hyper-V VM. The only thing the WHS2011 VM would do is back up client PCs for bare-metal restores.

I run acronis on my work laptop and desktop for backing up. I generally don't back up my desktop but once a month since there isn't anything important on it, and the HTPC is just a shell so it doesn't get backed up at all.

 

Edit: backing up to network shares on the host system that is.

Edited by darkside34
Link to comment
Share on other sites

You might want to consider a 2008R2 box with a VM DC. That way, if the DC goes down, the network is not affected that much.

 

You mean both WHS and DC as VMs?

Link to comment
Share on other sites

You mean both WHS and DC as VMs?

This is the way that Microsoft suggest doing it. Technically speaking your hyper-visor shouldn't be running anything but virtual machines.

 

And I didn't come here to bash WHS (or any windows server product) or ESXi, but I will bash hyper-v. I have a few clients that insist on using it in a production environment, and I would be a lot less stressed if I didn't have to support it :(. hyper-v is getting there, but it isn't there yet. Its probably quite alright for home use, but extremely unstable and finicky under heavy duress.....

 

That being said, the most stable hyper-v setup I've seen was 4 gui-less core server nodes running ONLY hyper-v with shared storage. In other words, try to keep your hypervisor as bare-metal as you can afford, no matter which one you go with.

Edited by darkside34
Link to comment
Share on other sites

You mean both WHS and DC as VMs?

 

Yes and here is the reason I did it that way. If the DC goes down, the network is down even from a remote login, however if the DC is running as a Hyper V cleint, the host server is still accessable from a remote location, unless you have a network outage.

 

Right now, I have a DC, SharePoint Server, Exchange Server, and two clients running a Domain member virtual machines and a WHS and a Win8 box also running as Hyper V clients in a workgroup. All seven machines are hosted by a 2008R2 Hyper-V full installation.

 

It works good for me.

Link to comment
Share on other sites

Wow, what a total GeekFest in this thread! I love it.

Welcome darkside34. I think all participants on this thread need to do a special HSS podcast. I think it would be fun.

 

Resume...

Link to comment
Share on other sites

Yes and here is the reason I did it that way. If the DC goes down, the network is down even from a remote login, however if the DC is running as a Hyper V cleint, the host server is still accessable from a remote location, unless you have a network outage.

 

Right now, I have a DC, SharePoint Server, Exchange Server, and two clients running a Domain member virtual machines and a WHS and a Win8 box also running as Hyper V clients in a workgroup. All seven machines are hosted by a 2008R2 Hyper-V full installation.

 

It works good for me.

 

Sounds completely reasonable to me. Other than a little extra disk space usage, I can't imagine it has much impact on performance.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share


×
×
  • Create New...