Tải bản đầy đủ (.pdf) (10 trang)

SQL Server 2008 Hyber V Unleashed - p 34 docx

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (742.46 KB, 10 trang )

ptg6432687
310
10 Creating Guest Images from Existing Production and Virtual Systems
. Copy the hard disk.
. Deploy the file (using Background Intelligent Transfer Service, BITS).
. Make the operating system virtualizable.
. Install the VM components.
. Start the VM to install the VM components.
. Stop the VM.
. Remove the source machine agent.
. Remove the VMM agent.
Finalizing the P2V Online Conversion
After the physical computer has been captured and deployed as a VM, the administrator
can turn off the source physical computer and start the new VM.
NOTE
If the physical computer is using only direct attached storage, take care to copy any
data that has changed since the P2V process began, if necessary. How this data is
collected depends on the type of data and how it is stored. On local databases, for
example, the database may have to be taken offline (quiesced), migrated to temporary
storage, and copied to the newly created VM.
Performing a V2V Conversion
During a V2V conversion, an existing VMware ESX VM configuration file and its associ-
ated virtual disk files are converted to Hyper-V VM files.
The VMM administrator does not need administrator rights on the VMware VM to
perform the conversion because the V2V conversion is just converting files to another
type. The VMware VM is turned off, and the files are copied to the VMM library for
conversion.
NOTE
The administrator should perform a disk defragmentation on the source computer’s
hard drives to help minimize the time required for the imaging phase. Also, ensure that
a fast network connection exists between the source and VMM computers.


Download at www.wowebook.com
ptg6432687
311
Performing a V2V Conversion
10
Performing a V2V Conversion
The administrator can use VMM to convert VMs that run on VMware ESX into Windows
2008 Hyper-V VMs. This is known as a virtual to virtual, or V2V, conversion.
Ensure that the source VM meets the operating system and additional requirements listed
at the beginning of this chapter.
Adding VMware VM Files to the VMM Library
Before the administrator can perform a V2V operation, the VMware server-based VM files
(VMX and VMDK) must be added to a VMM library, as follows:
1. Copy the VMX and VMDK files to the library share on the appropriate VMM
library server.
2. Open the VMM Administrator console and display Library view.
3. In the Navigation pane, expand Library Server, and then navigate to the library
share where the VMware files were copied.
4. Select the library share and in the Actions pane, and under Library Share, click
Refresh Library Server.
All files on the share will be immediately indexed by VMM and will be added to the
Library view.
Running the V2V Wizard
The V2V online conversion process is run from the VMM 2008 Administrator console as
follows:
1. Open the VMM Administrator console using the shortcut on the Windows desktop
or via the Start menu under Microsoft System Center, Virtual Machine Manager
2008, Virtual Machine Manager Administrator Console.
A Connect to Server window may open, prompting for the VMM server to connect
to. Enter the server name and connection port (the default is port 8100) using the

format VMMserver:port.
NOTE
You may ch oo se to always o pe n a c on ne ct io n t o th is ser ve r by s el ec ti ng th e Ma ke This
Server My Default check box. Doing so prevents this connection window from display-
ing when the Administrator console is run.
2. Go to the Library view by clicking the Library button, and then select the library
group where the files are stored.
3. Click Convert Physical Server in the Actions pane in the Library view. The Convert
Virtual Machine Wizard will run.
Download at www.wowebook.com
ptg6432687
312
10 Creating Guest Images from Existing Production and Virtual Systems
4. On the Select Source page, click Browse to open the Select Library Resource, as
shown in Figure 10.5.
. To search for a file, type the complete filename or the first few letters of the
filename in the Look For box.
. In the Library Group list, select the library group where the VM files are stored.
. To filter the files by group, click a group type in the Group By list.
. Click the VMX file to convert, and then click OK. Click Next to continue.
5. On the Virtual Machine Identity page, configure the following:
. Virtual Machine Name—Enter a new name for the VM or accept the default
name, which is the same as the source computer.
NOTE
Renaming the virtual machine name only renames the VM as it appears in the
Administrator console. It does not rename the actual computer account in Active
Directory.
FIGURE 10.5 Selecting a resource from the Convert Virtual Machine Wizard.
Download at www.wowebook.com
ptg6432687

313
Performing a V2V Conversion
10
. Owner—Accept the prepopulated domain\username value, enter a new
domain\username value or click Browse to choose a new value. The owner
account must be a member of Active Directory.
. Description—This optional field is used to describe the VM. Click Next.
NOTE
The owner of a VM is used to identify the owner of the new VM. It does not assign any
rights to the VM itself.
6. On the Virtual Machine Configuration page, select the number of processors and the
amount of RAM to use on the new VM.
7. On the Select Virtual Machine Host page, select the most suitable host to deploy the
new VM on, as shown in Figure 10.6. Each host has a star rating (from zero to five
stars) indicating its suitability to host the new VM.
FIGURE 10.6 Selecting the VM host.
Download at www.wowebook.com
ptg6432687
314
10 Creating Guest Images from Existing Production and Virtual Systems
NOTE
If a large number of hosts are listed, the administrator can use the Host Group, Look
For, or Group By fields to display a smaller set of possible hosts.
The Details tab displays the status, operating system, virtualization software plat-
form, virtualization software status, and names of VMs running on the selected host.
The Rating Explanation tab explains what the star rating means for the selected host
and tells what requirements are met for the VM by this host.
The SAN Explanation tab describes the suitability of the host to connect to a SAN for
VM storage. Items listed here include Fibre Channel HBAs installed and iSCSI initia-
tors installed.

NOTE
The ratings can be customized using the Customize Ratings button. Here, the adminis-
trator can select multiple criteria and assign weights of importance for each compo-
nent, such as processor load, memory used, network utilization, and so forth.
Select the host on which to deploy the new VM and click Next.
8. On the Select Path page, select the folder where the files associated with the new VM
should be placed. The default folder is %SYSTEMDRIVE%\Documents and
Settings\All Users\Documents\Shared Virtual Machines. Accept the default or click
Browse to select a different path. Click Next.
9. On the Select Networks page, the Virtual Network drop-down list will display all the
current networks available on the selected host. Select Not Connected or the appro-
priate virtual network for the VM to use. Click Next.
10. On the Additional Properties page, configure the following:
. Automatic Start Action—Select the action to perform for this VM when the
physical host starts. Available actions are as follows:
Never automatically turn on the VM.
Always automatically turn on the VM.
Automatically turn on the VM if it was running when the physical server
stopped.
. Automatic Stop Action—Select the action to perform for this VM when the
physical host shuts down. Available actions are as follows:
Save state. This action is similar to the Windows Hibernate function.
Turn off VM. This action is equivalent to turning the power off and does
not provide a graceful shutdown.
Download at www.wowebook.com
ptg6432687
315
Performing a V2V Conversion
10
Shut down guest OS. This provides a graceful shutdown of the operating

system.
11. The Summary page displays a summary of the settings selected in the Convert
Physical Server Wizard. Carefully review these settings and click Create to proceed
with the V2V conversion or click Previous to go back and change the configuration.
An optional check box can be selected to start the VM immediately after deploying
it to the host.
As with many actions performed from the VMM Administrator console, the Convert
Physical Server Wizard offers a View Script button. This option enables the adminis-
trator to view, modify, and save the PowerShell commands that the wizard will
execute to perform the V2V conversion, as shown in Figure 10.7.
12. In the Jobs view of the Administrator console, the administrator can monitor the
progress of the V2V conversion and confirm that the VM is created successfully, as
shown in Figure 10.8. If the job fails, read the error message in the Details pane for
information about the cause of the failure and the recommended course of action to
resolve the issue.
FIGURE 10.7 Convert virtual server script.
Download at www.wowebook.com
ptg6432687
316
10 Creating Guest Images from Existing Production and Virtual Systems
The V2V process may take several minutes, but is significantly faster than a P2V conver-
sion. It consists of the following steps:
. Collect the machine configuration information from the VMX file.
. Create the VM.
. Convert the VMDK file to a VHD file.
. Deploy the file (using LAN).
. Make the operating system virtualizable.
. Install the VM components.
. Start the VM to install the VM components.
. Stop the VM.

. Remove the source VMX machine configuration.
Finalizing the V2V Conversion
After the VMware ESX VM has been deployed as a Hyper-V VM, the administrator can
start the new VM.
Further configuration and customization of the VM can be performed from the VMM
Administrator console from the Virtual Machines view. Select the VM and click Properties
in the Action pane.
FIGURE 10.8 Monitoring the V2V conversion job.
Download at www.wowebook.com
ptg6432687
317
Creating a Virtual Lab
10
Creating a Virtual Lab
The processes listed in this chapter can be used to create a lab environment for testing and
application development.
Using P2V to Create a Virtual Copy of Production
The P2V conversion functions of VMM 2008 provide a simple, nonintrusive way to create
a virtualized copy of the production environment.
Because VMM uses the VSS to make online copies of production computers, the P2V
process will not disrupt the normal operation of these computers. Furthermore, the script-
ing functions of the VMM command shell enable the administrator to automate the P2V
process, simplifying the entire lab-creation process.
Choosing What to Convert
Even complex distributed environments can be virtualized into a lab using the P2V
process. For example, a large environment may include many domain controllers,
Exchange 2007 servers, file and print servers, and application servers. Depending on the
organization’s testing needs, the administrator may be able to create a suitable testing
environment with just one of each type of server.
In another scenario, the administrator may want to virtualize only the servers necessary to

perform a series of tests, such as a domain controller for authentication and two or three
application servers to test replication and fault tolerance.
CAUTION
Care must be taken to ensure that the lab environment is isolated from the production
environment to prevent unintended changes to the production environment. This can
be achieved by using a separate network, or even better, by physically isolating the lab
from the production network.
Automating the Lab-Creation Process Using the Command Shell
Administrators can leverage the View Script button that is available on the Summary page
of the P2V and V2V wizards. The entire P2V or V2V process can be configured using the
wizards up to the point where the VMs are actually created. At that point, click the View
Script button and save the resulting script to a scripts folder.
These scripts can be customized, duplicated, and grouped together to automate the entire
lab-creation process. For example, the administrator may have a script called
CreateTestDomain.ps1 that will automatically create VMs of a physical domain controller,
Exchange 2007 server, and a line-of-business application server, and then deploy it to a
Hyper-V host for testing. This script may even be run as a scheduled task for even further
automation.
Download at www.wowebook.com
ptg6432687
318
10 Creating Guest Images from Existing Production and Virtual Systems
Summary
In this chapter, we have discussed the process of creating Hyper-V VMs that were
converted from physical servers (P2V). This process can be performed online without
disrupting the physical server by using the VSS. This process can be used to reduce the
number of physical servers in the organization’s environment.
VMware ESX VMs can be converted to Hyper-V VMs using the virtual to virtual (V2V)
capabilities built in to VMM 2008. This is a quick and easy way to convert from VMware
ESX and realize the benefits of Hyper-V.

Both of these processes can be used to create virtual labs for use in testing and application
development.
Best Practices
. Use VMM’s P2V function to convert physical computers to VMs.
. Use the VMM V2V function to convert VMs created on VMware ESX to Hyper-V VMs.
. Use the online P2V process to convert physical computers to VMs without disrupt-
ing the online server.
. Use the offline P2V process to convert offline physical computers to Hyper-V VMs.
. Know which operating systems can be converted to VMs using the P2V and V2V
processes before attempting the conversion.
. Use the Microsoft Virtual Server 2005 Migration Toolkit (VSMT) to convert Windows
NT Server 4.0 computers to VMs.
. Ensure that source computers are members of the same domain as the VMM server
or that there is a full two-way trust with the VMM server’s domain.
. Perform a disk defragmentation on the source computer before performing the P2V
conversion.
. Ensure that a fast network connection exists between the source computer and the
VMM server.
. Renaming the VM name only renames the VM as it appears in the VMM Administrator
console. Be sure to also rename the computer within the operating system.
. Use the owner property of a VM to identify the owner or contact person for the VM.
. Ensure that the WMI service is running on the source computer and that a firewall is
not blocking HTTP and WMI traffic to the VMM server.
. Remove the RemoteAdmin firewall exception, if necessary, after the conversion is
complete to increase server security.
Download at www.wowebook.com
ptg6432687
319
Best Practices
10

. Increase the size of a dynamic VHD to allocate more space for the VM if necessary.
. Ensure that the size of a fixed-size VHD includes enough additional space for addi-
tional data.
. When selecting which host to deploy to, use the Host Group, Look For, or Group By
fields to display a smaller set of possible hosts.
. Use the Customize Ratings button to customize the importance of computer and
network resources available on hosts.
. Use the Jobs view to monitor the progress of P2V and V2V conversions.
. Review the details in the Jobs view for errors and to determine the cause of failures
and the recommended course of action to resolve issues.
. Pay special attention to collect any data that was changed on the source server after
the conversion process was begun.
. Copy VMware ESX VMX and VMDK files to a VMM library that is closest to the host
server to speed VM conversion.
. Always refresh the VMM library server after adding files to the library.
. Use the P2V process to create a virtual copy of the organization’s production envi-
ronment for testing.
. Create virtual labs that contain only the servers needed for testing.
. Ensure that the lab environment is isolated from the production environment to
prevent unintended changes to the production environment.
. View, save, and customize the scripts that the P2V and V2V conversion wizards
produce.
. Automate lab creation using the VMM command shell.
Download at www.wowebook.com

×