Hyper-V lab installation ---- 2

Source: Internet
Author: User
3. Install and clone guest 3.1 and create a virtual machine

Clone a VM

To clone a VM in a real production environment, pay attention to the following configurations of the cloned VM:

  • Windows Security ldentifiers (SIDS)

  • Media Access Control (address)

  • IP address

  • Netbiso and fully qualified domain (FQDN) Names

There are two ways to clone a hyper-V virtual machine:

1. Using hyper-V's Virtual Machine import/export Function

2. Copy the vhd (Virtual harddisk) file, create a new virtual machine, and set the copied vhd file.

3.2 export/import a VM

Export Virtual Machine

In this example, export a closed virtual machine. In the virtual machine, right-click and select export from the menu to export the running Virtual Machine.

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/4A/6B/wKiom1Qk4mfCPlysAACd90r0zU8535.gif "style =" float: none; "Title =" .gif "alt =" wkiom1qk4mfcplysaacd90r0zu8535.gif "/>

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/4A/6D/wKioL1Qk4o3wcTesAAAvY4_UGzg273.gif "style =" float: none; "Title =" 1.1.gif "alt =" wkiol1qk4o3wctesaaavy4_ugzg273.gif "/>

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/4A/6D/wKioL1Qk4o2ymFfOAACFwyxyJ68101.gif "style =" float: none; "Title =" 2.2.gif "alt =" wkiol1qk4o2ymffoaacfwyxyj68101.gif "/>

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/4A/6B/wKiom1Qk4mjAg52yAAAw6-dptDI342.gif "style =" float: none; "Title =" 3.3.3.gif "alt =" wKiom1Qk4mjAg52yAAAw6-dptDI342.gif "/>

The export time varies depending on the Virtual Machine size. After the export, you can view the exported files in the directory.

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/4A/6D/wKioL1Qk4o2SVbo-AAB_5dbWil8397.gif "style =" float: none; "Title =" 4.4.gif "alt =" wKioL1Qk4o2SVbo-AAB_5dbWil8397.gif "/>

Import Virtual Machine

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/4A/6B/wKiom1Qk42_TMIMzAACDkYDE_Mk373.gif "style =" float: none; "Title =" ..gif "alt =" wkiom1qk42_tmimzaacdkyde_mk373.gif "/>

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/4A/6D/wKioL1Qk45XyY3KKAABHq0O9CS4473.gif "style =" float: none; "Title =" 1.1.gif "alt =" wkiol1qk45xyy3kkaabhq0o9cs4473.gif "/>

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/4A/6B/wKiom1Qk43PBb6-oAABF92mSe2s695.gif "style =" float: none; "Title =" 2.2.gif "alt =" wKiom1Qk43PBb6-oAABF92mSe2s695.gif "/>

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/4A/6D/wKioL1Qk45jTwihDAABthuA7MxI055.gif "style =" float: none; "Title =" 3.3.3.gif "alt =" wkiol1qk45jtwihdaabthua7mxi055.gif "/>

This path is the path of the previously exported virtual machine, rather than any subdirectories in it.

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/4A/6B/wKiom1Qk44_Bu5K-AABNYBXejos159.gif "style =" float: none; "Title =" 4.4.4.gif "alt =" wKiom1Qk44_Bu5K-AABNYBXejos159.gif "/>

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/4A/6B/wKiom1Qk44-y1LjzAABYmctpetk362.gif "style =" float: none; "Title =" 5.5.gif "alt =" wKiom1Qk44-y1LjzAABYmctpetk362.gif "/>

Because the original VM is still on this host, selectCopy A Virtual Machine (create a uniqueID).

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/4A/6D/wKioL1Qk47fBBSJuAACKK744vNM831.gif "style =" float: none; "Title =" 6.6.6.gif "alt =" wkiol1qk47fbbsjuaackk744vnm831.gif "/>

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/4A/6B/wKiom1Qk45KD5wojAABVwF2NUVQ707.gif "style =" float: none; "Title =" 7.7.gif "alt =" wkiom1qk45kd5wojaabvwf2nuvq707.gif "/>

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/4A/6D/wKioL1Qk47iAscEwAAB9Plp5nho020.gif "style =" float: none; "Title =" 8.8.8.gif "alt =" wkiol1qk47iascewaab9plp5nho0w.gif "/>

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/4A/6B/wKiom1Qk45OSh647AAB8tAqOdn8497.gif "style =" float: none; "Title =" 9.9.9.gif "alt =" wkiom1qk45osh647aab8w.odn8497.gif "/>

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/4A/6D/wKioL1Qk47jx_JuXAAAhYgfPnQE457.gif "style =" float: none; "Title =" 10.10.10.gif "alt =" wkiol1qk47jx_juxaaahygfpnqe457.gif "/>

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/4A/6D/wKioL1Qk47jDc-TaAABttgOyBE4802.gif "style =" float: none; "Title =" 11. 11.11.11.gif "alt =" wKioL1Qk47jDc-TaAABttgOyBE4802.gif "/>

The new imported virtual machine has the same name as the original virtual machine, so you need to modify it to facilitate management.

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/4A/6B/wKiom1Qk45OA2OhwAACdgaDNcpo451.gif "style =" float: none; "Title =" 12. 12.12.gif "alt =" wkiom1qk45oa2ohwaacdgadncpo451.gif "/>

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/4A/6B/wKiom1Qk45PyhfTdAACG6J4t9hU526.gif "style =" float: none; "Title =" 13.13.gif "alt =" wkiom1qk45pyhftdaacg6j4t9hu526.gif "/>

The MAC address of the cloned VM is the same as that of the original VM.

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/4A/6D/wKioL1Qk47uCzGGqAAC2tUETeww101.gif "style =" float: none; "Title =" 14.14.14.gif "alt =" wkiol1qk47uczggqaac2tueteww101.gif "/>

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/4A/6B/wKiom1Qk45bzPpEmAADQv44r7Mc176.gif "style =" float: none; "Title =" 15. 15.15.15.gif "alt =" wkiom1qk45bzppemaadqv44r7mc176.gif "/>

Disable the newly imported Virtual Machine and manually modify the MAC address in the virtual machine settings.

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/4A/6D/wKioL1Qk47uAcBTTAAEhiS2A8pQ414.gif "style =" float: none; "Title =" 16. 16.16.16.gif "alt =" wkiol1qk47uacbttaaehis2a8pq414.gif "/>

Modify the MAC address in the configuration, enable the virtual machine, and observe the changes in the MAC address in the operating system.

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/4A/6D/wKioL1Qk47-gSkMsAADYiz-11w0102.gif "style =" float: none; "Title =" 1717.gif "alt =" wKioL1Qk47-gSkMsAADYiz-11w0102.gif "/>

Modify the host name and other information of the VM to avoid conflict.

3.3 create a VM that does not contain a disk, use the existing vhd copy 3.3.1, and create a VM that does not contain a disk

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/4A/6F/wKioL1QlAQ2B7vtMAACozxNoB50020.gif "style =" float: none; "Title =" Create a new virtual machine that does not contain images. GIF "alt =" wkiol1qlaq2b7vtmaaczxnob500w.gif "/>

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/4A/6D/wKiom1QlAOvzHgi5AABpnTsb7m4118.gif "style =" float: none; "Title =" newly created virtual host 1.gif "alt =" wkiom1qlaovzhgi5aabpntsb7m4118.gif "/>

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/4A/6F/wKioL1QlARPyr0goAACFvIU_86g617.gif "style =" float: none; "Title =" newly created virtual machine 2.gif "alt =" wkiol1qlarpyr0goaacfviu_86g617.gif "/>

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/4A/6D/wKiom1QlAO-QxiyyAAB2e-_dSS8122.gif "style =" float: none; "Title =" newly created virtual machine 3.gif "alt =" wKiom1QlAO-QxiyyAAB2e-_dSS8122.gif "/>

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/4A/6D/wKiom1QlAPKjzBSoAABsNKumVsc512.gif "style =" float: none; "Title =" newly created virtual machine 4.gif "alt =" wkiom1qlapkjzbsoaabsnkumvsc512.gif "/>

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/4A/6F/wKioL1QlARuy67rrAABUZhvH0HA490.gif "style =" float: none; "Title =" newly created virtual machine 5.gif "alt =" wkiol1qlaruy67rraabuzhvh0ha490.gif "/>

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/4A/6D/wKiom1QlAPfAe3-qAACid9lZNsI156.gif "style =" float: none; "Title =" newly created virtual host 6.gif "alt =" wKiom1QlAPfAe3-qAACid9lZNsI156.gif "/>

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/4A/6F/wKioL1QlASPCcYVmAABiGupoewA813.gif "style =" float: none; "Title =" newly created virtual server 7.gif "alt =" wkiol1qlaspccyvmaabigupoewa813.gif "/>

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/4A/6F/wKioL1QlAS6QWrCCAACJejaruUE716.gif "style =" float: none; "Title =" newly created virtual machine 8.gif "alt =" wkiol1qlas6qwrccaacjejaruue716.gif "/>


3.3.2 copy the Virtual Machine disk vhd File

Make sure to shut down the template VM.

Log on to the host and perform the following operations:

D: \> Cd "VM \ virtual hard disks"

D: \ VM \ virtual hard disks> dir

Volume in drive D has no label.

Volume serial number is 505c-2eac

Directory of D: \ VM \ virtual hard disks

08/22/2014 am <dir>.

08/22/2014 am <dir> ..

08/22/2014 :00 am 7,923,040,256 _ w2k8r2cn. vhdx

1 file (s) 7,923,040,256 bytes

2 Dir (s) 82,770,337,792 bytes free

Use clear and easy-to-recognize file names for future management

D: \ VM \ virtual hard disks> copy_w2k8r2cn.vhdx SRV2-1.vhdx

1 file (s) copied.

D: \ VM \ virtual hard disks> dir

Volume in drive D has no label.

Volume serial number is 505c-2eac

Directory of D: \ VM \ virtual hard disks

08/22/2014 11: 26 am <dir>.

08/22/2014 :26 am <dir> ..

08/22/2014 am 7,923,040,256 srv2-1.vhdx

08/22/2014 :00 am 7,923,040,256 _ w2k8r2cn. vhdx

2 file (s) 15,846,080,512 bytes

2 Dir (s) 74,847,297,536 bytes free

D: \ VM \ virtual hard disks>

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/4A/6F/wKioL1QlAXewJC_VAACJc_NGKNs324.gif "Title =" Copy Virtual Machine license vhdfile .gif "alt =" wkiol1qlaxewjc_vaacjc_ngkns324.gif "/>

3.3.3 add new disks to virtual machines

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/4A/6D/wKiom1QlAXCRmzMWAACb4f5sUkI908.gif "style =" float: none; "Title =" Add new hosts to virtual machines. GIF "alt =" wkiom1qlaxcrmzmwaacb4f5suki908.gif "/>

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/4A/6F/wKioL1QlAZaj3q-cAADFlbW__KM495.gif "style =" float: none; "Title =" Add a new license to the VM 1.gif "alt =" wKioL1QlAZaj3q-cAADFlbW__KM495.gif "/>

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/4A/6D/wKiom1QlAXiyMpVfAAEBrfhlg24754.gif "style =" float: none; "Title =" add the new host to 2.gif "alt =" wkiom1qlaxiympvfaaebrfhlg24754.gif "/>

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/4A/6D/wKiom1QlAXji3x7BAAB12f-2YLU176.gif "style =" float: none; "Title =" Add new hosts to virtual machines 3.gif "alt =" wKiom1QlAXji3x7BAAB12f-2YLU176.gif "/>

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/4A/6F/wKioL1QlAZ6yV2w7AAEHjx2qanE172.gif "style =" float: none; "Title =" Add new hosts to virtual machines 4.gif "alt =" wkiol1qlaz6yv2w7aaehjx2qane172.gif "/>


3.4 create a VM that does not contain a disk and use a copy of the previously exported vhd.

Copy the vhd file in the 3.2 exported directory to the created virtual machine.

D: \> Cd "export \ _ w2k8r2cn \ virtualhard disks"

D: \ export \ _ w2k8r2cn \ virtual harddisks> dir

Volume in drive D has no label.

Volume serial number is 505c-2eac

Directory of D: \ export \ _ w2k8r2cn \ virtualhard Disks

08/22/2014: 26 am <dir>.

08/22/2014 am <dir> ..

08/22/2014 09:38 am 7,923,040,256 _ w2k8r2cn. vhdx

1 file (s) 7,923,040,256 bytes

2 Dir (s) 65,988,562,944 bytes free

D: \ export \ _ w2k8r2cn \ virtual hard disks> run the following command:

Copy _ w2k8r2cn. vhdx "D: \ VM \ virtualhard disks \ srv4-1.vhdx"

1 file (s) copied.

When creating a new virtual machine, selectUse existing virtual hard disk

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/4A/6D/wKiom1QlAc6jdqbUAACkCBaoDAE054.gif "Title =" Creating a new virtual machine that is not included in the package, use the forward Guide of the vhddeputy .gif "alt =" wkiom1qlac6jdqbuaackcbaodae054.gif"

Conclusion

  • You can clone a running Virtual Machine by using an exported/imported virtual machine.

  • The "Export/Import" method is not very convenient for managing virtual machine hard disk files and nic MAC addresses.

  • Creating a new virtual machine that does not contain a virtual hard disk makes management easier.

  • Manually copy vhd files. The template Virtual Machine (original Virtual Machine) must be disabled.

  • It is also feasible to manually copy the vhd files in the original exported Virtual Machine folder.

4. host firewall configuration

In a nested lab environment, we usually disable the firewall of the host to reduce the overhead of physical resources.

4.1 Disable Windows Server 2012 Firewall

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/4A/6F/wKioL1QlAh6wwpNHAAAsKJzYdqw662.gif "style =" float: none; "Title =" hyper-2012 8.gif "alt =" wkiol1qlah6wwpnhaaaskjzydqw662.gif "/>

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/4A/6F/wKioL1QlAmyCbIJZAABOZjcmk9k577.gif "style =" float: none; "Title =" Disable Windows Server 2012fire wall .gif "alt =" wkiol1qlamycbijzaabozjcmk9k577.gif "/>

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/4A/6F/wKioL1QlAnOihPrVAACUcgOzq7w469.gif "style =" float: none; "Title =" Disable Windows Server 2012fire wall 1.gif "alt =" wkiol1qlanoihprvaacucgozq7w469.gif "/>

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/4A/6D/wKiom1QlAk7CzjXBAACif8xwhbY633.gif "style =" float: none; "Title =" Disable Windows Server 2012fire wall 2.gif "alt =" wkiom1qlak7czjxbaacif8xwhby633.gif "/>

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/4A/6D/wKiom1QlAk7Aoc0uAAChyAvWJ8g543.gif "style =" float: none; "Title =" Disable Windows Server 2012fire wall 3.gif "alt =" wkiom1qlak7aoc0uaachyavwj8g543.gif "/>

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/4A/6F/wKioL1QlAoDxhLzEAACIDJPW5hw300.gif "style =" float: none; "Title =" Disable Windows Server 2012fire wall 4.gif "alt =" wkiol1qlaodxhlzeaacidjpw5hw300.gif "/>

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/4A/6D/wKiom1QlAmvQzm2VAACnZQrZ3n8978.gif "style =" float: none; "Title =" Disable Windows Server 2012fire wall 5.gif "alt =" wkiom1qlamvqzm2vaacnzqrz3n8978.gif "/>

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/4A/6F/wKioL1QlApDASjz4AACIYv3pwSA906.gif "style =" float: none; "Title =" Disable Windows Server 2012fire wall 6.gif "alt =" wkiol1qlapdasjz4aaciyv3pwsa906.gif "/>

4.2 disable the hyper-V 2012 Firewall

We have a host installed with Hyper-V2012, its IP address is 172.16.1.110, before the operation, we first consider the current firewall configuration, we can use NMAP in the external port scanning.

C: \ Users \ chentao> NMAP-SS-T 5 172.16.1.110

Starting NMAP 6.46 (http://nmap.org) at2014-08-22 China Standard

Time

Nmap scan report forct-hynode3.yunhedata.com (192.168.1.83)

Host is up (0.00 s latency ).

Not shown: 996 filtered ports

Port State Service

135/tcp open MSRPC

2179/tcp open vmrdp

3389/tcp open MS-WBT-Server

49154/tcp open unknown

MAC address: 00: 50: 56: B2: 13: 7f (VMware)

NMAP done: 1 IP address (1 host up) scannedin 4.26 seconds

Perform firewall operations on the host through the console or Remote Desktop

C: \ Users \ chentao> netsh advfirewall setallprofiles state off

OK.

C: \ Users \ chentao> netsh advfirewall showallprofiles state

Domain Profile settings:

----------------------------------------------------------------- Stateoff

Private Profile settings:

----------------------------------------------------------------- Stateoff

Public Profile settings:

----------------------------------------------------------------- Stateoff

OK.

Use NMAP to perform port scanning again outside

C: \ Users \ chentao> NMAP-SS-T 5 172.16.1.110

Starting NMAP 6.46 (http://nmap.org) at2014-08-22 China Standard

Time

Nmap scan report forct-hynode3.yunhedata.com (192.168.1.83)

Host is up (0.00 s latency ).

Not shown: 990 closed ports

Port State Service

135/tcp open MSRPC

139/tcp open NetBIOS-SSN

445/tcp open Microsoft-Ds

2179/tcp open vmrdp

3389/tcp open MS-WBT-Server

49152/tcp open unknown

49153/tcp open unknown

49154/tcp open unknown

49155/tcp open unknown

49156/tcp open unknown

MAC address: 00: 50: 56: B2: 13: 7f (VMware)

NMAP done: 1 IP address (1 host up) scannedin 1.94 seconds

Alternatively, enter the following command in the powershell environment:

Get-netfirewallprofile | set-netfirewallprofile-enabled false

In the domain environment, you can also use group policies to implement

Hyper-V lab installation ---- 2

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.