網頁

2013年4月6日 星期六

Hyper-V 3.0 --- Create VM that its virtual hard disk (VHDX) with parent-child relationship (part 8)

For saving hard disk space in virtualization lab, we will generally create a virtual hard disk with parent-child relationship. Thanks every virtualization vendors to supply the related tool in its product. In the moment, I will introduce you “How to do it when there is existing CentOS 6.3 VM in Hyper-V 3.0?”
ScreenHunter_06
Define the folder to store VM files
For clearly making a distinction about VM stored location, we can design the different folder or the different physical disk to store these files for management and maintenance. So do that we don’t worry happen disk space or performance issue in the future.ScreenHunter_07When we have already desired the VM location by Explorer, the next step will be change VM stored path in Hyper-V setting.ScreenHunter_08
Create a new VM without virtual hard disk
In Hyper-V Manager, right-click the Hyper-V Server next to select New and Virtual Machine… in menu to launch New Virtual Machine Wizard.ScreenHunter_09In Before You Begin dialog, click Next > buttonScreenHunter_10In Specify Name and Location dialog, write down a VM name as “HV-CENTOS-01”, enable Store the virtual machine in a different location check box and then click Next > buttonScreenHunter_11In Assign Memory dialog, define Startup memory as “512 MB”, enable Use Dynamic Memory for this virtual machine check box and then click Next > buttonScreenHunter_12In Configure Networking dialog, choose one network adapter next to click Next > buttonScreenHunter_13In Connect Virtual Hard Disk dialog, choose Attach a virtual hard disk later option next to click Next > buttonScreenHunter_14Click Finish button to complete the New Virtual Machine WizardScreenHunter_15And its related files will be created on the defined path as well.ScreenHunter_16
Create a child virtual hard disk with parent-child relationship
In this new VM, create a new folder as “Virtual Hard Disks” for locating the child virtual hard disk later.ScreenHunter_17Before creating the new child virtual hard disk, please remember firstly to power off the parent VM (# 1) next to right-click the Hyper-V Server and select New, Hard Disk… in menu to launch New Virtual Hard Disk Wizard.ScreenHunter_27In Before You Begin dialog, click Next > buttonScreenHunter_19In Choose Disk Format dialog, choose VHDX option next to click Next > buttonScreenHunter_20In Choose Disk Type dialog, choose Differencing option next to click Next > buttonScreenHunter_22In Specify Name and Location dialog, assign a name as ‘HV-CENTOS-01_50GB.vhdx”, click Browse… button to select the child virtual hard disk path and then click Next > buttonScreenHunter_23In Configure Disk dialog, click Browse… button to select the Parent virtual hard disk next to click Next > buttonScreenHunter_24Click Finish button to complete the New Virtual Hard Disk WizardScreenHunter_25So does that the child virtual hard disk will be created now.ScreenHunter_28
Add Child virtual hard disk to the new VM
If you remember that the new VM in the wizard process is never created any new virtual hard disk, it is time to add it for the new VM.
In Hyper-V Manager, select the new VM as “HV-CENTOS-01” and then click Settings… linkScreenHunter_29In the Hardware setting of this VM, select IDE Controller 0 in the left panel, Hard Drive and then click Add buttonScreenHunter_30In Hard Drive tab, select Hard Drive <file> in left panel, choose Virtual hard disk option, click Browse… button to select the child virtual hard disk file.ScreenHunter_33Click OK button if the above selection is right.ScreenHunter_34Until now, this New VM has already finish the related configuration and it is working normally when boot it.ScreenHunter_35No!
Although the CentOS VM can be booted, its network function has some problem due to MAC address is changed.
How to resolve this problem?
I will explain it In the next article.

Reference :(# 1) If the Parent VM doesn’t be powered off and launch New Virtual Hard Disk Wizard, the procedure will fail due to the parent file is being used by another process.ScreenHunter_26

沒有留言:

張貼留言

Since 2010 Design by Davidwa
©Copyright Davidwa Inc. All rights reserved.