Cross vCenter vMotion Utility

Harold Preyers

Whilst upgrading the homelab I also decided to rebuild from scratch. There were some challenges to overcome because I have running VM’s I don’t want to shut while migrating.

My current homelab setup and the go to setup is documented here (work in progress). Basically it comes down to:

  • Original setup: three hosts backed with iSCSI storage for running the VM’s
  • Temporary setup:
    • New vCenter with two of the three hosts configured for vSAN with connection to the iSCSI datastores
    • Old vCenter with one remaining host running all of the VM’s
  • Destination setup: new vCenter with vSAN datastore

To migrate the virtual machines from the old environment (from the last remaining host to the two new hosts) I decided to take a look at the ‘Cross vCenter vMotion Utility‘. There is not a lot of documentation available at first sight but it is straightforward to set up and configure. Although I did find some things that are worth noting.

Step 1 : Running the jar

To start the Cross vCenter vMotion Utility one must run a jar file: ‘java -jar xvm-2.6.jar’.

I am running linux (Pop!_OS 18.04) as my OS. I have java version 8 and 11 installed with version 11 as default. Version 11 is not listed on the fling site as supported (Java Runtime Environment 1.8-10: See requirements). Running with version 11 (sudo java -jar xvm-2.6.jar) starts the local website on port 8080 (http://localhost:8080) but does not report back on the CLI.

Under the assumption that the java application started and failed rightaway, I decided to run it on my windows box which has Java Runtime environment 8 installed. The last line of feedback ‘Initialized controller with empty state’ was the same as on my linux machine. Navigating to localhost:8080 showed the Cross vCenter vMotion Utility web interface. I could now configure the application and run migrations.

It is only later when I closed the running instance on my linux box and restarting it that it showed me output on the CLI that the application started succesfully.

ps -df | grep -i java
kill -HUP 9159

Output after restart:

Step 2 : Configuration

  • Register connections
    1. Source vCenter
    2. Destination vCenter

Step 3 : Migration

  • Add migrations
    1. Source Site: source vCenter
    2. Target Site: destination vCenter
    3. Source Datacenter
    4. Virtual Machine(s): Select one or more virtual machines
    5. Placement Target: Cluster or Host
    6. Target Datastore
    7. Network Mapping(s): the utility will detect the source networks for all selected virtual machines and display a selection field for the target network

Issues

Storage vMotion?

Storage vMotion does not seem to be supported. I tried to svMotion my machines from their iSCSI based datastores to the newly created vSAN datastore but it failed.

Target Datastore: Shared datastore (same as source)

Choosing ‘Shared datastore (same as source)’ as Target Datastore fails and throws the following error:

I added the destination host and tried again but it also failed with several issues:

  • destination networks were not listed, only a subset were – although all were added to the distributed vSwitch
  • matching datastore was not found on the destination host

I could migrate to the new environment but had to select a destination datastore. This posed not much of a problem in my environment because the end goal was to get the virtual machine on the vSAN datastore.

Now after migrating most of the virtual machines, only two types of virtual machines were leftit felt like I could take a step back if needed. The a to migrate, the vCenter VM’s and the firewall VM’s. The old vCenter is not needed anymore, the new vCenter and the firewall VM’s are and once those are migrated I can go break down the last part of the old setup. The last host will be reset to default settings via the DCUI after which it can be added to the vSAN cluster and I can make the vSAN cluster setup complete. A tmp_vSAN_policy with no redundancy is not the way you (or me) want to run your environment, even if it is a lab environment.

Conclusion

I could not migrate from the old environment to the new environment while also doing a Storage vMotion, I did needed to go in steps.

Nevertheless I’m happy to have used the Cross vCenter vMotion Utility. It did save me a lot of work, required little setup and configuration. I didn’t need to change anything to the setup of my old nor my new environment.

Why you should register for one of the last seats available at #vmugbe

Harold Preyers

What does the VMware User Group means to me?

Well it is already more than a decade ago since I visited my first VMUGBE. I have seen the event grow from 15 visitors to more than 200. The last couple of years it is hosted in the LAMOT event center in Mechelen which is a superb venue. Ever since the first time I only missed a couple due to other obligations but when I attended I took home a lot of info, knowledge and new visions. Going to VMUGBE throughout the years have made me grow due to the sessions and the peers available.

A couple of years ago I met @kim_bottu who engaged me in becoming a #vExpert. Now two years in a row I am awarded being part of this vExpert community and VMUGBE facilitated this in a way. A lot of the Belgian vExperts come year after year and are very open people ready to chat.

These are a couple of the vExperts that will be attending this year:

  • Erik Schils
  • Stijn Depril
  • Tom Vallons
  • Maarten Van Driessen
  • Frederiek Van Hoornick
  • Luc Dekens
  • Jose Cavalheri
  • Maarten Caus
  • Niels Engelen
  • Alain Geenrits
  • Jurgen Van de Perre
  • Wouter Kursten
  • Hans Kraaijeveld
  • Johan Van Amersfoort
  • Harold Preyers
  • and …

Why should you attend?

It is a FREE #vCommunity networking event with top speakers. There is top relevant content available from CNA to Horizon View and VMware Cloud on AWS to VMware Blockchain and IOT. It is all VMware related and there is some marketing stuff yes (which make the event FREE) but most is community driven and real world examples.

There are 16 sessions in total, 3 parallel tracks with 4 sessions in the morning and 4 in the afternoon. There will be a small breakfast, a free lunch, a free BBQ and a chance to win a smartphone.

What sessions am I looking forward to?

Maarten Van Driessen (@mvandriessen) will share his knowledge from the field about VVOLS. I have never worked with VVOLS so I’m curious. My lab has Synology based storage and sadly Synology does not support VVOLS. I’m personally looking forward to this session.

Maarten is blogging at brisk-it.net

https://www.vmug.be/sessions/unlocking-the-power-of-spbm-with-traditional-storage-arrays/

Our very own Luc Dekens (@lucd) will tell you about PowerCLI. If you have ever done anything with PowerCLI then you must have found his blog. Even if you know everything about PowerCLI this is a session to attend. I have been at several Luc his sessions at VMworld and the info provided gave me new insights about challenges I had.

Luc is blogging at lucd.info

https://www.vmug.be/sessions/powercli-the-power-of-code/

Johan van Amersfoort (@vhojan) is an easy to listen to speaker which has his session right after lunch. He will tell about a project where they used the VDI infrastructure to do a whole other thing during the nighttime. It is the only session in that timeframe and it is sponsored but you’ll not want to miss out on this session. Myself, I missed this session twice at NLVMUG and at VMware EMPOWER so I am glad I don’t have to choose between sessions now. Third time is a charm.

Johan is blogging at vhojan.nl

https://www.vmug.be/sessions/sponsor-itq-vdi-by-day-compete-by-night/

Last but not least the #vExpert Community session led by Stijn Depril (@sdepril). This sessions is one of the last sessions and will try to highlight why you should become a #vExpert. I will be on the #vExpert panel during this session so if you want to see me sweat (it is my first public speaking session) you should attend this session. We will share a lot of personal views and insights during this session.

Stijn is blogging at vmusketeers.com

https://www.vmug.be/sessions/vexpert-community-session/

I could go highlight a lot more sessions but that content is all available on https://www.vmug.be/

Key takeaways and tips:

Be there on time as the opening keynote speaker is Joe Baguley (@joebaguley) from VMware and last year it was a cool story to hear.

If you are attend, take the time to come to speak to me. I still am a shy guy.

Step out of your comfort zone, take your lunch to a table and start to chat.

Knowledge is about sharing.

Thanks:

I want to thank @erikschils for all his efforts in organising the VMUGBE all these years.

I also want to thank those who have attended the previous VMUGBE events and those who will be attending this year. You are the ones that make these events a success.

Registration:

Reconfigure diagnostic partition using Get-EsxCli -V2

Harold Preyers

The following powershell snippet is going to unconfigure the diagnostic coredump partition using the esxcli version 2 cmdlet. The second part will reconfigure the diagnostic partition with the ‘smart’ option so that an accessible partition is chosen.

If you want to configure a new diagnostic partition the you will find the necessary information in the following VMware knowledge base article: Configuring a diagnostic coredump partition on an ESXi 5.x/6.x host (2004299). There will be additional steps to supply the partition id.

The following powershell snippet is going to unconfigure the diagnostic coredump partition using the esxcli version 2 cmdlet. The second part will reconfigure the diagnostic partition with the ‘smart’ option so that an accessible partition is chosen.

If you want to configure a new diagnostic partition the you will find the necessary information in the following VMware knowledge base article: Configuring a diagnostic coredump partition on an ESXi 5.x/6.x host (2004299). There will be additional steps to supply the partition id.

$srv = Get-VMHost ESXiHost
$esxcli = Get-EsxCli -VMHost $srv -V2
$arg = $esxcli.system.coredump.partition.set.CreateArgs()
$arg.unconfigure = "true"
$esxcli.system.coredump.partition.set.Invoke($arg)
$arg = $esxcli.system.coredump.partition.set.CreateArgs()
$arg.unconfigure = "false"
$arg.enable = "true"
$arg.smart = "true"
$esxcli.system.coredump.partition.set.Invoke($arg)

First we connect to the esxi host directly and insert the connection details in the variable $srv:

$srv = Get-VMHost ESXiHost

Then we create a esxcli object $esxcli using the variable $srv we created previously:

$esxcli = Get-EsxCli -VMHost $srv -V2

Now we create a variable $arg to store the arguments we will provide later:

$arg = $esxcli.system.coredump.partition.set.CreateArgs()

Setting the $arg property ‘unconfigure’ to true will deactivate the diagnostic partition:

$arg.unconfigure = "true

The invoke command will invoke the command remotely on the esxi host. After execution the diagnostic partition is deactivated:

$esxcli.system.coredump.partition.set.Invoke($arg)

The second part starts with creating a new set of arguments:

$arg = $esxcli.system.coredump.partition.set.CreateArgs()

Reactivate the coredump, because we deactivated it before:

$arg.unconfigure = "false"

Enable the coredump partition:

$arg.enable = "true"

The ‘smart’ property will try to use an accessible partition:

$arg.smart = "true"

The last argument will configure the diagnostic partition using the supplied parameters:

$esxcli.system.coredump.partition.set.Invoke($arg)

Configuring Tesla M60 cards for NVIDIA GRID vGPU

Harold Preyers

There are a couple of steps which need to be taken to configure the Tesla M60 cards with NVIDIA GRID VGPU in a vSphere / Horizon environment. I have listed them here quick and dirty. They are an extract of the NVIDIA Virtual GPU Software User Guide.

  • On the host(s):
    • Install the vib
      • esxcli software vib install -v directory/NVIDIA-vGPUVMware_ESXi_6.0_Host_Driver_390.72-1OEM.600.0.0.2159203.vib
    • Reboot the host(s)
    • Check if the module is loaded
      • vmkload_mod -l | grep nvidia
    • Run the nvidia-smi command to verify the correct communictation with the device
    • Configuring Suspend and Resume for VMware vSphere
      • esxcli system module parameters set -m nvidia -p “NVreg_RegistryDwords=RMEnableVgpuMigration=1”
    • Reboot the host
    • Confirm that suspend and resume is configured
      • dmesg | grep NVRM
    • Check that the default graphics type is set to shared direct
    • If the graphics type were not set to shared direct, execute the following commands to stop and start the xorg and nv-hostengine services
      • /etc/init.d/xorg stop
      • nv-hostengine -t
      • nv-hostengine -d
      • /etc/init.d/xorg start
  • On the VM / Parent VM:
    • Configure the VM, beware that once the vGPU is configured that the console of the VM will not be visible/accessible through the vSphere Client. An alternate access method should already be foreseen
    • Edit the VM configuration to add a shared pci device, verify that NVIDIA GRID vGPU is selected
    • Choose the vGPU profile
      more info on the profiles can be found here under section ‘1.4.1 Virtual GPU Types’: https://docs.nvidia.com/grid/6.0/grid-vgpu-user-guide/index.html
    • Reserve all guest memory
  • On the Horizon pool
    • Configure the pool to use the NVIDIA GRID vGPU as 3D Renderer