Hyper-V NIC offline triggers virtual machine migration

Source: Internet
Author: User

Hyper-V NIC offline triggers virtual machine migration

Two days ago to see a netizen asked, network card dropped, you need to migrate the virtual machine to other servers, Hyper-V can do it? Hyper-V itself does not provide this function, think of before I have done using a script Vicha.vbs script implementation, today to write a blog.

My environment is two physical servers, deployed as cluster. The deployment of cluster can refer to my previous blog post, this is not the introduction.

1. Add "Failover Cluster Command interface" to each Hyper-V host

650) this.width=650; "title=" clip_image002 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px, "alt=" clip_image002 "src=" Http://s3.51cto.com/wyfs02/M01/57/0D/wKiom1SP6a_QY7MHAAGU4cszCiY493.jpg "border=" 0 "height=" 453 "/>

Click Next

650) this.width=650; "title=" clip_image004 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px, "alt=" clip_image004 "src=" Http://s3.51cto.com/wyfs02/M02/57/0D/wKiom1SP6bDzJv1bAAFMXQc9xBs730.jpg "border=" 0 "height=" 462 "/>

Click Install

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px; "alt=" image "src=" http://s3.51cto.com/ Wyfs02/m00/57/0a/wkiol1sp6lhqrmvqaaezjcebpi8164.jpg "border=" 0 "height=" 435 "/>

Feature installation complete, click Close

2. Copy the Nicha.vbs to the%windir%\cluster\ directory

3. Open the failed Cluster Manager, right-select the virtual machine that needs to be migrated when the NIC is dropped, then click Add Resource---Generic Script

650) this.width=650; "title=" clip_image008 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px, "alt=" clip_image008 "src=" Http://s3.51cto.com/wyfs02/M01/57/0A/wKioL1SP6lKx2WobAAHMEBufLzg576.jpg "border=" 0 "height=" 399 "/>

Enter the script file path and click Next

650) this.width=650; "title=" clip_image010 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px, "alt=" clip_image010 "src=" Http://s3.51cto.com/wyfs02/M02/57/0A/wKioL1SP6lOyymDZAAEZ43C5hP0475.jpg "border=" 0 "height=" 435 "/>

Click Done and the script is ready to be added.

650) this.width=650; "title=" clip_image012 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px, "alt=" clip_image012 "src=" Http://s3.51cto.com/wyfs02/M00/57/0A/wKioL1SP6lPgERHPAAHVWUv59W8217.jpg "border=" 0 "height=" 484 "/>

4. Run the command prompt as administrator, enter the command as

650) this.width=650; "title=" clip_image014 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px, "alt=" clip_image014 "src=" Http://s3.51cto.com/wyfs02/M01/57/0A/wKioL1SP6lSxzmCHAACC-MtuwEM984.jpg "border=" 0 "height="/>

Right-click the script in the role, tap online

650) this.width=650; "title=" clip_image016 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px, "alt=" clip_image016 "src=" Http://s3.51cto.com/wyfs02/M02/57/0A/wKioL1SP6lXSKgO8AADzXa1V46c590.jpg "border=" 0 "height=" 299 "/>

This completes the setup, which triggers the virtual machine migration that the script monitors when the corresponding NIC is dropped.

Nicha script I packaged as an attachment, there is a need to download. I was tested at 2012, and R2 didn't know if it was supported.

This article is from the "zeroing" blog, so be sure to keep this source http://fjcloud.blog.51cto.com/212259/1590737

Hyper-V NIC offline triggers virtual machine migration

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.