Sort VMs by both name and index.