jumebv

Powershell: disable/enable VMotion Port

For some strange reason, sometimes we cannot do a VMotion. While trying to resolve this strange issue, we did found a workaround: disable and enable the VMotion port. Once that's done, manual VMotion and VMotion triggered by DRS is working again. So I made a Powershell script to find the interface where VMotion is enabled, disable it and enable it again. Pretty straightforward, but I wanted to share it anyway.

 $vc = Connect-VIServer "<your vCenter here>"
$esxhosts = Get-VMHost
foreach ($esxhost in $esxhosts) {
 $vmHostNetwork = Get-VMHostNetwork -VMHost $esxhost
 $vmHostNetwork.VirtualNic | foreach {
 if ( $_.VMotionEnabled -eq "True" ) {
 Set-VMHostNetworkAdapter -VirtualNic $_ -VMotionEnabled $false -IP $_.IP -SubnetMask $_.SubnetMask
 Set-VMHostNetworkAdapter -VirtualNic $_ -VMotionEnabled $true -IP $_.IP -SubnetMask $_.SubnetMask
 } 
 }
}


( 1 Vote ) 
Comments (9)
  • Essay reviews  - You have done a fabulous work.
    avatar

    You have done a fabulous work. It is very beautiful. I will definitely watch this video. Thank you so much for sharing your ideas with us. You have a brilliant writing skill. Keep sharing such helpful post. I always love to read articles to improve my knowledge. I found this site as a good source of knowledge. Thank you for your articles. Essay writing service reviews to get reviews of various online writers.

  • Jan Caddigan  - Powershell: disable/enable VMotion Port
    avatar

    As a Newbie, I am continuously exploring online for articles that can help me. Thank you

  • Hyman Polle  - Powershell: disable/enable VMotion Port
    avatar

    The crux of your writing whilst sounding reasonable in the beginning, did not really sit very well with me after some time. Someplace throughout the sentences you actually were able to make me a believer unfortunately only for a very short while. I nevertheless have a problem with your jumps in logic and one might do well to fill in all those breaks. In the event that you actually can accomplish that, I would certainly end up being impressed.

  • Andres Obrecht  - Powershell: disable/enable VMotion Port
    avatar

    "Best Blogpost! Hi there! This is my first comment here so I just wanted to give a quick shout out_ and tell you I genuinely enjoy reading through your posts. Can you recommend any other blogs/websites/forums that deal with the same topics?"

  • borvestinkral  - Powershell: disable/enable VMotion Port
    avatar

    I got what you mean , thankyou for posting.Woh I am thankful to find this website through google.

  • Riley Alliman  - Powershell: disable/enable VMotion Port
    avatar

    this implies up and down).|Our Instructors have been busy studying the AUSSIE TWERK way and becoming Aussie Twerk Qualified Instructors….

  • Cordelia Mulchrone  - Powershell: disable/enable VMotion Port
    avatar

    other and laughed.|TWERKhoreo® is a weekly class held for our advanced twerkers who want to put their moves learnt from TWERKFit® classes into complicated routines.|I now have completely no focus for the rest of the day due to the fact

  • Jalisa Grof  - Powershell: disable/enable VMotion Port
    avatar

    other and laughed.|TWERKhoreo® is a weekly class held for our advanced twerkers who want to place their moves learnt from TWERKFit® classes into complicated routines.|I now have completely no concentrate for the rest of the day since

  • porno cerdas  - Powershell: disable/enable VMotion Port
    avatar

    Aprobadas en la XXX Conferencia Internacional de la Cruz Roja y de la Media Luna Roja

Write comment
Your Contact Details:
Gravatar enabled
Comment:
[b] [i] [u] [s] [url] [quote] [code] [img]   
:D:):(:0:shock::confused:8):lol::x:P:oops::cry:
:evil::twisted::roll::wink::!::?::idea::arrow: