esxi删除失效的虚拟机(5.x 6.x)

  1. Log in to the VMware ESX/ESXi host as the root user. For more information on VMware ESXi 4.1 and ESXi 5.x Technical Support Mode, see Using Tech Support Mode in ESXi 4.1 and ESXi 5.x (1017910)

  2. To list all running virtual machines and their corresponding VMIDs, run these commands:

    #vim-cmd vmsvc/getallvms
    #cd /etc/vmware/hostd/ 
  1. Make a copy of vmInventory.xml file by running this command:
    #cp vmInventory.xml vmInventory.xml.bak
  1. Stop the vpxa and hostd services by running these commands:
    #/etc/init.d/vpxa stop
    #/etc/init.d/hostd stop 
  1. Rename the vmInventory.xml file by running this command:

Note: This action unregisters all virtual machines from the host.

    #mv vmInventory.xml vmInventory_xml.bak
  1. Start the vpxa and hostd services by running these commands:
    #/etc/init.d/vpxa start
    #/etc/init.d/hostd start
  1. Log in to vSphere Client and verify that the virtual machine Inventory is now displayed as blank.
  2. Use this command to register every virtual machine back to Inventory on the host:
    #vim-cmd solo/registervm*full_path_of_VMX*

For Example: # vim-cmd solo/registervm /vmfs/volumes/datastore_name/VM_directory/VM_name.vmx

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • **2014真题Directions:Read the following text. Choose the be...
    又是夜半惊坐起阅读 10,146评论 0 23
  • 晨起,忽见窗台上的蝴蝶草已发出簇簇新叶,险些枯死的天竺葵也开了两朵红花,一旁的蓝雪花比它们的个子高许多,像极伟岸的...
    涴溪沙阅读 483评论 0 0
  • 上梁不正下梁歪 原创文 | 是热河·点击上方收听音频 (清风浪港手写铺原创文,未经授权请勿转载) 我家楼上住户的菜...
    清风浪港手写铺阅读 268评论 0 0
  • 要学会独立的思考,不要轻易相信一件事,不要把决定权交给其它人。 叔本华《读书与书籍》文摘: 叔本华(1788——1...
    sly61阅读 1,296评论 2 8
  • 6.6感恩日记 感恩大雨过后的清爽,感恩和老公一起晨跑,老公给予的陪伴,温馨幸福!感恩早上老公送女儿去幼儿园,可以...
    rainlove2011阅读 188评论 0 0