Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to use my server machine (currently running FreeNAS) as a gaming box too. To do this, I'd install windows 7 on it, and run FreeNas as a virtual machine.

The role of the server is a file server. I'm using ZFS on its 6 1TB drives (2 parity drives).

I would set it up so that the VM would have access to the physical disks.

I was told that the virtual machine software would convert sync writes to async writes, and this could cause data corruption. Obviously I don't want that! Is there a way around it?

What other problems will I come across running a file server in a VM?

share|improve this question
Wouldnt you be better off moving your raid array to another box? – Keltari Aug 24 '11 at 2:31
Essentially, I'm trying to save extraneous expense. The server is powerful enough that all it would need is a decent graphics card. – Robert Aug 24 '11 at 2:52

Before you get to converting sync writes to async writes, you have a lot more problems to overcome:

  • If this is a gaming system, how are you going to make sure that your VM doesn't crash in your intense gaming session?
  • How are you going to make this VM visible on the network?
  • Will your drive be able to take the abuse of a mongo 4TB virtual hard disk? (ZFS should, 'cause it's awesome, but it's still a consideration for most people)
  • How are you going to take your FreeNAS install and your Filesystem into a virtual hard disk?
  • What would you gain from using a powerful computer for a NAS over using a crappy nettop?

If you can get over those issues, then you can worry about the network interface being slower because it's virtualized, et cetera. But before that...

share|improve this answer
1 - Why would it crash during a gaming session? 2 - Making the VM visible on the network shouldn't be a problem. At least with virtual box it's easy enough using the bridged adapter configuration. 3 - Since the physical drives would be made available to the VM, I'm unsure what you mean by this. 4 - FreeNAS can be reinstalled and pointed to the existing ZFS partitions 5 - Cost savings. I have a beefy server that would only need a decent graphics card to be a gaming rig too. – Robert Aug 24 '11 at 2:45
@Robert Games take up memory and CPU time. They get precedence because they're games and we gamers have to have those lovely FPSs. If it needs, it'll move the VM to swap. And it's a VM. They're slow, period. On swap, it's worse. With fewer CPU cycles, it's worse. Crashing is inevitable. – digitxp Aug 24 '11 at 2:49
@Robert 2: In my experience, VM networking gets ugly because it adds about 4-layers of abstraction to the stack (if I'm getting my OSI right). 3, 4: Good point. – digitxp Aug 24 '11 at 2:53
Just because something is running slowly, it doesn't mean it will crash... It will just run, well, slowly.. – Robert Aug 24 '11 at 2:53
For the networking, surely that's just a matter of configuration. While it may be difficult to configure, will it actually cause any problems? – Robert Aug 24 '11 at 2:56

Looks like you intend to run Windows 7 as the host operating system. There is always the risk that a misbehaving game may take out the host leaving your guest in an unknown state as well. What files are you serving that you require the service while gaming? It might be better to simply dual boot. In a dedicated virtual environment (esxi and others) , you're generally a bit safer as they try to protect from one guests mess up taking out another, but you'd not get full access to the hardware that's making that server an attractive gaming rig.

share|improve this answer
While dual booting is plan B, I'd prefer to have the server running at the same time as the gaming machine. This is so that I can run XBMC on windows 7 as a frontend for movies/tv shows. – Robert Aug 24 '11 at 2:50
As for point one, if I push reset on my server now, it will reboot, and come back up without data corruption (I hope..!). This is because of the way that ZFS works. What would be different with a VM in this case? – Robert Aug 24 '11 at 2:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .