• Aucun résultat trouvé

It’s possible to add the Hyper-V Manager to a Windows Server 2008 or Windows Vista NoTe

SP1 system that isn’t running the Hyper-V role. This enables you to remotely configure and control a Hyper-V host.

To add the Hyper-V Manager on a Windows Server 2008 system, launch Server Manager from the Start menu. Select Features, and then select Add Features. Under Remote Server Administration Tools, browse to Role Administration Tools, select Hyper-V Tools, and then click Install. After instal-lation, you can launch the Hyper-V Manager from Administrative Tools  Hyper-V Manager.

To add the Hyper-V Manager on a Windows Vista SP1 system, download the Update for Windows Vista (KB952627) from the Microsoft Download Center. After installation, you can launch the Hyper-V Manager from Administrative Tools  Hyper-V Manager. (Make sure you select the cor-rect package to download—packages for both x86 and x64 architectures are available.)

Creating a New Virtual Machine

To create a new VM, use the New Virtual Machine Wizard. To launch this wizard, select New  Virtual Machine. It will walk you through the initial configuration of the VM:

1. The Before You Begin page of the wizard is a simple introduction that provides an overview of the wizard (see Figure 3.2). It also provides a check box that you can select to prevent the page from appearing again, which can be a time-saver if you’re creating multiple VMs.

Figure 3.2 First page of the New Virtual Machine Wizard

2. On the Specify Name And Location page, you can set the VM’s name as well as the loca-tion of its supporting files (see Figure 3.3).

The name of the VM as set here is separate from the name that will be assigned to the WarNiNG

virtual operating system that is installed. One common gotcha is assigning the same name to two different VMs. Because the displayed name is a friendly form for a long, globally unique identifier behind the scenes, Hyper-V Manager doesn’t check to see whether the name already exists.

The VM’s location is where the configuration file and all the associated files will be created.

These files include the .BIN and .VSV files. When a VM is powered on, both .BIN and .VSV files are created. The .BIN file is used when the VM is powered on, and it’s the same size as the memory assigned to the VM. This file ensures that, in case of a system shutdown, the VM can be saved. When the state of the VM is saved, the .VSV file holds the VM’s memory so it can be restored at a later time.

One common reason to change the default location of the VM is so you can create a highly available VM. If you’re going to do so, then you need to create the VM on a shared volume.

We’ll cover that more in Chapter 8: “High Availability.”

3. On the Assign Memory page, the memory assigned to the VM is set. By default, it’s set at 512MB of RAM (see Figure 3.4). The maximum amount of RAM that can be assigned is one of two values: the amount of memory installed in the host, or 64GB (whichever is smaller).

Figure 3.3 Specify Name And Location page in the wizard

Creating a new Virtual MaCHine

|

37

We’ll cover memory best practices in Chapter 4, “Virtualization Best Practices.”

4. By default, the wizard will add a single virtual network adapter to the VM, as you can see on the Configure Networking page shown in Figure 3.5. The network adapter can be con-nected to any virtual network that has already been created. If you’re going to install the operating system (OS) via Pre-boot eXecution Environment (PXE), then make sure you select a valid virtual network on this page. If you leave the Connection option set to Not Connected, PXE can’t be used for OS installation (as you’ll see in step 6).

Figure 3.4 Assign Memory page

Figure 3.5 Configure Networking page

5. The Connect Virtual Hard Disk page controls where the OS for the VM will go. There are three options, two of which deal with virtual hard disk (VHD) files (see Figure 3.6).

Create A Virtual Hard Disk. This option creates a new VHD file for OS installation.

•u

The newly created VHD is completely blank. You can set the location as well as the size here.

When you create a new VM via the wizard, the VHD type is a dynamically expanding disk. For other types, such as a fixed size disk or a physical disk, you must configure the VM’s settings after the wizard completes. We’ll cover that later in this chapter.

Use An Existing Virtual Hard Disk. This option allows you to use a VHD that you’ve

•u

already created. We’ll cover how to create a library of VHD files in Chapter 4.

Attach A Virtual Hard Disk Later. Select this option if you plan to use a physical disk

•u

or a fixed-size VHD file. If you select this option, you can modify the VHD in the set-tings for the VM.

6. The Installation Options page provides a number of different ways that you can install the OS within the VM (see Figure 3.7):

Install An Operating System Later. If you choose this option, an OS isn’t installed in

•u

the VM.

Install An Operating System From A Boot CD/DVD-ROM. You can install operating

•u

systems either by using the physical CD/DVD-ROM drive on the host computer or by using an ISO file. An ISO file is an exact file copy of the contents of a physical piece of Figure 3.6

Options available on the Connect Virtual Hard Disk page

Creating a new Virtual MaCHine

|

39

CD/DVD-ROM media. Many software companies now ship electronic copies of OSs in the ISO file format. Installs that take place from an ISO file are generally faster than from the physical CD/DVD-ROM drive, because the installation is reading from a fast disk as opposed to a slower optical drive. Additionally, you can set up a central net-work share for multiple systems to access a library of ISO files.

The Installation Options page appears only if you created a new VHD in step 5. If you select NoTe

a VHD file that already exists, the wizard assumes that the existing VHD has an OS installed.

Only one VM at a time can install an OS from the physical CD/DVD-ROM drive.

NoTe

If you have a network share with operating system ISO files, they can be shared with all the NoTe

Hyper-V hosts in your environment. Simply add the machine account to the share permissions—

for example, HYPERV1$.

Install An Operating System From A Boot Floppy Disk. Some operating systems require

•u

the use of a boot floppy disk to start the installation. By selecting this option, you must use a virtual floppy disk (VFD) file. A VFD file is similar to an ISO file—it’s a file-based representation of the physical medium.

Hyper-V can’t directly access the physical floppy disk drive on the host computer.

NoTe Figure 3.7 Installation Options page

Install An Operating System From A Network-Based Installation Server. Hyper-V

•u

includes the capability to boot the VM over the network using the PXE protocol. You can install a variety of operating systems over the network by using the PXE protocol, including Windows Server 2008. In order to perform a network-based installation, you must use a legacy network adapter.

If you selected a virtual network earlier in the setup process, and you then select the Install An Operating System From A Network-Based Installation Server option, the network adapter added to the VM will be a legacy network adapter, and the boot order will be modified to boot over the network first.

7. Completing The New Virtual Machine Wizard appears next. Finally, the VM creation is complete. The last screen provides a summary of the newly created VM (see Figure 3.8).