📜 ⬆️ ⬇️

Desktop in a home server or all-in-one

image
Purpose: it is inexpensive to assemble a system supporting probros of PCI devices into a virtual machine (with IOMMU ). Create a full-fledged workplace, raise a virtual router and more useful stuff.

Accessories:




Memory modules, GT440, I already had a hard disk.

Hypervisor


I do not want and do not like all services spinning inside one operating system. And since I already have a dedicated server running ESXi (5.1), now I will use it.
')
In the BIOS, pre-enable IOMMU, hot swap SATA-drives.
VMware ESXi 5.1.0 was installed on a USB flash drive, the local virtual network is configured. It is quite simple, the process description is not required.

For probros USB controller had to install the patch ESXi510-201303001.
You can find it on the official website: www.vmware.com/patchmgr/findPatch.portal

To install the patch, you will need to enable the SSH server in the ESXi settings and execute the command in the console:
# esxcli software vib install -d "/vmfs/volumes/datastore_name/ESXi510-201303001.zip" 


Network


Create a virtual machine that will be a router, 1 vCPU, 256 vRAM and 8GB disk should be enough.
We connect to the virtual machine 2 network interfaces located in different vSwitchs.

image

The operating system of the home router will be pfSense 2.1, since it has a friendly interface, which is important for my relatives.

pfSense includes all the necessary services for the home: DNS, DHCP, NTP, uPnP, VPN (OpenVPN, PPTP, IPsec, L2TP), IGMP Proxy, WoL, SNMP. It also draws graphics on network interfaces and has a bunch of diagnostic utilities. There is no need to enter the console. By the way, you can put additional packages on pfSense, in the repository there are VMware Tools that I need.

Links to download and all the necessary instructions are on the official website: www.pfsense.org

If you want to configure the router yourself, you can use this article .

Workplace (or HTPC)



We create a virtual machine for the Windows 8.1 operating system, resources to taste, I stopped at 4vCPU, 4GB vRAM and 60GB disk under the OS.

We connect the video card and USB controllers to the virtual machine, having previously configured them in “passthrough mode”.

It looks like this to me:
image
image
image

We start the virtual machine, connect the ISO image to it, install Windows as usual.
After installing Windows 8.1, I found all the necessary drivers for the video card and USB controllers on the network.

We make an external monitor / TV main and disable the monitor built-in from VMware.

image

We connect via USB keyboard and mouse. We launch Youtube 1080p in our favorite browser to check the suitability of the virtual machine as an HTPC, we launch our favorite toy to check the performance. I have Diablo 3 at maximum settings with anti-aliasing and vertical sync stably showing 30 frames per second.

Now we forget that this is a virtual machine and use it for our own purposes, be it games, multimedia or work.

Will spawn something


Does the host system have more free resources? Yes there is. Raise the mirror for their sites.

I create a virtual machine, install the OS, configure the software.

If you do not know how to do this, then there are many articles for you:

Nginx + php-fpm + perl under Debian Squeeze
Bleeding debian / ubuntu servers for small ones. Part 1
Installation and configuration: Nginx + php5-fpm
Configure Nginx + LAMP server at home. Part 1: Configuring the frontend - backend
LAMP + Nginx on VPS is stable and without any extra headache

And search here .

Shit something?


Does the host system have more free resources? Yes there is. Let's download torrents to the server, and then a SOHO router from a reputable manufacturer does it so slowly and it has few USB ports.

I create a virtual machine, install my favorite OS, set up my favorite transmission and samba / nfs-ball.

If you do not know how to do this, then there are many articles for you:

Build and configure Transmission in Debian or anything you wanted to know about Transmission but were afraid to ask
Transmission - we introduce buns into it
Multi torrent rocking on the transmission
Auto Transmission Speed ​​Control

And search here .

Underwater rocks


It turns out that not all video cards can be forwarded to a virtual machine. I could not forward the Nvidia GTS 250 and GT440. Windows even sees a video card, but the image refuses to display, and the Nvidia control panel says that the monitor is not connected to the Nvidia GP.

Without ESXi510-201303001 patch, USB controllers do not go into passthrough mode.

Without another PC, you cannot turn on a virtual machine that is turned off, so it’s better not to turn off a virtual machine with a VMware vSphere Client if there are no other PCs in the house.

Future plans


I want to replace the GT-440 with another video card, which can be forwarded to a virtual machine, for example, HD7850 / 7870, in order to provide another workplace, ESXi will work without a video card.

In a separate virtual machine with a routed RAID controller, raise the storage for photos and documents.

Total





By cost, it turns out like a regular desktop, but we get a desktop + home server.
It turns out that the router, the torrent and the network storage do not take up space at all, do not make noise and do not spend electricity, the desktop does it;)

If you have been thinking about buying a home server for a long time, then look at your desktop, maybe it will become your home server?

Source: https://habr.com/ru/post/203488/


All Articles