کد:
http://www.hyper-v-mart.com/HowTo/Create_HyperV_Virtual_Machine.aspx
Requirements

We will install all Windows Hyper-V servers at "C:\HyperV" folder. Each virtual machine will have its separated sub folder. The sub folder name will be the virtual machine's host name. Here is an example "C:\HyperV\TestVM". All information about this virtual machine will be under this folder (Disk file "C:\HyperV\TestVM\TestVM.vhd", virtual machine configuration "C:\HyperV\TestVM\Virtual Machines" and snapshots "C:\HyperV\TestVM\SnapShots").
Step by Step Guide

1) Change the default Hyper-V folders

Please see How To Change Windows Hyper-V Default Folders to Store Hard Disk File and Virtual Machine Configuration File?.
2) Create Physical Folder Manually

You need to create a physical folder to store the hard disk file and configuration files first. It is "C:\HyperV\TestVM" or what ever you want.
3) Open Windows Hyper-V Manager

Windows Server 2008 Start > Programs > Administrative Tools > Hyper-V Manager.
4) New Virtual Machine

Click "New > Virtual Machine" in the right side "Actions" panel.
5) Specify Name and Location

Put "TestVM" as name and check on "Store the virtual machine in a different location" but leave "C:\HyperV" as it is. Then click "Next >".
6) Assign Memory

Specify the amount of memory to allocate to this virtual machine. You can specify an amount from 8MB through the maximum physical memory. Then click "Next >".
7) Configure Networking

Choose "External Virtual Network" from the dropdown list. If it is not in the list, you need to create the virtual network first. Then click "Next >".
8) Create Virtual Hard Disk

Leave the name and location as default. Specify the hard disk size (25GB) based on your requirement. Then click "Next >".
9) Install Operating Sysem Optionst

Choose the default "Install an operating system later". Then click "Next >".
10) Review and Confirm

Review the configuration information. Click "Finish" button if everything looks ok.
11) Check the file structure

The file structure should be similar with below. Now you are ready to load operating system to your Hyper-V server. Please see Step by Step Guide to Install Windows Hyper-V Guest Operating System.






موضوعات مشابه: