How to sort the MUI’s list of Virtual Machines

This week I found out a way of sorting the list of VM’s as it appears in the ESX MUI. By default the list of VM’s in the MUI is sorted by the order of the VM’s created Or by the order they are registered (which can be the same thing). We can sort the VM’s alphabetically or re-order them based on your own preference by using the Service Console

  1. Logon to the Service Console as ROOT
  2. Sort the vmlist – by using the sort command piped to a new file, and then copy over sorted vmlist over the original vmlist with:

    sort /etc/vmware/vm-list > /etc/vmware/vm-listsorted

    and

    cp /etc/vmware/vm-listsorted /etc/vmware/vm-list

  3. Press [ENTER] to over-write the original file
  4. Restart the vmware-serverd and vmware httpd daemons with

    service vmware-serverd restart
    service httpd.vwmare restart

    Note:
    If you are using vCenter restart the ccagent service instead from the vCenter client using

    Right-click the ESX Host
    Properties
    Click the Advanced Tab, and click the Restart button

    Alternatively, kill the ccagent process from the Service Console (ESX will automatically restart it…) with:

    ps -ef | grep ccagent

    and then

    kill pidno, in my case kill 27023

    Note:
    If you have the vCenter client open this should force a “reconnecting…” event
     
    If you log on to the ESX MUI you should find the VM list is sorted alphabetically…

    Note:
    If this fails to generate the list you require – simply edit the vmlist with nano – and reorder… be sure to backup the file before you do this. 

Comments are closed.



Podcast

LinkedIn

If you want to add Mike Laverick on LinkedIn, click on this button:

Mike Laverick

Categories

My Pages

Archives

Other VMware Bloggers