{"id":5697,"date":"2023-06-14T17:01:19","date_gmt":"2023-06-14T15:01:19","guid":{"rendered":"https:\/\/irg-net.com\/?p=5697"},"modified":"2024-03-11T16:28:53","modified_gmt":"2024-03-11T15:28:53","slug":"create-show-delete-snapshots-with-esxi-cli","status":"publish","type":"post","link":"https:\/\/irg-net.com\/index.php\/create-show-delete-snapshots-with-esxi-cli\/","title":{"rendered":"Create\/Show\/Delete Snapshots with ESXi CLI"},"content":{"rendered":"<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/irg-net.com\/wp-content\/uploads\/2023\/01\/image-1.png?resize=238%2C132&#038;ssl=1\" alt=\"\" class=\"wp-image-2974\" width=\"238\" height=\"132\"\/><\/figure>\n<\/div>\n\n\n<div style=\"height:34px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>In various situations (mostly in the context of automation), I have been asked by DevOps colleagues how to take a snapshot of a VM via CLI. The whole thing works with a vim-cmd command. You need access via SSH to the respective ESXi server, then we list all available VMs:<\/p>\n\n\n\n<div style=\"height:34px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<pre class=\"wp-block-code\" style=\"font-size:14px\"><code lang=\"python\" class=\"language-python\">vim-cmd vmsvc\/getallvms<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"880\" height=\"131\" src=\"https:\/\/i0.wp.com\/irg-net.com\/wp-content\/uploads\/2023\/06\/2023-06-14_150224.png?resize=880%2C131&#038;ssl=1\" alt=\"\" class=\"wp-image-5699\" srcset=\"https:\/\/i0.wp.com\/irg-net.com\/wp-content\/uploads\/2023\/06\/2023-06-14_150224.png?w=880&amp;ssl=1 880w, https:\/\/i0.wp.com\/irg-net.com\/wp-content\/uploads\/2023\/06\/2023-06-14_150224.png?resize=300%2C45&amp;ssl=1 300w, https:\/\/i0.wp.com\/irg-net.com\/wp-content\/uploads\/2023\/06\/2023-06-14_150224.png?resize=768%2C114&amp;ssl=1 768w\" sizes=\"auto, (max-width: 880px) 100vw, 880px\" \/><\/figure>\n\n\n\n<div style=\"height:34px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Then we note the <strong>VMID <\/strong>from which we want to create a snapshot. In our case, it is <strong>VMID 6<\/strong> &#8220;linux-a-14&#8221;. <\/p>\n\n\n\n<p>(<strong>Optional<\/strong>) With the following command you can check the power state of the VM:<\/p>\n\n\n\n<pre class=\"wp-block-code\" style=\"font-size:14px\"><code lang=\"python\" class=\"language-python\">vim-cmd vmsvc\/power.getstate 6<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"476\" height=\"79\" src=\"https:\/\/i0.wp.com\/irg-net.com\/wp-content\/uploads\/2023\/06\/2023-06-14_153940.png?resize=476%2C79&#038;ssl=1\" alt=\"\" class=\"wp-image-5704\" srcset=\"https:\/\/i0.wp.com\/irg-net.com\/wp-content\/uploads\/2023\/06\/2023-06-14_153940.png?w=476&amp;ssl=1 476w, https:\/\/i0.wp.com\/irg-net.com\/wp-content\/uploads\/2023\/06\/2023-06-14_153940.png?resize=300%2C50&amp;ssl=1 300w\" sizes=\"auto, (max-width: 476px) 100vw, 476px\" \/><\/figure>\n\n\n\n<div style=\"height:34px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Now that the VM is powered on, we can fire off the <strong>vim-cmd<\/strong> command for a snapshot creation:<\/p>\n\n\n\n<pre class=\"wp-block-code\" style=\"font-size:14px\"><code lang=\"python\" class=\"language-python\">vim-cmd vmsvc\/snapshot.create 6 test1<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"522\" height=\"57\" src=\"https:\/\/i0.wp.com\/irg-net.com\/wp-content\/uploads\/2023\/06\/2023-06-14_152746.png?resize=522%2C57&#038;ssl=1\" alt=\"\" class=\"wp-image-5700\" srcset=\"https:\/\/i0.wp.com\/irg-net.com\/wp-content\/uploads\/2023\/06\/2023-06-14_152746.png?w=522&amp;ssl=1 522w, https:\/\/i0.wp.com\/irg-net.com\/wp-content\/uploads\/2023\/06\/2023-06-14_152746.png?resize=300%2C33&amp;ssl=1 300w\" sizes=\"auto, (max-width: 522px) 100vw, 522px\" \/><\/figure>\n\n\n\n<div style=\"height:34px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>We can <strong>extend <\/strong>the <strong>Snapshot Create vim-cmd<\/strong> command by adding a <strong>description <\/strong>and defining two options that can be also selected in the <strong>GUI <\/strong>by setting <strong>1 (on)<\/strong> or <strong>0 (off)<\/strong> behind the description:<\/p>\n\n\n\n<ul class=\"wp-block-list\" style=\"font-size:16px\">\n<li>Including virtual machines memory<\/li>\n\n\n\n<li>Quiescing guest file system (<em>requires VM tools<\/em>)<\/li>\n<\/ul>\n\n\n\n<p>In this <strong>Example <\/strong>both options are off<strong>:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\" style=\"font-size:14px\"><code lang=\"python\" class=\"language-python\">vim-cmd vmsvc\/snapshot.create 6 test snapshot_test 0 0<\/code><\/pre>\n\n\n\n<div style=\"height:34px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>If the snapshot creation fails, you will get a different (<strong>error<\/strong>) message. I create 2 more snapshots (<strong>test2, test3<\/strong>) to fill the overview. Because next we fire the command to see the existing snapshots, it is important that you provide the corresponding <strong>VMID <\/strong>(in our case 6) again.<\/p>\n\n\n\n<pre class=\"wp-block-code\" style=\"font-size:14px\"><code lang=\"python\" class=\"language-python\">vim-cmd vmsvc\/snapshot.get 6<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"534\" height=\"382\" src=\"https:\/\/i0.wp.com\/irg-net.com\/wp-content\/uploads\/2023\/06\/2023-06-14_153308.png?resize=534%2C382&#038;ssl=1\" alt=\"\" class=\"wp-image-5701\" srcset=\"https:\/\/i0.wp.com\/irg-net.com\/wp-content\/uploads\/2023\/06\/2023-06-14_153308.png?w=534&amp;ssl=1 534w, https:\/\/i0.wp.com\/irg-net.com\/wp-content\/uploads\/2023\/06\/2023-06-14_153308.png?resize=300%2C215&amp;ssl=1 300w\" sizes=\"auto, (max-width: 534px) 100vw, 534px\" \/><\/figure>\n\n\n\n<div style=\"height:34px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Here we can see perfectly (<strong>as in the GUI<\/strong>) how the snapshot topology looks like. If you want to delete a specific snapshot you have to enter the following command. In our case we delete <strong>Snapshot test2<\/strong>, for this we notice the <strong>Snapshot ID 9 <\/strong>in the above overview:<\/p>\n\n\n\n<pre class=\"wp-block-code\" style=\"font-size:14px\"><code lang=\"python\" class=\"language-python\">vim-cmd vmsvc\/snapshot.remove 6 9<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"511\" height=\"274\" src=\"https:\/\/i0.wp.com\/irg-net.com\/wp-content\/uploads\/2023\/06\/2023-06-14_153605.png?resize=511%2C274&#038;ssl=1\" alt=\"\" class=\"wp-image-5702\" srcset=\"https:\/\/i0.wp.com\/irg-net.com\/wp-content\/uploads\/2023\/06\/2023-06-14_153605.png?w=511&amp;ssl=1 511w, https:\/\/i0.wp.com\/irg-net.com\/wp-content\/uploads\/2023\/06\/2023-06-14_153605.png?resize=300%2C161&amp;ssl=1 300w\" sizes=\"auto, (max-width: 511px) 100vw, 511px\" \/><\/figure>\n\n\n\n<div style=\"height:34px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>The command directly returns a new overview of the current available Snapshots and as you can see, <strong>Snapshot test2<\/strong> is deleted. If we want to delete <strong>ALL Snapshots<\/strong> of a VM, we need the following command:<\/p>\n\n\n\n<pre class=\"wp-block-code\" style=\"font-size:14px\"><code lang=\"python\" class=\"language-python\">vim-cmd vmsvc\/snapshot.removeall 6<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"497\" height=\"63\" src=\"https:\/\/i0.wp.com\/irg-net.com\/wp-content\/uploads\/2023\/06\/2023-06-14_153811.png?resize=497%2C63&#038;ssl=1\" alt=\"\" class=\"wp-image-5703\" srcset=\"https:\/\/i0.wp.com\/irg-net.com\/wp-content\/uploads\/2023\/06\/2023-06-14_153811.png?w=497&amp;ssl=1 497w, https:\/\/i0.wp.com\/irg-net.com\/wp-content\/uploads\/2023\/06\/2023-06-14_153811.png?resize=300%2C38&amp;ssl=1 300w\" sizes=\"auto, (max-width: 497px) 100vw, 497px\" \/><\/figure>\n\n\n\n<div style=\"height:34px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>The output is expressive enough, in my opinion. \ud83d\ude00 This is it from this little tutorial for creating\/deleting\/showing Snapshots via CLI. If you have any questions please leave it in the comments. \ud83d\ude42<\/p>\n\n\n\n<div style=\"height:34px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>In various situations (mostly in the context of automation), I have been asked by DevOps colleagues how to take a snapshot of a VM via CLI. The whole thing works with a vim-cmd command. You need access via SSH to the respective ESXi server, then we list all available VMs: Then we note the VMID [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1,38,19],"tags":[],"class_list":["post-5697","post","type-post","status-publish","format-standard","hentry","category-blog","category-esxi","category-vmware"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Create\/Show\/Delete Snapshots with ESXi CLI - irgNET<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/irgnet-ga3w6nfbvw.live-website.com\/index.php\/create-show-delete-snapshots-with-esxi-cli\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Create\/Show\/Delete Snapshots with ESXi CLI - irgNET\" \/>\n<meta property=\"og:description\" content=\"In various situations (mostly in the context of automation), I have been asked by DevOps colleagues how to take a snapshot of a VM via CLI. The whole thing works with a vim-cmd command. You need access via SSH to the respective ESXi server, then we list all available VMs: Then we note the VMID [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/irgnet-ga3w6nfbvw.live-website.com\/index.php\/create-show-delete-snapshots-with-esxi-cli\/\" \/>\n<meta property=\"og:site_name\" content=\"irgNET\" \/>\n<meta property=\"article:published_time\" content=\"2023-06-14T15:01:19+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-03-11T15:28:53+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/irgnet-ga3w6nfbvw.live-website.com\/wp-content\/uploads\/2023\/01\/image-1.png\" \/>\n<meta name=\"author\" content=\"H. Cemre G\u00fcnay\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@irg_net\" \/>\n<meta name=\"twitter:site\" content=\"@irg_net\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"H. Cemre G\u00fcnay\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/irgnet-ga3w6nfbvw.live-website.com\\\/index.php\\\/create-show-delete-snapshots-with-esxi-cli\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/irgnet-ga3w6nfbvw.live-website.com\\\/index.php\\\/create-show-delete-snapshots-with-esxi-cli\\\/\"},\"author\":{\"name\":\"H. Cemre G\u00fcnay\",\"@id\":\"https:\\\/\\\/irgnet-ga3w6nfbvw.live-website.com\\\/#\\\/schema\\\/person\\\/71b46e79e8c12bdc8e610214a6621a66\"},\"headline\":\"Create\\\/Show\\\/Delete Snapshots with ESXi CLI\",\"datePublished\":\"2023-06-14T15:01:19+00:00\",\"dateModified\":\"2024-03-11T15:28:53+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/irgnet-ga3w6nfbvw.live-website.com\\\/index.php\\\/create-show-delete-snapshots-with-esxi-cli\\\/\"},\"wordCount\":323,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/irgnet-ga3w6nfbvw.live-website.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/irgnet-ga3w6nfbvw.live-website.com\\\/index.php\\\/create-show-delete-snapshots-with-esxi-cli\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/irg-net.com\\\/wp-content\\\/uploads\\\/2023\\\/01\\\/image-1.png\",\"articleSection\":[\"Blog\",\"ESXi\",\"VMware\"],\"inLanguage\":\"en\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/irgnet-ga3w6nfbvw.live-website.com\\\/index.php\\\/create-show-delete-snapshots-with-esxi-cli\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/irgnet-ga3w6nfbvw.live-website.com\\\/index.php\\\/create-show-delete-snapshots-with-esxi-cli\\\/\",\"url\":\"https:\\\/\\\/irgnet-ga3w6nfbvw.live-website.com\\\/index.php\\\/create-show-delete-snapshots-with-esxi-cli\\\/\",\"name\":\"Create\\\/Show\\\/Delete Snapshots with ESXi CLI - irgNET\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/irgnet-ga3w6nfbvw.live-website.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/irgnet-ga3w6nfbvw.live-website.com\\\/index.php\\\/create-show-delete-snapshots-with-esxi-cli\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/irgnet-ga3w6nfbvw.live-website.com\\\/index.php\\\/create-show-delete-snapshots-with-esxi-cli\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/irg-net.com\\\/wp-content\\\/uploads\\\/2023\\\/01\\\/image-1.png\",\"datePublished\":\"2023-06-14T15:01:19+00:00\",\"dateModified\":\"2024-03-11T15:28:53+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/irgnet-ga3w6nfbvw.live-website.com\\\/index.php\\\/create-show-delete-snapshots-with-esxi-cli\\\/#breadcrumb\"},\"inLanguage\":\"en\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/irgnet-ga3w6nfbvw.live-website.com\\\/index.php\\\/create-show-delete-snapshots-with-esxi-cli\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en\",\"@id\":\"https:\\\/\\\/irgnet-ga3w6nfbvw.live-website.com\\\/index.php\\\/create-show-delete-snapshots-with-esxi-cli\\\/#primaryimage\",\"url\":\"https:\\\/\\\/i0.wp.com\\\/irg-net.com\\\/wp-content\\\/uploads\\\/2023\\\/01\\\/image-1.png?fit=576%2C324&ssl=1\",\"contentUrl\":\"https:\\\/\\\/i0.wp.com\\\/irg-net.com\\\/wp-content\\\/uploads\\\/2023\\\/01\\\/image-1.png?fit=576%2C324&ssl=1\",\"width\":576,\"height\":324},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/irgnet-ga3w6nfbvw.live-website.com\\\/index.php\\\/create-show-delete-snapshots-with-esxi-cli\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/irgnet-ga3w6nfbvw.live-website.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create\\\/Show\\\/Delete Snapshots with ESXi CLI\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/irgnet-ga3w6nfbvw.live-website.com\\\/#website\",\"url\":\"https:\\\/\\\/irgnet-ga3w6nfbvw.live-website.com\\\/\",\"name\":\"irgNET\",\"description\":\"a virtual Knowledge Base\",\"publisher\":{\"@id\":\"https:\\\/\\\/irgnet-ga3w6nfbvw.live-website.com\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/irgnet-ga3w6nfbvw.live-website.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/irgnet-ga3w6nfbvw.live-website.com\\\/#organization\",\"name\":\"irg-NET\",\"url\":\"https:\\\/\\\/irgnet-ga3w6nfbvw.live-website.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en\",\"@id\":\"https:\\\/\\\/irgnet-ga3w6nfbvw.live-website.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/i2.wp.com\\\/irg-net.com\\\/wp-content\\\/uploads\\\/2021\\\/06\\\/cropped-FINAL-Removed-Alpha.png?fit=2048%2C2048&ssl=1\",\"contentUrl\":\"https:\\\/\\\/i2.wp.com\\\/irg-net.com\\\/wp-content\\\/uploads\\\/2021\\\/06\\\/cropped-FINAL-Removed-Alpha.png?fit=2048%2C2048&ssl=1\",\"width\":2048,\"height\":2048,\"caption\":\"irg-NET\"},\"image\":{\"@id\":\"https:\\\/\\\/irgnet-ga3w6nfbvw.live-website.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/x.com\\\/irg_net\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/h-cemre-g\u00fcnay-2b61601b4\\\/\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UC8GknhO5YMAkAoVxppu6aaQ\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/irgnet-ga3w6nfbvw.live-website.com\\\/#\\\/schema\\\/person\\\/71b46e79e8c12bdc8e610214a6621a66\",\"name\":\"H. Cemre G\u00fcnay\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/15f5d90a0ec651cb5003605e56e8ba104f93bc11230562284db56c845df9d54d?s=96&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/15f5d90a0ec651cb5003605e56e8ba104f93bc11230562284db56c845df9d54d?s=96&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/15f5d90a0ec651cb5003605e56e8ba104f93bc11230562284db56c845df9d54d?s=96&r=g\",\"caption\":\"H. Cemre G\u00fcnay\"},\"sameAs\":[\"http:\\\/\\\/192.168.34.155\\\/wordpress\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Create\/Show\/Delete Snapshots with ESXi CLI - irgNET","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/irgnet-ga3w6nfbvw.live-website.com\/index.php\/create-show-delete-snapshots-with-esxi-cli\/","og_locale":"en_US","og_type":"article","og_title":"Create\/Show\/Delete Snapshots with ESXi CLI - irgNET","og_description":"In various situations (mostly in the context of automation), I have been asked by DevOps colleagues how to take a snapshot of a VM via CLI. The whole thing works with a vim-cmd command. You need access via SSH to the respective ESXi server, then we list all available VMs: Then we note the VMID [&hellip;]","og_url":"https:\/\/irgnet-ga3w6nfbvw.live-website.com\/index.php\/create-show-delete-snapshots-with-esxi-cli\/","og_site_name":"irgNET","article_published_time":"2023-06-14T15:01:19+00:00","article_modified_time":"2024-03-11T15:28:53+00:00","og_image":[{"url":"https:\/\/irgnet-ga3w6nfbvw.live-website.com\/wp-content\/uploads\/2023\/01\/image-1.png","type":"","width":"","height":""}],"author":"H. Cemre G\u00fcnay","twitter_card":"summary_large_image","twitter_creator":"@irg_net","twitter_site":"@irg_net","twitter_misc":{"Written by":"H. Cemre G\u00fcnay","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/irgnet-ga3w6nfbvw.live-website.com\/index.php\/create-show-delete-snapshots-with-esxi-cli\/#article","isPartOf":{"@id":"https:\/\/irgnet-ga3w6nfbvw.live-website.com\/index.php\/create-show-delete-snapshots-with-esxi-cli\/"},"author":{"name":"H. Cemre G\u00fcnay","@id":"https:\/\/irgnet-ga3w6nfbvw.live-website.com\/#\/schema\/person\/71b46e79e8c12bdc8e610214a6621a66"},"headline":"Create\/Show\/Delete Snapshots with ESXi CLI","datePublished":"2023-06-14T15:01:19+00:00","dateModified":"2024-03-11T15:28:53+00:00","mainEntityOfPage":{"@id":"https:\/\/irgnet-ga3w6nfbvw.live-website.com\/index.php\/create-show-delete-snapshots-with-esxi-cli\/"},"wordCount":323,"commentCount":0,"publisher":{"@id":"https:\/\/irgnet-ga3w6nfbvw.live-website.com\/#organization"},"image":{"@id":"https:\/\/irgnet-ga3w6nfbvw.live-website.com\/index.php\/create-show-delete-snapshots-with-esxi-cli\/#primaryimage"},"thumbnailUrl":"https:\/\/irg-net.com\/wp-content\/uploads\/2023\/01\/image-1.png","articleSection":["Blog","ESXi","VMware"],"inLanguage":"en","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/irgnet-ga3w6nfbvw.live-website.com\/index.php\/create-show-delete-snapshots-with-esxi-cli\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/irgnet-ga3w6nfbvw.live-website.com\/index.php\/create-show-delete-snapshots-with-esxi-cli\/","url":"https:\/\/irgnet-ga3w6nfbvw.live-website.com\/index.php\/create-show-delete-snapshots-with-esxi-cli\/","name":"Create\/Show\/Delete Snapshots with ESXi CLI - irgNET","isPartOf":{"@id":"https:\/\/irgnet-ga3w6nfbvw.live-website.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/irgnet-ga3w6nfbvw.live-website.com\/index.php\/create-show-delete-snapshots-with-esxi-cli\/#primaryimage"},"image":{"@id":"https:\/\/irgnet-ga3w6nfbvw.live-website.com\/index.php\/create-show-delete-snapshots-with-esxi-cli\/#primaryimage"},"thumbnailUrl":"https:\/\/irg-net.com\/wp-content\/uploads\/2023\/01\/image-1.png","datePublished":"2023-06-14T15:01:19+00:00","dateModified":"2024-03-11T15:28:53+00:00","breadcrumb":{"@id":"https:\/\/irgnet-ga3w6nfbvw.live-website.com\/index.php\/create-show-delete-snapshots-with-esxi-cli\/#breadcrumb"},"inLanguage":"en","potentialAction":[{"@type":"ReadAction","target":["https:\/\/irgnet-ga3w6nfbvw.live-website.com\/index.php\/create-show-delete-snapshots-with-esxi-cli\/"]}]},{"@type":"ImageObject","inLanguage":"en","@id":"https:\/\/irgnet-ga3w6nfbvw.live-website.com\/index.php\/create-show-delete-snapshots-with-esxi-cli\/#primaryimage","url":"https:\/\/i0.wp.com\/irg-net.com\/wp-content\/uploads\/2023\/01\/image-1.png?fit=576%2C324&ssl=1","contentUrl":"https:\/\/i0.wp.com\/irg-net.com\/wp-content\/uploads\/2023\/01\/image-1.png?fit=576%2C324&ssl=1","width":576,"height":324},{"@type":"BreadcrumbList","@id":"https:\/\/irgnet-ga3w6nfbvw.live-website.com\/index.php\/create-show-delete-snapshots-with-esxi-cli\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/irgnet-ga3w6nfbvw.live-website.com\/"},{"@type":"ListItem","position":2,"name":"Create\/Show\/Delete Snapshots with ESXi CLI"}]},{"@type":"WebSite","@id":"https:\/\/irgnet-ga3w6nfbvw.live-website.com\/#website","url":"https:\/\/irgnet-ga3w6nfbvw.live-website.com\/","name":"irgNET","description":"a virtual Knowledge Base","publisher":{"@id":"https:\/\/irgnet-ga3w6nfbvw.live-website.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/irgnet-ga3w6nfbvw.live-website.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en"},{"@type":"Organization","@id":"https:\/\/irgnet-ga3w6nfbvw.live-website.com\/#organization","name":"irg-NET","url":"https:\/\/irgnet-ga3w6nfbvw.live-website.com\/","logo":{"@type":"ImageObject","inLanguage":"en","@id":"https:\/\/irgnet-ga3w6nfbvw.live-website.com\/#\/schema\/logo\/image\/","url":"https:\/\/i2.wp.com\/irg-net.com\/wp-content\/uploads\/2021\/06\/cropped-FINAL-Removed-Alpha.png?fit=2048%2C2048&ssl=1","contentUrl":"https:\/\/i2.wp.com\/irg-net.com\/wp-content\/uploads\/2021\/06\/cropped-FINAL-Removed-Alpha.png?fit=2048%2C2048&ssl=1","width":2048,"height":2048,"caption":"irg-NET"},"image":{"@id":"https:\/\/irgnet-ga3w6nfbvw.live-website.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/irg_net","https:\/\/www.linkedin.com\/in\/h-cemre-g\u00fcnay-2b61601b4\/","https:\/\/www.youtube.com\/channel\/UC8GknhO5YMAkAoVxppu6aaQ"]},{"@type":"Person","@id":"https:\/\/irgnet-ga3w6nfbvw.live-website.com\/#\/schema\/person\/71b46e79e8c12bdc8e610214a6621a66","name":"H. Cemre G\u00fcnay","image":{"@type":"ImageObject","inLanguage":"en","@id":"https:\/\/secure.gravatar.com\/avatar\/15f5d90a0ec651cb5003605e56e8ba104f93bc11230562284db56c845df9d54d?s=96&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/15f5d90a0ec651cb5003605e56e8ba104f93bc11230562284db56c845df9d54d?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/15f5d90a0ec651cb5003605e56e8ba104f93bc11230562284db56c845df9d54d?s=96&r=g","caption":"H. Cemre G\u00fcnay"},"sameAs":["http:\/\/192.168.34.155\/wordpress"]}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/irg-net.com\/index.php\/wp-json\/wp\/v2\/posts\/5697","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/irg-net.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/irg-net.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/irg-net.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/irg-net.com\/index.php\/wp-json\/wp\/v2\/comments?post=5697"}],"version-history":[{"count":18,"href":"https:\/\/irg-net.com\/index.php\/wp-json\/wp\/v2\/posts\/5697\/revisions"}],"predecessor-version":[{"id":5859,"href":"https:\/\/irg-net.com\/index.php\/wp-json\/wp\/v2\/posts\/5697\/revisions\/5859"}],"wp:attachment":[{"href":"https:\/\/irg-net.com\/index.php\/wp-json\/wp\/v2\/media?parent=5697"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/irg-net.com\/index.php\/wp-json\/wp\/v2\/categories?post=5697"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/irg-net.com\/index.php\/wp-json\/wp\/v2\/tags?post=5697"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}