Welcome to the ITFreeTraining video on deploying roles to a VHD. A VHD is a virtual drive stored
in a file. With Windows Server 2012 comes the ability to add roles and features to an
offline VHD file. This allows you to perform some administration on an offline server,
something that has never been possible to do before.
In this video I have a server that is running Hyper-V. This Hyper-V server is running a
virtual machine. This virtual machine’s hard disk is virtualized to a VHD file. The
VHD file is essentially a file on the Hyper-V server’s hard disk like any other file on
the hard disk.
On a large network, a lot of administrators will choose to perform their administration
from a workstation. In this video I will use a desktop computer with Remote Administration
Tools installed to access the Hyper-V server and make changes. In order to do this, I will
need to make some firewall changes and create a file share on the Hyper-V server to access
the VHD file. The end result is that I will be able to add a role to the VHD file on the
Hyper-V server from remote.
I will now change to my Windows 8.1 computer with Remote Administration Tools installed
to look at how to install a role on a VHD file.
Before starting the install, you need to ensure that the virtual machine using the VHD file
is shut down. In the real world, if the virtual machine was already running, you would most
likely use server manager to connect to the server and perform the install. If you have
a situation in which the virtual machine has been shut down, the procedure outlined in
this video can be quite useful.
First of all, I will run Server Manager. My Hyper-V server that is holding the VHD file
has not been added to Server Manager. To add it, I will right click “All Servers” and
select “add servers”. From “add servers” I will add my Hyper-V server SRV6.
In order to set up a file share on the Hyper-V server, I first need to make some changes
to the firewall rules on the Hyper-V server to allow computer management to make changes
to it. Without these firewall changes, computer management will not be able to connect up
to the server. To make these changes, I will right click on the server and select Windows
PowerShell.
The first command that I will run is “NetSH ADVFirewall”. NetSH is a tool that makes
changes to network configuration on the computer. The ADVFirewall indicates that changes are
to be made using the Advanced Firewall interface.
The next parameter is “firewall”. This Indicates that changes made using the Advanced
Firewall interface will be made to the firewall. The next parameter is “set rule” followed
by the firewall rule group to be set. In this case, the rule is “Windows Management Instrumentation
(WMI)”.
The last part of the command is “New Enable equals yes”. This means the firewall rule
will be enabled.
Once the command has been run, notice that 4 rules have been updated.
Two Groups of firewall rules need to be enabled in order to allow Computer Management access
to the server. The second command I will run is the same as the first command. However,
the group of rules this time is “Remote Event Log Management”.
After the command is run, 3 more rules will be updated and the firewall configuration
is complete. I can now exit out of PowerShell.
To open Computer Management, right click on the server and select Computer Management.
From here, I will expand down through “Shared Folders” to “Shares”. I will than right
click on “Shares” and select the option “New Share”. This will launch the “create-a-share”
folder wizard which creates the share on the remote computer.
Once past the welcome screen, I next need to browse to the folder on the computer that
contains the Hyper-V files. Once located, it is just a matter of selecting it and moving
on to the next screen of the wizard.
On the next screen, I will change the name of the share so that the hyphen is removed
and, thus, the share name is just HyperV.
On the next screen I need to configure the permissions. For this I will select the option
‘customize permissions’ and then press the button ‘custom’.
The default permissions are read only for everyone. I do not want everyone having access
so I will remove these permissions. I then add the permissions for Domain Admins and
give them Full control.
When Server Manager modifies the VHD, it does it by mounting the VHD on a remote computer
and then sending the commands to that server to be executed. For this reason, the process
will fail with the current set of permissions. To enable it to work, I also need to add the
‘system user’. Once added, I need to also make sure that the ‘system users’ have
read and write access.
Now that the required permissions have been added, I can now finish the wizard to create
the share. Now that the share has been created, I can access the files from another computer.
From Server Manager I will now select ‘manage’ and then select the option ‘Add Roles and
Features’ to add a role to a VHD file.
Once past the welcome screen, on the next screen I need to keep the default option “Role-Based
or feature-based installation”.
On the next screen you need to select the option “Select a virtual hard disk”.
The next step is to select a server that the VHD will be mounted to. Mounting allows that
server to make changes to the VHD file. Although you could choose any server, it is advisable’
when possible’ to choose the server that is hosting the VHD file or at least a server
that has a high speed connection to the VHD file.
The next step is to enter in the location of the VHD file which is on the file share
that was created earlier. Once entered, I can press ‘next’ and server manager will
attempt to connect to that VHD and retrieve its contents.
The next part of the wizard will show which roles are already installed. In this case
I will add the role ‘Active Directory Domain Services’. When prompted I will also add
the additional features that it asks for.
On the next screen the wizard will ask if I want to add any additional features. In
this case, I do not, so I will move on.
The next screen will give me some additional information about Active Directory Domain
Services. Once I am past this screen, the next screen will confirm what is going to
be installed. To start the install, all I need to do is press ‘install’.
The install will now complete in the same way as if you installed it on a local server.
It takes a minute or so to complete but I have sped up the process.
Once complete, I will right click the start icon and select ‘search’ and search for
the Hyper-V manager. Once Hyper-V Manager is opened, I will start up the virtual machine.
The Hyper-V manager is not part of Remote Server Administration Tools in Windows 8.1.
If you find it is not present, you will need to add the feature “Hyper-V Management Tools”.
Once the virtual machine has booted up and I have logged in, I will next open server
manager on the virtual machine.
Once server manager has loaded, notice that Active Directory Domain Services has been
added and can be seen on the left hand side. Also notice that, at the top right, there
is a warning message. This is stating that the server is required to be promoted to a
Domain Controller. When adding roles and features to a server, it is important to remember that
these roles and features are not configured. If they do require post configuration to be
performed, you will need to do this at a later time.
That’s it for deploying roles and features to offline VHD files. I hope you have found
this video helpful and I hope to see you if future videos from us. Thanks for watching.