How do I... Install Virtual Server in Windows 2008 Server Core?

In a previous How do I... blog post, Steven Warren wrote about installing Windows 2008 server core. Now he tackles the installation and configuration of Virtual Server 2005 to into an instance of Windows 2008 Server Core. The entire install has to be done via command line. Follow along as Steven takes explores this subset of Windows Server 2008.

In a previous How do I... blog post, I wrote about installing Windows 2008 server core. I am really fascinated with this server core piece and I decided that it would be very cool to write about configuring Virtual Server 2005 to work in server core. The entire install has to be done via command line. It seems my fingers are hurting more than my wrist since I have not had to use a mouse in several hours.

This blog post is also available as a TechRepublic gallery and TechRepublic download.


This tutorial begins after you load the Windows Server 2008 Server Core installation.

Our first step is to rename the computer to something useful after the initial installation. You can use the following command: (Figure A)
NETDOM renamecomputer %computername% /newname:vshost

Figure A

Rename Server
After renaming your computer (Figure B), you are required to restart the computer (Figure C) with the following command:
shutdown /r

Figure B


Figure C

You can now configure networking (Figure D) by typing the following command:
netsh interface ipv4 show interfaces

Figure D

Configure networking

This will tell us what Index to configure networking on. You can configure a static address by typing the following command:

netsh interface ipv4 set address name="2" source=static address= mask= gateway=
Your next step is to configure DNS (Figure E) by typing the following command:
netsh interface ipv4 add dnsserver name="2" address= index=1

Figure E

Configure DNS
Figures F and G are the commands necessary to give all machines, such as those running Windows XP, access to run Windows Server Core from a remote desktop.

Figure F

Access from remote access

Figure G

Give all machines access
Let's now join Windows Server Core to the domain (Figure H) by typing the following command:
Netdom join %computername% /domain:watchtower /userd:Administrator /password:Password01

Figure H

Join domain

Next, reboot the computer by typing the following command:

shutdown /r
Windows Server Core requires you to activate the server. You can activate by typing (Figure I) the following command:
slmgr.vbs -ato

Figure I

Activate server

Configure Virtual Server 2005 R2

Let's now install Microsoft Virtual Server 2005 R2 Enterprise Edition (Figure J). Please download the setup files and either burn them to a CD-ROM or copy them to a flash memory drive.

Note: You can also copy files over the network as well.

Figure J

Install Virtual Server 2005
Accept the License Agreement (Figure K) and choose a Custom Installation (Figure L).

Figure K

License Agreement

Figure L

Custom Installation
On the Custom Setup window, as shown in Figure M, it is VERY important to deselect Virtual Server Web Application. You MUST do this to get virtual server working properly in Windows Server Core.

Figure M

Deselect Virtual Server Web Application
Figures N and O complete the installation of Virtual Server. Restart the computer with the following command to continue:
shutdown /r

Figure N


Figure O

Setup complete SEQ Figure \* ARABIC
Let's move on and enable the following ports on your firewall as shown in Figure P.

Figure P

Enable ports

You must also enable a firewall exception for VMRC:

netsh fi add all "c:program filesMicrosoft Virtual Servervssrvc.exe" "Virtual Server" ENABLE.
Now you must run the following script (Listing A) (source from Virtual PC Guy):

Listing A

set vs = wscript.createobject("VirtualServer.Application")

vs.VMRCEnabled = True

vs.VMRCAdminportNumber = 5900

vs.VMRCIdleconnectionTimeOutEnabled= false

vs.VMRCXResolution = 800

vs.VMRCYResolution = 600

Copy this script into notepad and save it as Script1.vbs. Copy it to a flash key and on the Windows Server Core browse to the file and execute it by typing the following command:

cscript script1.vbs.
Let's move on to the next script (source from Virtual PC Guy) and run (Listing B) the following:

Listing B

Dim ace

set objVs = wscript.CreateObject("VirtualServer.Application")

Set objSecurity = WScript.CreateObject("VirtualServer.VMSecurity")

set objSecurity = ObjVs.Security

Set ace = objSecurity.AddEntry("wdsDomain admins",vmAccessRights_Allowed)

ace.WriteAccess = True

ace.ReadAccess = True

ace.ExecuteAccess = True

ace.DeleteAccess = True

ace.ReadPermissions = True

ace.ChangePermissions = True

ObjVs.Security = objSecurity

Copy this script into notepad and save it as Script2.vbs. Copy it to a flash key and on the Windows Server Core browse to the file and execute by typing the following command:

cscript script2.vbs.

Note: If you want to copy data over to your Windows Server Core, you can create a share by typing the following:

net share virtualshare=c: /GRANT: Everyone,FULL.

We are in the homestretch now. Our next step is to take another server or workstation on the domain and install the Microsoft Virtual Machine Remote Control Client Plus (VMRC) tool. This tool requires the .NET framework as well and allows you to administer Virtual Server without IIS installed.

Next, type the NETBIOS name of your Windows Server Core or the IP address. You can now create virtual machines (Figure Q) on a hardened kernel of Windows (Figure R).

Figure Q

Virtual machines

Figure R

Hardened kernel

It works

I hope you enjoyed this tutorial as much as I enjoyed writing it. Virtual Server on Windows Server 2008 Core is performing great — I have 20 virtual machines currently running simultaneously for all of my TechRepublic labs. Stay tuned for a tutorial on running virtual machines in XENEnterprise.

Editor's Picks