{"id":743,"date":"2013-06-25T22:24:29","date_gmt":"2013-06-25T20:24:29","guid":{"rendered":"http:\/\/michlstechblog.info\/blog\/?p=743"},"modified":"2013-06-26T13:03:08","modified_gmt":"2013-06-26T11:03:08","slug":"vmware-esxi-a-incomplete-list-of-host-commands-part-2","status":"publish","type":"post","link":"https:\/\/michlstechblog.info\/blog\/vmware-esxi-a-incomplete-list-of-host-commands-part-2\/","title":{"rendered":"VMware ESXi: A (incomplete) list of host commands Part 2"},"content":{"rendered":"<div class=\"twoclick_social_bookmarks_post_743 social_share_privacy clearfix 1.6.4 locale-en_US sprite-en_US\"><\/div><div class=\"twoclick-js\"><script type=\"text\/javascript\">\/* <![CDATA[ *\/\njQuery(document).ready(function($){if($('.twoclick_social_bookmarks_post_743')){$('.twoclick_social_bookmarks_post_743').socialSharePrivacy({\"services\":{\"flattr\":{\"uid\":\"Michl\",\"status\":\"on\",\"the_title\":\"VMware%20ESXi%3A%20A%20%28incomplete%29%20list%20of%20host%20commands%20Part%202\",\"the_excerpt\":\"Hi%2C%0D%0A%0D%0Ahere%20is%20part%202%20of%20my%20%28incomplete%29%20list%20of%20ESXi%20shell%20commands%0D%0A%0D%0AManaging%20virtual%20machines%0D%0A%0D%0AFirst%20get%20the%20VMID%20of%20the%20vm%20you%20want%20to%20manage%2C%20you%20need%20this%20ID%20in%20the%20following%20commands%0D%0A%0D%0Avim-cmd%20vmsvc%2Fgetallvms%0D%0A%0D%0AVmid%C2%A0%20Name%20File%20Guest%20OS%C2%A0%20Version%C2%A0%20Annotation%0D%0A36%20.......................................%0D%0A%0D%0APower%20On%0D%0Avim-cmd%20vmsvc%2Fpower.on%2036%0D%0A%0D%0APower%20Off%20%28Soft%29%0D%0A%0D%0Avim-cmd%20vmsvc%2Fpower.o%20...\",\"txt_info\":\"2 clicks for more data protection:\\r\\n\\r\\nOnly when you click here, the button will be come active and you can send your recommendation to Flattr. When activating, data are transmitted to third parties. \",\"perma_option\":\"off\"}},\"txt_help\":\"When you activate these fields by clicking, information to Flattr may be transferred abroad, and probably may also stored there.\",\"settings_perma\":\"Enable permanently and accept data transmission. \",\"info_link\":\"http:\\\/\\\/www.heise.de\\\/ct\\\/artikel\\\/2-Klicks-fuer-mehr-Datenschutz-1333879.html\",\"uri\":\"https:\\\/\\\/michlstechblog.info\\\/blog\\\/vmware-esxi-a-incomplete-list-of-host-commands-part-2\\\/\",\"post_id\":743,\"post_title_referrer_track\":\"VMware+ESXi%3A+A+%28incomplete%29+list+of+host+commands+Part+2\",\"display_infobox\":\"on\"});}});\n\/* ]]> *\/<\/script><\/div><p>Hi,<\/p>\n<p>here is part 2 of my (incomplete) list of ESXi shell commands<\/p>\n<p><strong>Managing virtual machines<\/strong><\/p>\n<p>First get the VMID of the vm you want to manage, you need this ID in the following commands<br \/>\n<code><br \/>\nvim-cmd vmsvc\/getallvms<\/code><\/p>\n<p><code>Vmid\u00a0 Name File Guest OS\u00a0 Version\u00a0 Annotation<br \/>\n36 .......................................<\/code><\/p>\n<p>Power On<br \/>\n<code>vim-cmd vmsvc\/power.on 36<\/code><\/p>\n<p>Power Off (Soft)<\/p>\n<p><code>vim-cmd vmsvc\/power.off 36<br \/>\n<\/code><\/p>\n<p>Power Off (Hard)<\/p>\n<p>get the world ID of the virtual machine<\/p>\n<p><code>esxcli vm process list<\/code><\/p>\n<p>TestComputer<br \/>\n<code><br \/>\nWorld ID: 1625788<br \/>\nProcess ID: 0<br \/>\nVMX Cartel ID: 1625786<br \/>\nUUID: 56 4d 9e d3 8b ce ab 59-9b 22 ac 87 40 6c 48 c3<br \/>\nDisplay Name: TestComputer<\/code><\/p>\n<p>And kill them<\/p>\n<p>esxcli vm process kill -t [<i>soft,hard,force<\/i>] -w<br \/>\n<code><br \/>\nesxcli vm process kill -t hard -w <code>1625788<\/code><\/code><\/p>\n<p>Reboot a virtual machine<br \/>\n<!--more--><br \/>\n<code>vim-cmd vmsvc\/power.reboot 36<br \/>\n<\/code><\/p>\n<p>Suspend a vm<\/p>\n<p><code>vim-cmd vmsvc\/power.suspend<\/code><\/p>\n<p>Resume a virtual machine<\/p>\n<p><code>vim-cmd vmsvc\/power.suspendResume<\/code><\/p>\n<p>Reset a virtual machine<\/p>\n<p><code>vim-cmd vmsvc\/power.<\/code>reset<\/p>\n<p>Shutdown<\/p>\n<p><code>vim-cmd vmsvc\/power.shutdown<\/code><\/p>\n<p><strong>Snapshots<\/strong><\/p>\n<p>Get VMID<\/p>\n<p><code>vim-cmd vmsvc\/getallvms<\/code><\/p>\n<p><code>Vmid\u00a0 Name File Guest OS\u00a0 Version\u00a0 Annotation<br \/>\n36 .......................................<\/code><\/p>\n<p>List all snapshots for a virtual machine<\/p>\n<p><code>vim-cmd vmsvc\/snapshot.get 36<\/code><\/p>\n<p><code>Get Snapshot:<br \/>\n|-ROOT<br \/>\n--Snapshot Name : Installation Complete<br \/>\n--Snapshot Id : 1<br \/>\n--Snapshot Desciption :<br \/>\n--Snapshot Created On : 3\/15\/2013 13:20:34<br \/>\n--Snapshot State : powered off<br \/>\n--|-CHILD<br \/>\n----Snapshot Name : SNAP1<br \/>\n----Snapshot Id : 2<br \/>\n----Snapshot Desciption :<br \/>\n----Snapshot Created On : 5\/14\/2013 11:46:19<br \/>\n----Snapshot State : powered on<br \/>\n<\/code><\/p>\n<p>Create a snapshot,\u00a0 including the RAM of the Machine<\/p>\n<p><code>vim-cmd vmsvc\/snapshot.create 36 \"New Snap\" \"Snap desc\" includeMemory<\/code><\/p>\n<p>Delete a snapshot, where 36 is the VMID and 2 the Snapshot ID<\/p>\n<p><code>vim-cmd vmsvc\/snapshot.remove 36 2<\/code><\/p>\n<p>to be continued&#8230;in <a title=\"VMware ESXi: A (incomplete) list of host commands Part 3\" href=\"http:\/\/michlstechblog.info\/blog\/vmware-esxi-a-incomplete-list-of-host-commands-part-3\/\">Part 3<\/a><\/p>\n<p>Michael<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hi, here is part 2 of my (incomplete) list of ESXi shell commands Managing virtual machines First get the VMID of the vm you want to manage, you need this ID in the following commands vim-cmd vmsvc\/getallvms Vmid\u00a0 Name File Guest OS\u00a0 Version\u00a0 Annotation 36 &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230; Power On vim-cmd vmsvc\/power.on 36 Power Off (Soft) vim-cmd &hellip; <a href=\"https:\/\/michlstechblog.info\/blog\/vmware-esxi-a-incomplete-list-of-host-commands-part-2\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">VMware ESXi: A (incomplete) list of host commands Part 2<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[195,188,196,16,204,203,198,209,197,194,14],"class_list":["post-743","post","type-post","status-publish","format-standard","hentry","category-vmware","tag-cli","tag-command","tag-console","tag-esx","tag-off","tag-on","tag-power","tag-resume","tag-snapshot","tag-ssh","tag-vmware-2"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts\/743","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/comments?post=743"}],"version-history":[{"count":8,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts\/743\/revisions"}],"predecessor-version":[{"id":755,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts\/743\/revisions\/755"}],"wp:attachment":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/media?parent=743"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/categories?post=743"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/tags?post=743"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}