虚拟化 频道

Hyper-V R2动手实验之建虚拟硬盘和虚机

  【IT168 虚拟化频道】在新发布的Windows Server 2008 R2中,对于虚拟化而言,Hyper-V R2的实时迁移、支持最多可运行384个虚拟机、热添加/移除虚拟存储等诸多新功能都给我们留下了深刻的印象。在本系列动手实验中,我们将就Hyper-V R2的安装、配置Hyper-V R2设置和虚拟网络、建立虚拟硬盘和虚拟机、虚拟机设置、快照和高可用性等环节进行Step by Step学习,为您全面了解掌握Hyper-V R2打下良好基础。

  本文阐述如何建立虚拟硬盘和虚拟机。

  一、建立新的虚拟硬盘

  任务A:建立一个新的虚拟硬盘

  步骤:

  1.打开Hyper-V Manager。

  2.在Actions面板,点击New | Hard Disk。

  3.出现New Virtual Hard Disk Wizard窗口,通过More about virtual hard disks链接回顾可用信息,点击Next。

  4.在Choose Disk Type页面,在每一个虚拟硬盘类型之下回顾描述。

  5.点击Dynamically expanding,点击Next。

  6.在Specify Name and Location页面,在Name区域,输入SEA-WEB-01。

  7.在Location区域旁边,点击Browse。

  8.出现Select Folder对话框后,浏览到E:\Hyper-V\Virtual Hard Disks\,点击OK,点击Next。

  9.在Configure Disk页面,点击Create a new blank virtual hard disk。

  10.在Size区域,输入250,点击Next。

  11.在Completing the New Virtual Hard Disk Wizard页面,回顾设置,点击Finish。

  12.点击Start,点击Computer。

  13.浏览E:\Hyper-V R2\Virtual Hard Disks,检查文件SEA-WEB-01.vhd已存在并注意文件的大小。

  任务B:复制已经存在的虚拟硬盘

  步骤:

  1.右键点击SEA-WEB-01.vhd,点击Copy。

  2.点击Edit,点击Paste。

  3.右键点击SEA-WEB-01 - Copy.vhd,点击Rename。

  4.输入SEA-WEB-02,按回车。

  5.最小化Windows浏览器。

  任务C:从一个物理硬盘建立一个新的虚拟硬盘

  步骤:

  1.打开Hyper-V Manager。

  2.在Actions面板,点击New | Hard Disk。

  3.出现New Virtual Hard Disk Wizard窗口,点击Next。

  4.在Choose Disk Type页面,点击Next。

  5.在Specify Name and Location页面,在Name区域,输入SEA-Hyper-V-01.vhd,点击Next。

  6.在Configure Disk页面,点击Copy the contents of the specified physical disk。

  7.打开Server Manager。

  8.在控制台树中,展开Storage,点击Disk Management。

  9.在details面板,检查磁盘C:\位于Disk 0。

  10.最小化Server Manager。

  11.在Physical Hard Disk list,点击\\.\PHYSICALDRIVE0,点击Next。

  12.在Completing the New Virtual Hard Disk Wizard页面,回顾设置,点击Finish。

  13.打开Windows Explorer。

  14.检查文件SEA-Hyper-V.vhd已存在并注意文件大小。将物理硬盘复制到虚拟硬盘可能需要花费几分钟。如果需要,按F5刷新。根据物理硬盘的大小,这个过程可能需要几个小时。

  15.最小化Windows浏览器。

  16.在Creating the new virtual hard disk对话框,点击Cancel。

  17.出现New Virtual Hard Disk Wizard对话框,点击Close,点击Cancel。

  结果:在这个练习后,您将得到3个VHD文件,取消SEA-Hyper-V-01.vhd的建立。

  二、建立新的虚拟机

  任务A:建立虚拟机SEA-WEB-01

  步骤:

  1.打开Hyper-V Manager。

  2.在Actions面板中,点击New | Virtual Machine。

  3.出现New Virtual Machine Wizard,回顾Before You Begin information中的信息,点击Next。

  4.在Specify Name and Location页面,在Name区域,输入SEA-WEB-01,点击Next。

  5.在Assign Memory页面,在Memory区域,输入512,点击Next。

  6.在Configure Networking页面,在Connection列表中,点击Test Environment。点击Next。

  7.在Connect Virtual Hard Disk页面,点击Use an existing virtual hard disk。

  8.点击Browse。

  9.出现Open对话框窗口,点击SEA-WEB-01.vhd,点击Open。

  10.点击Next。

  11.在Completing the New Virtual Machine Wizard页面,回顾设置。

  12.点击Finish。

  任务B:向SEA-WEB-01添加第二个VHD文件
   
        步骤:


  1.在Virtual Machines面板中,点击SEA-WEB-01。

  2.在Actions面板中,在SEA-WEB-01,点击Settings。

  3.出现Settings for SEA-WEB-01对话框,在左侧面板中,点击IDE Controller 0。

  4.在右侧面板中,点击Hard Drive,点击Add。

  5.在Media下面,点击Browse。

  6.出现Open对话框,点击SEA-WEB-02.vhd,点击Open。

  7.点击Apply。

  任务C:挂接操作系统安装媒介

  步骤:

  1.在左侧面板中,在IDE Controller 1下面,点击DVD Drive。

  2.在右侧面板中,在Media下面,点击Image file。

  3.点击Browse。

  4.出现Open对话框,浏览到E:\Mod04\Labfiles。

  5.点击6001.18000.080118-1840_amd64fre_Server_en-us-KRMSXFRE_EN_DVD.iso,点击Open。

  6.在Settings for SEA-WEB-01对话框中,点击OK。

  任务D:连接到虚拟机并安装Windows Server 2008

  步骤:

  1.在Virtual Machines面板中,点击SEA-WEB-01。

  2.在Actions面板中,点击Start。

  3.在Actions面板中,点击Connect。

  4.虚拟机可坑内无法正常捕捉到鼠标,直到安装了Hyper-V集成服务。如果出现这种情况,使用键盘启动Windows Server 2008安装。

  5.出现SEA-WEB-01 on 6422-Hyper-V - Virtual Machine Connection窗口,当Install Windows向导出现,按两次回车。

  6.在Type your product key for activation页面,点击Next。

  7.出现Install Windows对话框,回顾信息,点击No。

  8.在Select the edition of Windows that you purchased页面,点击Windows Server 2008 Enterprise (Server Core Installation)。

  9.选择I have selected the edition of Windows that I purchased,点击Next。

  10.在Please read the license terms页面,选择I accept the license terms,点击Next。

  11.在Which type of installation do you want页面,点击Custom(advanced)。

  12.在Where do you want to install Windows页面,点击Next。现在会开始安装过程。

  13.在宿主机上关闭SEA-WEB-01。

  结果:在这个练习后,您将拥有一个基于上一个练习中的VHD建立的虚拟机,并正在安装Windows Server 2008。

0
相关文章