Hyper-V Parent-Child VHD Configuration Using Differencing Disks: Hyper-V Technology Date: 5, 7, 2012 Prepared By Engineer: Mina Saneed Kamel. Adonia Consultancy- Qatar Hyper-V Parent-Child VHD Configuration Using Differencing Disks: Table of Contents Scenario.......................................................................................................................... 3 Symptom .................................................................................................................... 3 Layout ........................................................................................................................ 3 Lab Configuration ...................................................................................................... 4 Technical Procedure....................................................................................................... 5 Create Parent Virtual Hard Disk ................................................................................ 5 Create Parent Virtual Machine.................................................................................. 7 Create Child Virtual Hard Disk .............................................................................. 21 Create Virtual Machine That Use Child VHD…………………………………….14 Recommendations……………………………………………………………………16 Resources ..................................................................................................................... 27 Adonia Consultancy Doha - Qatar Page 2 Hyper-V Parent-Child VHD Configuration Using Differencing Disks: Scenario Symptom: This task will describe in details how we can optimize disk space and reduce the number of times that we have to install and update a released operating system, this will be done by creating parent child VHD configurations using differencing disks in Hyper-V. Layout: The parent VHD is shared between the VMs’ child VHD, The parent VHD is Native boot for all Childs OS based on. Adonia Consultancy Doha - Qatar Page 3 Hyper-V Parent-Child VHD Configuration Using Differencing Disks: Lab Configuration Computer Name mkamel Win2008Parent Win2008-Child Computer Name mkamel Win2008-Parent Win2008-Child Adonia Consultancy Doha - Qatar O.S Application/Services Function/Membership Windows 2008 Server R2 X64 Enterprise. Windows 2008 Server R2 X64 Enterprise. Windows 2008 Server R2 X64 Enterprise Hyper-V Virtualization Server. Parent Virtual Machine. Child Virtual Machine. TCP/IP Settings Note IP:192.168.0.209 DNS: 192.168.0.1 IP:192.168.0.205 DNS: 192.168.0.1 IP:192.168.0.153 DNS: 192.168.0.1 Join Informatique.net Domain Workgroup Workgroup Page 4 Hyper-V Parent-Child VHD Configuration Using Differencing Disks: Technical Procedure Create Parent Virtual Hard Disk: In Hyper-V Manager, In the Action Bar click New, Then click Hard Disk. Choose Disk Type. Dynamically expanding type. And click Next. Hint: The size of the .vhd file grows as data is written to the virtual hard disk. Adonia Consultancy Doha - Qatar Page 5 Hyper-V Parent-Child VHD Configuration Using Differencing Disks: On the Specify Name and Location page. And click Next. Enter an appropriate Name and Location Adonia Consultancy Doha - Qatar Configure your Disk Size. And click Next. Page 6 Hyper-V Parent-Child VHD Configuration Using Differencing Disks: Review Summary. And click Finish. Create Parent Virtual Machine. Click New in the Action pane, and then click Virtual Machine. Then click Next. Adonia Consultancy Doha - Qatar Page 7 Hyper-V Parent-Child VHD Configuration Using Differencing Disks: On the Specify Name and Location page, in Name and Location ,enter an appropriate Name and Location, and click Next. On the Assign Memory page, enter the amount of memory you want to dedicate to this virtual machine. Then click Next Adonia Consultancy Doha - Qatar Page 8 Hyper-V Parent-Child VHD Configuration Using Differencing Disks: On Configure Networking, determine whether you want the machine connected to a network and click Next. Hint: External Network for binding to Physical Network Adapter to access any external network. On Connect Virtual Hard Disk, Select Use an existing virtual hard disk .then browse to the virtual hard disk that you create it in Step 1.and click Next Adonia Consultancy Doha - Qatar Page 9 Hyper-V Parent-Child VHD Configuration Using Differencing Disks: Review Summary. And click Finish. Hint: In Step2 you Create Parent Virtual Machine named Win2008-Parent. in the Action pane , under Win2008-parent VM, select Settings, under IDE Controller 1 If you have Image File for OS select Image file and browse to the file or if you have DVD Disk select Physical CD or DVD and select drive, then click Apply and ok Adonia Consultancy Doha - Qatar Page 10 Hyper-V Parent-Child VHD Configuration Using Differencing Disks: Then Start and Connect your Machine .and Install the Operating System. After installation Update your Windows. Running sysprep. Click Start ,then Command Prompt , right-click Command Prompt, click Run as administrator .Type this command >> cd C:\Windows\System32\ sysprep then press Enter.Then type this command >> sysprep then press Enter. The System Preparation Tool dialog box appears.ensure that Enter System Out-of-Box Experience (OOBE) is selected, and select the Generalize check box. In the Shutdown Options list, click Shutdown, and then click OK. Adonia Consultancy Doha - Qatar Page 11 Hyper-V Parent-Child VHD Configuration Using Differencing Disks: Keep your Parent Virtual Machine is Turned off. Note The parent VHD must reside on the same local volume. You can’t modify the parent VHD. Keep your parent Virtual Machine is Turn off. Create Child Virtual Hard Disk. Adonia Consultancy Doha - Qatar Right-click the Hyper-V server you want to target, click New, Hard Disk. The New Virtual Hard Disk Wizard opens If the Before You Begin page appears, review it and then click Next. On Choose Disk Type, select Differencing and then click Next. On Specify Name and Location, type an appropriate name and click Next. On Configure Disk, in Location, browse to the file path to The Parent VHD that you created previously and then click Next. Page 12 Hyper-V Parent-Child VHD Configuration Using Differencing Disks: Review Summary. And click Finish. Adonia Consultancy Doha - Qatar Page 13 Hyper-V Parent-Child VHD Configuration Using Differencing Disks: Create Virtual Machine That Use Child VHD. In Hyper-V Manager, right-click the virtual server on which you want to create the configuration. Click New, and then click Virtual Machine. If the Before You Begin page appears, review it and then click Next. On the Specify Name and Location page, in Name and Location, enter an appropriate name and location. On the Assign Memory page, enter the amount of memory ,and click Next. On Configure Networking, determine whether you want the machine connected to a network .and click Next. On Connect Virtual Hard Disk, select Use an existing virtual hard disk. In Location, Browse to the differencing virtual hard disk that you created for this virtual machine, and click Next. Review Summary. And click Finish. Adonia Consultancy Doha - Qatar Page 14 Hyper-V Parent-Child VHD Configuration Using Differencing Disks: Then Start and Connect your Machine . Hint: by these steps you create Virtual machine using Child VHD. Repeat the process above for each Child Virtual Hard Disk you created. Adonia Consultancy Doha - Qatar Page 15 Hyper-V Parent-Child VHD Configuration Using Differencing Disks: Recommendations 1- Copy the parent VHD to save place, as you will use for new labs you will prepare 2- After you creating the parent virtual machine manager make sure to remove from Hyper-V console to avoid running it by mistake 3- Use the same procedures listed above for preparing Windows 7 parent and child VHD. Also it can be used for windows XP when it is required Adonia Consultancy Doha - Qatar Page 16 Hyper-V Parent-Child VHD Configuration Using Differencing Disks: Resources Item 1- KB or Article Hyper-V Over viewhttp://technet.microsoft.com/enus/library/cc816638(v=ws.10) 2- For practical Lab: http://technet.microsoft.com/enus/library/ee256064(v=ws.10) 3- Hyper-V Virtual Machine (VM) Parent-Child Configuration: http://social.technet.microsoft.com/wiki/contents/articles/1393.hyper-vvirtual-machine-vm-parent-child-configuration-using-differencingdisks.aspx 4- How to use Sysprep: http://technet.microsoft.com/enus/library/bb457073.aspx Using differencing disks: http://technet.microsoft.com/enus/library/cc720381(v=ws.10) 5- Adonia Consultancy Doha - Qatar Page 17