Skip to main content

Windows Server 2012 R2 ESSENTIALS: Virtualization How-To, Physical Hyper-V Host and Virtual Server (VM)


This is intended to be a guide how to install Microsoft Windows Server 2012 R2 ESSENTIALS as a virtual server, i.e. inside a virtual machine (VM). This VM will run on a physical Hyper-V host which will be again Windows Server 2012 R2 ESSENTIALS itself. This type of installation is allowed by Microsoft but they have not included a tool to simplify the process. In order to achieve our aim, we need to modify the original ISO by removing the Essentials Role and Essentials Setup using Microsoft's own tools.

DISCLAIMER: To my best knowledge everything described here complies with the MS license terms. It worked for me but does not mean that it will work for you as is. So make sure that you have understood everything and check if each step applies to your system. There is no liability for damages.

Physical Hyper-V Host vs Virtual Server (Guest VM)

Windows Server 2012 R2 Essentials is a very interesting operating system for small businesses. What many people don't know: Microsoft now allows you to do one physical installation - let's call it Hyper-V Host Installation - plus one virtual installation - let's call it the actual Server Essentials inside a Virtual Machine (VM). This is explained here:
http://blogs.technet.com/b/sbs/archive/2013/09/03/understanding-licensing-for-windows-server-2012-r2-essentials-and-the-windows-server-essentials-experience-role.aspx

Virtualization Obstacles

Unfortunately, to make your life as complicated as possible, Microsoft has not made the virtualization straightforward. The problem is that the Essentials Role needs to be manually removed before doing the installation on the physical host: It is not only useless for the Hyper-V physical host but it will also interfere with the Server Essentials we want to install later as a virtual server in a VM. MS has not included an option to remove the Essentials role. They have decided to leave this option for OEMs only, so these have to decide for you if they want to include the virtualization for your server or not - stupid! At the time of this writing MS offers some explanations how the install image needs to be modified to remove the essentials role but these are complex and even include mistakes:
http://technet.microsoft.com/en-us/library/dn293253.aspx
or
http://social.technet.microsoft.com/Forums/en-US/341bd905-1d99-4e3d-af16-04aadf9e9ab9/installing-windows-server-2012-essentials-r2-hyperv-role?forum=2012R2EssentialsPreview

Why not just use the free Microsoft Hyper-V Server for the Host?

I also thought about using the free Hyper-V Server instead of Server 2012 R2 Essentials on the physical host. Free Hyper-V Server even gives you unlimited VMs, but it is "command line only" (no GUI!) and is hard to use for entry level admins. Also it probably does not include Windows Server Backup which is very handy to backup the Server Essentials VM from the host. Graphical tools for RAID monitoring etc. will not be usable without full GUI.

The Idea

So I decided to write a step-by-step guide. But first I thank for the help I received from Moodjbow's blog:
http://moodjbow.wordpress.com/2013/07/02/server-2012-r2-essentials-hyper-v-how-to/

So my basic idea was the following:

1. It should be possible to cleanly modify the original ISO according to the MS guides to get a Hyper-V “Physical-Host-Only” ISO to install, without Active Directory, etc. IMHO there is no need to auto-include the guest VM (as MS does in its guides) which just makes things more complex and inflexible!

2. The Server Essentials can then be just installed inside that physical host from the original unmodified ISO as a Guest VM. This way we can also configure the VM as we like before installing. Clean and easy!

Let's get to work!

Step-by-Step: Creating the ISO for the Hyper-V-Host Installation


Preparation: Install the Windows 8.1 ADK (Assessment and Deployment Kit)

First you need to download and install the free Win 8.1 ADK on your PC where you will prepare the modified ISO. You should be able to do this on Windows 8.0, Windows 8.1 and probably on Server 2012 R2 but I have not tested them all. I have actually installed it on Windows 7 as it is also compatible with the Windows 8.1 ADK.

After having installed the ADK to its default directory open a Windows COMMAND PROMPT AS ADMINISTRATOR.

IMPORTANT !!! From now on every executable must be started by first changing to the correct ADK directory, otherwise Windows will execute the .exe from your OS path!!!


### CREATE TWO WORKING DIRS: Create the following directories:

md c:\essentials-host-image
md c:\essentials-host-mount

### COPY ISO CONTENTS: Insert your Windows Server 2012 R2 ESSENTIALS CD and copy all files and folders (including subfolders) to c:\essentials-host-image



## CHANGE TO ADK DIR (one line):

cd "C:\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Deployment Tools\amd64\DISM"

### MOUNT IMAGE: Mounts the image into a temp directory - takes a while (one line)

dism /Mount-Image /ImageFile:"C:\essentials-host-image\sources\install.wim" /Index:1 /MountDir:"C:\essentials-host-mount"

### FOR MY INFO ONLY (you don't have to execute the two lines below):
[ dism /Image:C:\essentials-host-mount /Get-Features > myfeatures.txt ]   
    --> print all features to file
[ dism /Image:C:\essentials-host-mount /Get-Packages > mypackages.txt]   
    --> print all packages to file

### THE MOST IMPORTANT: DEACTIVATE ESSENTIALS FEATURES (two lines):

dism /Image:C:\essentials-host-mount /Disable-Feature:"WSS-Product-Package"
dism /Image:C:\essentials-host-mount /Disable-Feature:"Microsoft-Windows-ServerEssentials-ServerSetup"

### COMMIT AND UNMOUNT IMAGE:

dism /unmount-Wim /MountDir:C:\essentials-host-mount /commit
### INFO ONLY: /discard instead of /commit discards

### CREATE ISO (change dir first, then create the ISO as C:\OEMEssentialsHost.iso (two lines below) :

cd "C:\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Deployment Tools\amd64\Oscdimg"

oscdimg -m -o -u2 -udfver102 -bootdata:2#p0,e,bc:\essentials-host-image\boot\etfsboot.com#pEF,e,bc:\essentials-host-image\efi\microsoft\boot\efisys.bin C:\essentials-host-image C:\OEMEssentialsHost.iso

### BURN ISO TO CD
Burn your C:\OEMEssentialsHost.iso to a CD!

Congratulations! You should now have a Host-Only installer CD without the Essentials stuff. Don't forget to thank Microsoft for making your life so complicated.

Installation of the physical host OS from the modified ISO

Install the physical host OS form the ISO. After installation, if needed, you can remove some more features and add-ons you don't need through the normal server manager GUI - the aim is to have a cleaned up host OS.

Don't forget to install your Hyper-V role!

Then create your Hyper-V VM and install your virtual Windows Server 2012 R2 Essentials inside, this time from the original MS ISO, not from your modified host image!

UPDATE: Joining the Hyper-V host to the domain

Yes, after reading many comments and discussions on the topic I have decided to add the physical host to the domain, i.e. to the Server 2012 R2 Essentials VM running on itself. IMHO this has many benefits regarding administration etc. and seems to work fine (caution, see below). Ok, you may get some warnings in the logs because your host will not be able to immediately reach the virtual domain controller during startup, as it has not started yet (a kind of chicken-egg-problem) but this is nothing to really worry about.

The only problem is again... Microsoft. Although the server is properly licensened, i.e. they allow you this type of installation as described here:

http://blogs.technet.com/b/sbs/archive/2013/09/03/understanding-licensing-for-windows-server-2012-r2-essentials-and-the-windows-server-essentials-experience-role.aspx

there is some stupid Server Infrastructure Licensing Service (silsvc.exe) that is watching your server and thinks that you are running two 2012 R2 Essential Servers in your domain as soon as you have joined the host to your domain, although we have removed all roles on our physical server. This stupid silsvc.exe will then shut down your server and stop your business after one week, you will then need to manually restart the server and this shutdown will happen again after one week. I.e. Microsoft dares to shut down your properly licensed server (according to their own licensing information) without even giving you a clear warning that this will happen, which is IMHO inacceptable behavior! In their licensing blog they don't even tell you that the server host is not expected to be joined to the domain but has to stay in a workgroup. Leaving it in a workgroup has some other serious drawbacks I am not going to discuss here. It is also ridiculous that Microsoft posts licensing information on a some blog - but as you know nowadays they don't seem to even care about writing some serious documentation for the products they sell. This is no open source, we pay for this stupid software and expect it to at least not intentionally shut down our business because it has incorrectly (!) implemented licensing watchguards. Looks like they don't understand their own licensing... For a workaround to this stupid problem read here:

http://moodjbow.wordpress.com/2014/03/17/essentials-2012-r2-hyper-v-shuts-down-weekly/

and here

http://moodjbow.wordpress.com/2014/03/17/how-to-disable-server-infrastructure-licensing-service/

Hope this helps!

Regards,

Anguel

Comments

  1. Anguel,

    thanx for this nice and clear procedure. It all worked just fine except for one little but cucial step. In the first step "### CREATE TWO WORKING DIRS" you say " COPY ISO CONTENTS: .... to c:\essentials-host-mount"
    This should be: " COPY ISO CONTENTS: .... to c:\essentials-host-image"

    Thanx again for the nice procedure!!

    Jan Schepers

    ReplyDelete
    Replies
    1. Jan, thank you for the comment! I have corrected it. Sorry for the stupid mistake.

      Delete
  2. Thx for the great walktrough!
    The ADK is working on server2012R2

    ReplyDelete
  3. we need more help like this for small businesses running WSE on minimal setups vitualized.

    I'm running WSE 2012 r2 DC vitualized. Is it OK or necessary to remove AD role from the host, i only need the host to be a local workgroup.

    Any tips on DNS setup with this situation of WSE virtualized, host not domain joined, and DHCP from my router?

    Thanks, larry

    ReplyDelete
  4. Thanks for this guide! I have one question though. I have created the custom ISO and installed it on my server. During my install it asked for the product key which I have as a MAK key (VL copy). Installation completed successfully however under windows activation it says it is not activated? when I click activate it asks for the product key again but it doesn't recognise the key? thus windows will not activate, any thoughts?

    ReplyDelete
    Replies
    1. Hi Longy,

      I also faced this stupid problem if I remember correctly. I have a normal system builder version. I think the problem is that Microsoft just does not understand its own stupid and ever-changing licensing terms and can't implement them properly in software - please also refer to the stupid "server shutdown" problem I describe above. In good old Windows days things were not so complex and confusing. Today they are really playing dirty tricks on their paying customers. The most stupid thing here is that they do not even give you an option to activate by phone unless you know how to get to it. So I googled a lot and what I found out is: Open command prompt and type
      slui.exe 4
      Yes, there is a space and a four. This finally gave me the option to activate by phone and when I was asked on how many PCs it is installed of course I answered "one". I would like to be able to shout at someone at MS and point them to their own licensing blog to read their latest licensing terms. And yes they don't have docs, they only have blogs nowadays...
      I hope this helps.

      Anguel

      Delete
    2. Many thanks for getting back to me Anguel, upon further investigation and a case of looking at the problem too in depth, the issue was actually the time and date was out! such a simple issue too overlook :( other than that - great guide thank you!

      Delete
    3. Glad to hear that everything is working. Just beware of the shutdown issue described above.

      Delete
  5. It is not necessary to create an ISO. You can disable the Essentials features once the Essentials Server is installed normally and the assistant is asking to configure the server. The whole procedure is very easy and is described here: (in German...)

    http://www.serverjunge.de/2014/07/windows-server-2012-r2-essentials-als-hyper-v-host/

    Steps are:
    1. Terminate the assistant:

    dism /online /disable-feature:Microsoft-Windows-ServerEssentials-ServerSetup

    - terminate the assistant without server restart

    2. Remove all unused roles (Essentials, AD). (Don't disable Powershell...)

    3. Restart the server

    4. Install Hyper-V-Role

    Theses steps worked for a second Essentials server guest in a hyper-v-core machine which I liked to use as a simple member server in addition to my first Essentials server (guest).

    ReplyDelete
    Replies
    1. Thanks Thorsten. This looks like a nice workaround to prevent the extra step of ISO creation. Although some may still prefer to go the maybe "cleaner" way of preparing a new ISO.
      What I find most annoying when virtualizing the server essentials is that we need to fix the silsvc.exe issue (as described above), otherwise Microsoft will force-shut down our properly licensed server.

      Delete
  6. I did not have any issues with silsvc.exe. But I have a slightly different environment:

    I installed two virtual hyper-v machines (each Server 2012R2 Essentials) on a Hyper-V-Server (core). Both are activated with the same product key. One is the domain controller, and the other runs without the essential and AD roles as described above. Both servers run with the server infrastructure licensing service which does not shutdown the second server.

    Perhaps the shutdown will only happen if the second server acts as a hyper-v server...? (But why?)

    ReplyDelete
    Replies
    1. Yes, this happens if you install a virtual Server 2012 R2 Essentials on a physical Server 2012 R2 Essentials host with roles removed. Although this type of licensing is explicitly allowed by Microsoft as stated above, this company does not even understand its own terms and shuts down a running business server. Unfortunately, no small company will dare to take legal steps against this software monster. So they can continue to decide about our life and business as they like and make more money...

      Delete
    2. Well, I am still in the grace period of the licensing issue (30 days after installation). I still have to wait 3 days to see what will happen... But I think I will get the same problems as you. I'll report.

      BTW I tried several hours to find the _exact_ licensing conditions for Server 2012 R2 Essentials, e. g. the EULA. But I did not find it. I found only some statements in Technet as "Windows Server 2012 R2 Essentials can only be deployed as domain controller." I did not find any permission to install Windows Server 2012 R2 Essentials as a member server in a domain or as a standalone server in a workgroup. (The link you provided above is an eplanation of different scenarios, but no licensing condition.)

      Delete
    3. Those idiots at MS are to stupid to publish official EULAs. Instead, they define licensing as they feel like in their stupid blogs! Unfortunately, their programmers don't read the blogs and stop properly licensed servers from working.

      MS allows you to run one R2 ESS VM (domain controller) on a R2 ESS HOST WITH ROLES REMOVED (i.e. it is used as a Hyper-V server only), no additional roles or VMs are allowed (officially) on this physical host. As I posted above, this is all explained in this blog: http://blogs.technet.com/b/sbs/archive/2013/09/03/understanding-licensing-for-windows-server-2012-r2-essentials-and-the-windows-server-essentials-experience-role.aspx

      Unfortunately, you get a problem with silsvc.exe if you do this and join the host to the domain controller running in the VM. But you need to do this to allow easier management.

      Delete
    4. This blog article your are referring has no official character.

      In
      http://technet.microsoft.com/en-us/library/dn281793.aspx (which has a little bit more official character) is written that it's not allowed to install the server in a pre-existing domain. But this condition seems to refer only to the "Essentials Role" - and what should happen to a server which does not have this role anymore...? ;-)

      Anyway: Your Hyper-V host could also run as a workgroup member. I manage my Hyper-V-Server (core) from some windows 8 clients or from the virtualized Server 2012R2-Essentials guest without any problems. There is no need to include this server in the same domain.

      Delete
  7. I'm just getting into Server OS. Could someone explain some use cases for why you would want to run an Essentials VM inside a physical Essentials like this?

    ReplyDelete
  8. Thanks so much for your clear, straightforward, and accurate instructions!
    Why can't MS post some good instructions like this???
    :)

    ReplyDelete
  9. This article is exactly what I have been looking for! Excellent work. I was literally about to spend a few hours testing things which I was hoping would lead me to the information you provided here.

    I wanted to ask you about the the licensing issue you mentioned where the server shuts down weekly when you join it to the domain.
    I understand there is a work around to disable the offending service (silsvc) and I also understand that every where you look, running essentials as a vm on the Windows Server 2012 R2 Essentials host (with essentails role removed) is allowed with regards to licencing.

    However, I would like to know if disabling that service would be acceptable for a business to do in the eyes of Microsoft and licencing..

    As mentioned in that article you provided"The VM on physical scenario was meant for OEMs, hence someone else should take care of disabling the service with OOBE configs."

    I believe this means that we would not be prosecuted or punished...

    ReplyDelete
  10. thanks for guide,
    you should write, that last command should be executed from elevated cmd, all commands before i executed from powershell, last one:
    oscdimg -m -o -u2 -udfver102 -bootdata:2#p0,e,bc:\essentials-host-image\boot\etfsboot.com#pEF,e,bc:\essentials-host-image\efi\microsoft\boot\efisys.bin C:\essentials-host-image C:\OEMEssentialsHost.iso
    not works
    maybe i missed up that info ;)
    thanks for great howto :)
    wi.Tek

    ReplyDelete
  11. Man. Microsoft sure is incompetent when it comes to simply making Essentials a VM under a Hyper-V Role.

    ReplyDelete
  12. Tried with both my Dell supplied essentials cd and downloading the essentials trial iso from microsoft...in both instances neither feature is available:

    dism /Image:C:\essentials-host-mount /Disable-Feature:"WSS-Product-Package"
    dism /Image:C:\essentials-host-mount /Disable-Feature:"Microsoft-Windows-ServerEssentials-ServerSetup"

    "Feature name Microsoft-Windows-ServerEssentials-ServerSetup is unknown.
    A Windows feature name was not recognized.
    Use the /Get-Features option to find the name of the feature in the image and tr
    y the command again."

    I exported to myfeatures.txt and they aren't listed there either. Suggestions?

    ReplyDelete
  13. nice article really helpful for understand the concepts.

    ReplyDelete
  14. Great article and many thanks for putting this guide together. Without it I would have been totally lost.

    ReplyDelete
  15. I used this document to properly install 2012R2 Essentials in HyperV. Worked Great! Many thanks. Will this also work with 2016 Essentials? Or will there need to be modified instructions?

    Thanks!!

    ReplyDelete
    Replies
    1. I read some licensing docs but it did not become clear so far...

      Delete
  16. This also works for essentials 2016, and you can make your image with the correct features activated/deactivated:

    To get to the right environment, there is a shortcut:
    Click Start, and type deployment. Right-click Deployment and Imaging Tools Environment and then select Run as administrator.
    cd amd64\dism

    dism /Mount-Image /ImageFile:"C:\essentials-host-image\sources\install.wim" /Index:1 /MountDir:"C:\essentials-host-mount"

    After mounting your image, do these commands:

    dism /Image:C:\essentials-host-mount /Disable-Feature:"WSS-Product-Package"
    dism /Image:C:\essentials-host-mount /Disable-Feature:"Microsoft-Windows-ServerEssentials-ServerSetup"
    dism /Image:C:\essentials-host-mount /Disable-Feature:"FileAndStorage-Services"
    dism /Image:C:\essentials-host-mount /Disable-Feature:"Storage-Services"
    dism /Image:C:\essentials-host-mount /Disable-Feature:"File-Services"
    dism /Image:C:\essentials-host-mount /Disable-Feature:"CoreFileServer"
    dism /Image:C:\essentials-host-mount /Disable-Feature:"Microsoft-Windows-GroupPolicy-ServerAdminTools-Update"
    dism /Image:C:\essentials-host-mount /enable-feature:Microsoft-Hyper-V /All
    dism /Image:C:\essentials-host-mount /enable-feature:Microsoft-Hyper-V-Management-Clients /All
    dism /Image:C:\essentials-host-mount /enable-feature:Microsoft-Hyper-V-Management-PowerShell /All

    reg load HKLM\test C:\essentials-host-mount\windows\system32\config\software
    reg add "HKLM\test\Microsoft\ServerManager" /v DoNotOpenServerManagerAtLogon /t REG_DWORD /d 1 /f
    reg unload HKLM\test

    dism /Image:C:\essentials-host-mount /commit

    ... create the iso to burn or put the files on an USB stick, it will boot ...

    ReplyDelete
  17. I wrote this simple batch file to automate disabling silsvc.exe. I haven't tested it with the takeown line, so if that fails just take ownership manually before running. It works on WSE 2016.

    takeown /A c:\windows\system32\silsvc.exe
    taskkill /IM silsvc.exe /F
    ren c:\windows\system32\silsvc.exe silsvc.bak
    ECHO Service must be disabled manually!
    pause

    ReplyDelete

Post a Comment

Popular posts from this blog

SOLVED: Making Wake-on-Lan (WOL) work in Windows 10 / 8.x

WINDOWS 10 UPDATE: THIS FIX ALSO APPLIES TO WINDOWS 10 , IT IS EVEN MORE IMPORTANT,  BECAUSE WINDOWS 10 TURNS "FAST STARTUP" (read below) BACK ON AFTER UPDATES (yes, Microsoft does not stop creating nonsense features / bugs). TO DISABLE FAST STARTUP ON WIN 10 THROUGH GROUP POLICY PREFERENCES CREATE THE FOLLOWING KEY: HKLM\System\CurrentControlSet\Control\Session Manager\Power\HiberbootEnabled and set its value to 0 ! I had very serious problems getting Wake-On-Lan (WOL) to work on my new Dell Optiplex 9020 MT (MiniTower) on Windows 8.1 Pro. I finally got this to work and would like to share my experience here. Note: At the time of this writing the current Dell BIOS for Optiplex 9020 MT was A05. UPDATE: The same behavior is also observed with DELL BIOS A07. Maybe Dell needs to comply with some power saving requirements and therefore enables Deep Sleep instead of Wake-On-LAN? Whatever the reason is, it is extremely annoying that this is the default and it is not ...

Changing the Reserved IP Address in a Static DHCP Reservation in Windows Server

  Static IPs preferred DHCP is a good thing if it works - set and forget. But what happens if the DHCP server is down for some reason? Exactly - the whole network stops working. Another problem of DHCP are those random IPs a client gets each time. This is very bad for printers that use DHCP. Therefore I prefer static IPs over dynamic.   Windows Server 2012 R2 Essentials: You cannot stop Windows LAN Configuration Service anymore Unfortunately, there is some strange behavior on Server 2012 R2 Essentials if you just enter static IPs on your Windows clients - your Windows OS will show exclamation marks on your network connection from time to time, etc. There is actually a Windows Server LAN Configuration service which keeps overwriting your manual settings and the bad thing is that you cannot stop that service in Server 2012 R2 any more for some reason...So, instead, I decided to use DHCP on the server and add an Alternative IP Configuration with all static data as...

Veeam Backup & Replication: "Failed to execute script in guest OS" (Linux Guest VM on Hyper-V)

Problem: Veeam Pre-Freeze / Post-Thaw .sh Scripts Fail on Linux Guest VMs (e.g. Ubuntu) with "Failed to execute script in guest OS" although the scripts run fine. I use Hyper-V but that should not matter. Failing scripts are configured to "Require successful script execution" under "Application-Aware Processing Options" under "Guest Processing" in the Veeam backup job. My Solution: Some commands executed inside the scripts seem to return error output which is passed back to Veeam through the script and confuse Veeam so it reports that the script was not successful. So we must redirect error output from such commands to 2>/dev/null or some file, otherwise error status is passed back to this script and Veeam reports a failure. For information about discarding error output, see https://bash.cyberciti.biz/guide//dev/null_discards_unwanted_output Additional information: Also make sure that Veeam scripts (*.sh) are located on the Veea...