Powershell 3.0 practice (2) Managing hyper-V 3.0 (1)

Source: Internet
Author: User
Tags powergui

I have been using server systems for development and recently changed Windows 8 to Windows Server 8, focusing on testing new enterprise-level features.

Test script download

All scripts in this series pass the Windows Server 8 (powershell ise x64) test.

 

Windows Server 8 also retains the metro interface:

 

Compared with Windows Server 2008 R2, the appearance of the Server Manager dashboard changes significantly:

 

I. Ten New Features of Windows Server :(Original ENGLISH)

1.1 multi-server management

1.2 zero-resistance server deployment

1.3 IP Address Management

1.4. Dynamic Access Control

1.5 large hyper-V Clusters

1.6 flexible dynamic migration

1.7. Advanced Virtual Network

1.8 hyper-V Replication

1.9 server data in the form of server information blocks

1.10. Enhanced virtual desktop Architecture

 

Ii. Ten New Features of hyper-V 3.0 (Original ENGLISH)

2.1. vhdx Virtual Disk format

2.2. Virtual Fiber Channel Adapter

2.3. Storage and network resource pool

2.4. supports more than 4 virtual CPUs

2.5. Hardware acceleration

2.6. bandwidth management

2.7 DHCP wizard

2.8 routing wizard

2.9 port monitoring

2.10. vswitch Extension

 

Iii. Use powershell 3.0 to manage hyper-V 3.0

Powershell ISE is an integrated powershell development environment integrated into Windows server. in Windows Server 8, powershell ise finally began to support smart sensing:

Although it is not as good as the powergui Script Editor, it is already quite good and supports plug-ins. Currently, there are not many plug-ins.Teachnet.

Powergui Script Editor currently does not support powershell 3.0, so powershell ISE is used for development.

A very practical function of the new powershell ise version is to view and search modules and commands:

 

The following uses the hyper-V module. You can see many commands:

 

The vhd Virtual Disk format has already appeared as early as the virtualpc era. It is the standard format of Microsoft virtual storage. In Windows 7 and Windows Server 2008 R2, it can be started directly from the vhd virtual disk, however, the maximum capacity is 2 TB.

By hyper-V 3.0, the capacity limit has been increased to 16 TB and updated to the vhdx disk format.

3.1 create a virtual disk

New-vhd
-Path
"F: \ work \ TMP \ hyper-V \ test. vhdx"
-Vhdtype
Dynamic
-Vhdformat
Vhdx
-Sizebytes
1024 MB

As shown in, a virtual disk in vhdx format is created in the F: \ work \ TMP \ hyper-V directory, with the capacity of 1 GB and Dynamic Scaling.

In Windows Server 8, you can directly mount the vhdx Virtual Disk format:

You can initialize it in the Disk Manager:

Generally, the MBR partition table can be viewed in the resource manager after being formatted as NTFS, which is no different from the physical hard disk:

 

3.2 view existing virtual machines

Get-VM
-Name
"Winserver2003r2"

Script running result:

 

3.3 view hyper-V Server Information

Get-vmhost

 

3.4 create a virtual machine

New-VM
-Name
"Winserver2008r2"
-Memorystartupbytes
2 GB
-Bootdevice
"CDROM"
-Newvhdpath
"F: \ backup \ developer \ virtualization alization \ virtual machines \ hyper-V \ virtual hard disks \ winserver2008r2. vhdx"
-Newvhdsize(2048
*
1000
*
10)-Switchname
"Hyper-V Switch"

 

3.5 start and shut down virtual machines

Start-VM
-Name
"Winserver2008r2"

 

Stop-VM
-Name
"Winserver2008r2"
-Force

 

3.6 Delete virtual machines

Remove-VM
-Name
"Winserver2008r2"
-Force

Note that deleting a virtual machine does not delete the virtual disk.

 

Summary:

this time, we started testing the enterprise-level features of Windows Server 8 and pushing the next-generation Windows server to be released. Powershell 3.0 plays a core role and can complete almost all management operations. The subsequent chapters will continue to test the unique features of Windows Server 8.

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.