{"id":169,"date":"2024-05-31T08:50:17","date_gmt":"2024-05-31T16:50:17","guid":{"rendered":"https:\/\/www.liljegrens.org\/?p=169"},"modified":"2024-05-31T08:50:17","modified_gmt":"2024-05-31T16:50:17","slug":"export-vm-using-ovftool","status":"publish","type":"post","link":"https:\/\/www.liljegrens.org\/?p=169","title":{"rendered":"Export VM using OVFTool"},"content":{"rendered":"\n<p>In my case I&#8217;m using an Ubuntu workstation and downloaded the appropriate ovftool and unzipped into a directory of choice. Prepare the VM on ESXi dashboard, shutdown and remove all snapshots. Back at the workstation, I choose to use terminal in most tasks and this is no exception therefore I navigated to the expanded directory on my desktop in terminal. Navigate to the directory and make the file executable. <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cd ~\/Desktop\/ovftool\/\nsudo chmod +x ~\/Desktop\/ovftool\/ovftool<\/code><\/pre>\n\n\n\n<p>Using the address or name of your ESXi host find the path to the VM targeted for backup.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ovftool vi:\/\/192.168.XXX.XXX<\/code><\/pre>\n\n\n\n<p>Output will show an error then a listing of VMs in the resource pool. Make note of the names. Quite simply the command is ovftool vi:\/\/hostname\/vm_name \/path\/to\/location\/vm_name.ova After proper credentials are provided the copy will begin.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ovftool vi:\/\/192.168.xxx.xxx\/myVM_v3 \/media\/jon\/Storage\/myVM_v2.ova<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Making an alias<\/h2>\n\n\n\n<p>Once ovftool is downloaded and expanded let&#8217;s move the directory to \/usr\/bin\/<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo mv ofvtool \/usr\/bin\/<\/code><\/pre>\n\n\n\n<p>make the files executable<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo chmod +x \/usr\/bin\/ovftool\/ovftool\nsudo chmod +x \/usr\/bin\/ovftool\/ovftool.bin<\/code><\/pre>\n\n\n\n<p>Make an alias to use at command line.  Now we can use ovftool at the command line without having to navigate to the directory.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>alias ovftool=\/usr\/bin\/ovftool\/ovftool<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>In my case I&#8217;m using an Ubuntu workstation and downloaded the appropriate ovftool and unzipped into a directory of choice.<\/p>\n<p><a href=\"https:\/\/www.liljegrens.org\/?p=169\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\">Export VM using OVFTool<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,6],"tags":[],"_links":{"self":[{"href":"https:\/\/www.liljegrens.org\/index.php?rest_route=\/wp\/v2\/posts\/169"}],"collection":[{"href":"https:\/\/www.liljegrens.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.liljegrens.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.liljegrens.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.liljegrens.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=169"}],"version-history":[{"count":1,"href":"https:\/\/www.liljegrens.org\/index.php?rest_route=\/wp\/v2\/posts\/169\/revisions"}],"predecessor-version":[{"id":185,"href":"https:\/\/www.liljegrens.org\/index.php?rest_route=\/wp\/v2\/posts\/169\/revisions\/185"}],"wp:attachment":[{"href":"https:\/\/www.liljegrens.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=169"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.liljegrens.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=169"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.liljegrens.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=169"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}