Mounting a Physical CD/DVD Image or Mounting a CD/DVD Image File When installing software on a guest session of a virtual server system, the administrator either inserts a CD or DVD into
Trang 15 Installing a Guest Session on Hyper-V
NOTE
You cannot change the allocated RAM on a running virtual guest session The guest
session must be shut down first, memory reallocated to the image, and then the guest
image booted for the new memory allocation to take effect
Changing Network Settings for the Guest Session
Another common configuration change made to a guest session is to change the network
setting for the guest session An administrator of a virtual server might choose to have
each guest session connected directly to the network backbone just as if the guest session
had a network adapter connected to the backbone, or the network administrator might
choose to set up an isolated network just for the guest sessions The configuration of the
internal and external network segments that the administrator can configure the guest
sessions to connect to is covered in the “Managing Host Server, Virtual Switch, and Disk
Setting,” section of Chapter 6
The common configuration methods of the virtual network configurations can be broken
down into two groups, as follows:
Direct addressing—The guest sessions can connect directly to the backbone of the
network to which the virtual server host system is attached In this instance, an
administrator would configure an external connection in the Virtual Network
Manager and have an IP address on that external segment
Isolated network—If the administrator wants to keep the guest sessions isolated off
of the network backbone, the administrator can set up an internal connection in the
Virtual Network Manager, and the guest sessions would have an IP address of a
segment common to the other guest sessions on the host system In this case, the
virtual server acts as a network switch connecting the guest sessions together
NOTE
To connect the internal network segment with the external network segment, a guest
session can be configured as a router or gateway between the internal network and
external network
Mounting a Physical CD/DVD Image or Mounting a CD/DVD Image File
When installing software on a guest session of a virtual server system, the administrator
either inserts a CD or DVD into the drive of the physical server and accesses the disc from
the guest session or mounts an ISO image file of the disc media
To access a physical CD or DVD disc or to mount an image of a CD or DVD, do the
following:
1 From the Server Manager console or from the Hyper-V MMC snap-in, click to select
the guest session for which you want to change the CD or DVD
2 Right-click the guest session name, and choose Settings
Trang 23 Click DVD Drive and choose Physical CD/DVD Drive if you want to mount a disc in
the physical drive of the host system, or click Image File and browse for the ISO
image file you want to mount as a disc image
4 Click OK when you have finished
Other Settings to Modify for a Guest Session Configuration
Other settings can be changed for a guest session These options can be modified by going
into the Settings option of the guest session and making changes These other settings
include the following:
BIOS—This setting allows for the selection of boot order on the guest machine to
boot in an order that can include floppy, CD, IDE (disk), or network boot
Processor—Hyper-V provides the ability to allocate core processors to the guest
image, so a guest image can have up to four core processors allocated for each
session In addition, resource control can be weighted between guest sessions by
allocating system resource priority to key guest server sessions versus other guest
sessions
IDE Controller—The guest session initially has a single virtual hard drive associated
with it Additional virtual hard drives can be added to a virtual guest session
SCSI Controller—A virtual SCSI controller can be associated with a virtual guest
session, too, providing different drive configuration options for the different drive
configurations
COM Ports—Virtual communication ports such as COM1 or COM2 can be
associat-ed with specific namassociat-ed pipes for input and output of information
Launching a Hyper-V Guest Session
After a Hyper-V guest session has been created, and the settings have been properly
modi-fied to meet the expected needs of the organization, the virtual guest session can now be
launched and run Decisions need to be made whether you want the guest session to
auto-matically launch as soon as the server is booted, or whether you want to manually launch
a guest session In addition, a decision needs to be made on the sequence in which guest
sessions should be launched so that systems that are prerequisites to other sessions come
up first As an example, you’d want a global catalog server session and DHCP server
session to come up before an application server that logs on and authenticates to Active
Directory comes online and needs to authenticate to Active Directory before the server
service begins
Automatically Launching a Guest Session
One option for launching and loading guest sessions is to have the guest session boot
right after the physical server completes the boot cycle This is typically the preferred
option if a guest session is core to the network infrastructure of a network (such as a
Trang 35 Installing a Guest Session on Hyper-V
FIGURE 5.4 Automatic start actions
domain controller or host server system) so that in the event of a physical server reboot,
the virtual guest sessions boot up automatically, too It would not be convenient to have
to manually boot each virtual server session every time the physical server is rebooted
The option for setting the boot option for a virtual session is in the configuration settings
for each guest session
To change the boot action, do the following:
1 From the Server Manager console or from the Hyper-V MMC snap-in, right-click the
virtual machine for which you want to change the setup option, and select Settings
2 In the Management section of the settings, click Automatic Start Action
3 You are provided three options, as shown in Figure 5.4, of what to do with this
virtual guest session upon boot of the physical server Either click Nothing (which
would require a manual boot of the guest session), click Automatically Start If It Was
Running When the Service Stopped, or click Always Start This Virtual Machine
Automatically To set the virtual session to automatically start after the physical
server comes up, choose the Always Start This Virtual Machine Automatically option
4 Also on this setting is the ability to have an automatic start delay This allows you to
sequence the boot of image files by having some images take longer to automatically
start than others Click OK to save these settings
Trang 4Manually Launching a Guest Session
Another option for guest session boot is to not have a guest session automatically start
after a physical server boots This is typically the preferred option if a guest session will be
part of a demonstration or test server where the administrator of the system wants to
control which guest sessions are automatically launched, and which sessions need to be
manually launched It would not be convenient to have a series of demo or test sessions
automatically boot every time the system is booted The administrator of the system
would typically want to choose to boot guest sessions
To set the boot action to manually launch a guest session, do the following:
1 From the Server Manager console or from the Hyper-V MMC snap-in, right-click the
virtual machine for which you want to change the setup option, and select Settings
2 In the Management section of the settings, click Automatic Start Action
3 When provided the three options of what to do with this virtual guest session upon
boot of the physical server, either click Nothing (which would require a manual boot
of the guest session), click Automatically Start If It Was Running When the Service
Stopped, or click Always Start This Virtual Machine Automatically Choose the
Nothing option and the session will need to be manually started
Save State of a Guest Session
In Windows 2008 Hyper-V, there are two concepts for saving guest images, one being
snapshots and the other being a saved state At any time, an administrator can select a
guest session and choose Action, Save State This Save State function is similar to a
Hibernate mode on a desktop client system It saves the image into a file with the option
of bringing the saved state image file back to the state the image was in before being
saved
Installing the Windows Guest Session Integration
Tools
Hyper-V provides integration tools that are components and drivers that get added into
the guest session of the operating system For Linux-based guest sessions, the Linux
inte-gration components were installed as part of the installation of the operating system
However, for Windows server and client guest sessions, the integration tools are installed
after the operating system has been installed The Windows integration tools include
specific drivers for the network adapter, hard drive controller drivers, sound drivers, and
the like Instead of using legacy drivers, the drivers with the integration tools are
opti-mized to provide better performance and better integration of the guest operating system
as a virtual guest session
Microsoft provides integration tools for the core operating systems they support as guest
sessions Additional integration tools will be released by Microsoft as they add support for
other guest sessions
Trang 55 Installing a Guest Session on Hyper-V
FIGURE 5.5 Adding the integration tools
Installing the Windows Integration Tools
The integration tools for Windows are installed from a virtual CD that is mounted when
you select to install the integration tools on the guest session The Windows integration
tools require the following operating systems:
Windows Server 2008 x86 and x64
Windows Server 2003 SP2 or later x86 and x64
Windows Vista x86
Windows XP SP3 or later x86
To install the Windows integration tools, do the following:
1 Start the virtual Windows guest session that you want to install the integration
tools onto
2 Log on as an administrator to the guest session, effectively an administrator that has
the security rights to install drivers and applications onto the guest session (typically
a local or domain administrator)
3 On the guest session window, choose Action, Install Integration Services Setup Disk,
as shown in Figure 5.5
Trang 64 Within the Windows guest session, you will be prompted to launch the integration
tools installation utility Click the installation utility to begin the installation
5 Reboot the guest session, and the integration tools will now be activated
What you’ll find with the integration tools is that the mouse no longer gets “captured,”
nor does it have to be “released” as required before the integration tools were installed
With the integration tools installed, the mouse will have control of the guest session
when the mouse is within the guest session window, and the mouse will control host
session screens when the mouse is outside of a guest session window
Using Snapshots of Guest Operating System Sessions
A highly versatile function in Windows 2008 Hyper-V is the option to create a snapshot of
a guest session A snapshot in Windows Hyper-V uses Microsoft Volume Shadow Copy
Service (VSS) technology, which captures an image of a file on a server—in this case, the
file is the VHD image of the virtual server itself At any point in time in the future, the
snapshot can be used for recovery
Snapshots for Image Rollback
One common use of a guest image snapshot is to roll back an image to a previous state
This is frequently done with guest images used for demonstration purposes, or test labs
where a scenario is tested to see the results and compared with identical tests of other
scenarios, or for the purpose of preparing for a software upgrade or migration
For the case of a guest image used for demonstration purposes, a user might run through a
demo of a software program where he adds information, deletes information, makes
soft-ware changes, or otherwise modifies information in the softsoft-ware on the guest image
Instead of having to go back and delete the changes, or rebuilding the image from scratch
to do the demo again, with a snapshot the user can just roll the image back to the
snap-shot that was available before the changes were made to the image
Image rollback has been successfully used for training purposes where an employee runs
through a process, then rolls back the image so that he can run through the same process
all over again, repeating the process on the same base image but without previous
installa-tions or configurainstalla-tions
In network infrastructures, a snapshot is helpful when an organization applies a patch or
update to a server, or a software upgrade is performed and problems occur; the
administra-tor can simply roll the image back to the point prior to the start of the upgrade or
migration
Snapshots for Guest Session Server Fault Tolerance
Snapshots are commonly used in business environments for the purpose of fault tolerance
or disaster recovery A well-timed snapshot right before a system failure can help an
orga-nization roll their server back to the point right before the server failed or problem
Trang 75 Installing a Guest Session on Hyper-V
FIGURE 5.6 Viewing snapshots of a guest server
occurred Instead of waiting hours to restore a server from tape, the activation of a
snap-shot image is nothing more than choosing the snapsnap-shot and selecting to start the guest
image When the guest image starts up, it is in the state that the image was at the time the
snapshot was created
Creating a Snapshot of a Guest Image
Snapshots are easy to create To create a snapshot, do the following:
1 From the Server Manager console or from the Hyper-V MMC snap-in, click to select
the guest session for which you want to create a snapshot
2 Right-click the guest session name, and choose Snapshot A snapshot of the image
will immediately be taken of the guest image, and the snapshot will show up in the
Snapshots pane, as shown in Figure 5.6
Rolling Back a Guest Image to a Previous Snapshot Image
The term used in Windows 2008 Hyper-V to roll back an image is applying a snapshot to
an existing image When an image is rolled back, the image currently running has the
snapshot information applied to the image, thus bringing the image back to an earlier
configuration state To apply a snapshot, do the following:
1 From the Server Manager console or from the Hyper-V MMC in, click the
snap-shot to which you want to revert the running guest image
Trang 82 Right-click the snapshot image and choose Apply The configuration state of the image
will immediately be reverted to the state of the image when the snapshot was taken
NOTE
By default, the name of the snapshot image takes on the date and time the image was
created As an example, if the image is called Windows 2008 IIS, an image taken on
April 26, 2008 at 6:19 a.m will show up as Windows 2008 IIS-20080426-061900
Reverting a Snapshot Session
When working with snapshots, if you snapshot a session and then apply an older session
snapshot to the current session, to effectively undo the rollback choose Action, Revert to
bring the server back to the state it was in before the rollback had occurred
Summary
The installation of a guest session in Windows 2008 Hyper-V is nothing more than
running an Installation Wizard that provides prompts to specify memory, processor, disk,
and other resources that’ll be allocated for the guest session Then you just insert the guest
session operating system and walk through the installation procedure of the operating
system
Hyper-V supports the installation of Windows 2003 Server, Windows 2008 Server, Windows
Vista, Windows XP, and non-Windows clients such as SUSE Linux Enterprise Server 10
The process of installing guest sessions, whether Windows or non-Windows, is the same
After a guest session has been installed, the integration tools for the operating system can
be installed on the system These provide better drivers for disk, network, audio, and the
like The integration tools are available for the supported guest operating systems and
provide better mouse control and switching between guest and host sessions on keyboard
and the mouse
This chapter focused on the new installation of a guest operating system For the
conver-sion of existing physical or virtual sesconver-sions to a Hyper-V virtual guest sesconver-sion, see Chapter
10, “Creating Guest Images from Existing Production and Virtual Systems.”
Best Practices
The following are best practices from this chapter:
Select the guest operating system you want to install on Hyper-V from the list of
operating systems supported by Microsoft on Hyper-V
Refer to Chapter 3 to properly size the Hyper-V host server to accept the amount of
resources required for the guest sessions
Trang 95 Installing a Guest Session on Hyper-V
Refer to Chapter 4 to properly install the Hyper-V host role on a Windows Server
2008 system, whether that is a full server configuration or a server running Windows
200 Server Core
Have the installation media and license keys needed for the installation of the
guest operating system handy when you are about to install the guest operating
system session
Apply all patches and updates on guest sessions soon after installing the guest
oper-ating system, just as you would for the installation of updates on physical systems
For Microsoft Windows guest sessions, install the Windows integration tools to
improve the use and operation of the guest session
For SUSE Linux guest sessions, install the Linux integration tools to improve the use
and operation of the guest session
After installing the guest session and its associated applications, confirm whether the
memory of the guest session is enough, and adjust the memory of the guest session
accordingly to optimize the performance of the guest session
Allocate enough disk space to perform snapshots of images so that the disk
subsys-tem can handle both the required guest image and the associated snapshots of the
guest session
Consider using snapshots before applying major patches, updates, or upgrades to an
image session to allow for a rollback to the original image
Set a guest session to automatically launch if the guest session is a live server on the
network; that way, the Hyper-V host reboots, and the guest session will start soon
after the Hyper-V host has restarted
Trang 10Administering and
Maintaining Hyper-V
Host Services
IN THIS PART
Maintaining a Hyper-V Host Server 151