Home News Force vCenter Server update to reflect .vmx changes

Force vCenter Server update to reflect .vmx changes

by Roger Lund

 

Jason Boche has a great post on updating .vmx changes.

Virtual infrastructure administrators may edit a VM’s .vmx configuration file by hand with vi or nano (my favorite) for a variety of reasons. Efficiency through bulk changes via scripting, troubleshooting a problem, adding unsupported/undocumented .vmx parameters, or a higher comfort level with command line interfaces to name just a few.

There’s an easier way that involves a lot less risk using two vimsh commands at the service console. Here are the steps:

  1. Log on to the service console on the host that the VM is registered on.
  2. In the service console, make the configuration change in the .vmx file and save it.
  3. In the service console, run the command vimsh -ne “vmsvc/getallvms” |grep <vmname> to obtain the VmID of the VM. The VmID will be the first number displayed on the left. Excluding the |grep <vmname> portion of the command will display all VMs registered on the ESX host.
    Example:
    vimsh -ne “vmsvc/getallvms” |grep knoppix
    Returns:
    80 knoppix [fusion_builder_container hundred_percent=”yes” overflow=”visible”][fusion_builder_row][fusion_builder_column type=”1_1″ background_position=”left top” background_color=”” border_size=”” border_color=”” border_style=”solid” spacing=”yes” background_image=”” background_repeat=”no-repeat” padding=”” margin_top=”0px” margin_bottom=”0px” class=”” id=”” animation_type=”” animation_speed=”0.3″ animation_direction=”left” hide_on_mobile=”no” center_content=”no” min_height=”none”][msa1000_lun3] knoppix/knoppix.vmx otherLinuxGuest vmx-04 Veeam Backup: Time [4/30/2009 5:46:41 AM], Backup host [SKYWALKER], Backup file [V:VeeamBackupsGalleon Cluster Backup.vbk]
  4. In the service console, run the command vimsh -ne “vmsvc/reload <VmID>” using the VmID obtained in the previous step.
    Example:
    vimsh -ne “vmsvc/reload 80″
  5. After a few seconds, the configuration change will be received by the vCenter Server and will be reflected in the VIC.

vimsh is a very powerful command line tool. To check out more of its goodness, take a look at xtravirt’s vimsh documentation.

 

 

Please read the full blog post, as I didn’t cover it all.

I will make sure to give this a shot next time I get some time. Thanks Jason.

 

Source Post http://www.boche.net/blog/index.php/2009/05/02/force-vcenter-server-update-to-reflect-vmx-changes/

[/fusion_builder_column][/fusion_builder_row][/fusion_builder_container]

You may also like