Month: December 2019

Home / Month: December 2019

Merry Christmas everyone!

December 25, 2019 | IRL | No Comments

Hello amazing readers,

I made the above myself with a guide online.

There will be one more post about new year and in 2020 hopefully my AWS YouTube series, VMware Cloud Foundation, my move back to NSX-T and more!

Merry Christmas to all of you and I hope to see you one more time in 2019 in my blog.

Hi readers,

Currently, I temporarily have access to a server with enough memory to run a Cloud Foundation lab until January 2nd 2020.

This gave me the inspiration to build a Cloud Foundation lab and tinker around with it, along with tinkering with an automatic lab deployment script called VLC (VCF Lab Constructor). This is a Powershell program designed to make it easy to deploy a nested (means: running Virtual Machines within Virtual Machines.) Cloud Foundation lab. This is not supported by anyone other than some communities, but it seems to work great for others so I wanted to give it a try.

Part one will be about the deployment using the script and what Cloud Foundation is exactly. So stay tuned!

There will be two more posts this year. A Christmas and New Year message, and in 2020 hopefully my AWS YouTube series, VMware Cloud Foundation, my move back to NSX-T and more!

Merry Christmas everyone and see you soon!

More PowerCLI scripts to make life easier!

December 11, 2019 | PowerCLI, VMware | No Comments

Hello!

Inspired by my last blog post, here are more PowerCLI scripts to make life easier.

Script one; get VMs on a specific host with a specific Port Group

$viserver = "vCenter IP/FQDN here"
$t_host = "ESXi FQDN/IP here as used in vCenter"
$portgroup = "port group name here"

Connect-VIServer $viserver
Get-Cluster -VMHost $t_host | Get-VMHost | Get-VM | Get-NetworkAdapter | Where-Object{$_.NetworkName -like $portgroup}

Script two; get VMs on a specific host with a specific Port Group and move them over to a new Port Group

$viserver = "vCenter IP/FQDN here"
$t_host = "ESXi FQDN/IP here as used in vCenter"
$srcportgroup = "Source port group name here"
$dstportgroup = "Destination port group name here"

Connect-VIServer $viserver
Get-Cluster -VMHost $t_host | Get-VMHost | Get-VM | Get-NetworkAdapter | Where-Object{$_.NetworkName -like $srcportgroup} | Set-NetworkAdapter -Portgroup $dstportgroup -Confirm:$false

Note that the above script can also be made in a while loop and ask for user input each time, just move the Read-Host around with hard-coded values:

Do {
    $viserver = "vCenter IP/FQDN here"
    $t_host = "ESXi FQDN/IP here as used in vCenter"
    $srcportgroup = Read-Host -Prompt "Source port group"
    $dstportgroup = Read-Host -Prompt "Destination port group name here"
    
    Connect-VIServer $viserver
    Get-Cluster -VMHost $t_host | Get-VMHost | Get-VM | Get-NetworkAdapter | Where-Object{$_.NetworkName -like $srcportgroup} | Set-NetworkAdapter -Portgroup $dstportgroup -Confirm:$false
    } while($true)

These are simple scripts are they are not optimized, for any comments or improvements, feel free to contact me through email or Twitter, found here.

Thank you for reading and have a good day! See you at the next post.

Hi everyone,

In this post I am sharing a PowerCLI script that I made in order to easily migrate VMs from one network to the other.

There are two versions of this script, one version has a hard-coded ESXi/vCenter instance, and the other one asks for the vCenter on each run.

Version 1 (hard coded ESXi/vCenter):

Do {
$vspherehost = "ADD-ME"
$src = Read-Host -Prompt "Input source network"
$dst = Read-Host -Prompt "Input destination network"

Connect-VIServer $vspherehost
Get-VM | Get-NetworkAdapter | where{$_.NetworkName -like $src} | Set-NetworkAdapter -NetworkName $dst
} while($true)

Version 2 (Asks for ESXi/vCenter on reach run):

Do {
$vspherehost = Read-Host -Prompt "Input vCenter appliances or ESXi host"
$src = Read-Host -Prompt "Input source network"
$dst = Read-Host -Prompt "Input destination network"

Connect-VIServer $vspherehost
Get-VM | Get-NetworkAdapter | where{$_.NetworkName -like $src} | Set-NetworkAdapter -NetworkName $dst
} while($true)

As you can see, I opted for a while loop so I can change multiple networks at once, because it simply runs the script again for me instead of me having to manually run it again.

The script is not optimized as you can see, for any improvements or ideas, please email me using my contact page.

Thank you for reading and I hope to see you soon in a new post which will be about the vExpert program.

Moved from NSX-T back to NSX-V

December 4, 2019 | NSX-T, NSX-V, VMware | No Comments

Hi everyone,

This post will be out about me moving back from NSX-T to NSX-V due to weird deploying issues.

NSX-V is no longer being developed, so this has caused me to try to migrate to the new NSX-T, however I moved back to NSX-V when my NSX-T Edge nodes started to fail. The Geneve tunnels to the ESXi host randomly started to stop working and asking on the VMTN NSX forums did not work either as I got no response after four days and I needed my virtual networking to work again, so I figured that it would be easier to migrate back to NSX-V until I reinstall ESXi on the host.

After that issue, I attempted to remove the Edge and redeploy it, however the deployment failed, the OVF deployment never made it to 1% or higher and it eventually times out. I tried to reinstall the NSX-T Manager as well as vCenter but that did not work sadly. (When I wanted to deploy vRealize Suite Lifecycle Manager using the ISO did not work either but directly deploying the OVA through vCenter did work. Though, deploying the NSX-V Controller and Edges did work, very odd.)

For now, I am back on NSX-V and it is all working fine. I will try to use NSX-T again when I reinstall ESXi on the physical host in the future as the install has been broken a few times and went through a lot of migrations and upgrades.

Thank you for reading and I hope to see you in the next post which will be about easy PowerCLI scripts to help migrating VMs around.