{"id":1270,"date":"2012-07-18T16:26:16","date_gmt":"2012-07-18T15:26:16","guid":{"rendered":"http:\/\/kudzia.eu\/b\/?p=1270"},"modified":"2012-07-18T16:27:40","modified_gmt":"2012-07-18T15:27:40","slug":"poor-mans-vm-clonning-under-vsphere-5-without-downtime","status":"publish","type":"post","link":"https:\/\/kudzia.eu\/b\/2012\/07\/poor-mans-vm-clonning-under-vsphere-5-without-downtime\/","title":{"rendered":"poor man&#8217;s vm clonning under vsphere 5 without downtime"},"content":{"rendered":"<p>how to clone a virtual machine under vmware vsphere 5:<\/p>\n<ul>\n<li>using the vsphere client create a new vm with similar parameters [at least the same number and size of hard drives]<\/li>\n<li>using the vsphere client create a snapshot of the original vm<\/li>\n<li>\nlog in via ssh as root [ to enable the ssh access check <a href=\"http:\/\/kb.vmware.com\/selfservice\/microsites\/search.do?language=en_US&#038;cmd=displayKC&#038;externalId=8375637\">this<\/a> kb article ]<\/li>\n<li>go to the folder where new vm is stored and remove all vmdk files\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\ncd \/vmfs\/volumes\/datastore1\/newVM\r\n#write down what are the names printed by command below\r\nls -la *.vmdk\r\n\r\nrm -rf *.vmdk\r\n<\/pre>\n<li>go to the folder with the original vm and for\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\ncd \/vmfs\/volumes\/datastore1\/originalVM\r\nls -la *.vmdk|grep -v flat\r\n<\/pre>\n<\/li>\n<li>each vmdk file [one that DOES NOT have -flat part in the name] execute\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n# for newvmname use the same names as displayed two steps ago\r\nvmkfstools -i oldvmname.vmdk \/vmfs\/volumes\/datastore1\/newvm\/newvmname.vmdk\r\n<\/pre>\n<\/li>\n<li>using the vsphere client remove a snapshot of the original vm<\/li>\n<\/ul>\n<p>you&#8217;re done &#8211; you should be able to run the clone. it&#8217;ll have different mac address and you&#8217;ll have to configure again networking etc. snapshot created in this way will be crash-consistent. for some purposes it might be perfectly fine, for another &#8211; completely unacceptable.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>how to clone a virtual machine under vmware vsphere 5: using the vsphere client create a new vm with similar parameters [at least the same number and size of hard drives] using the vsphere client create a snapshot of the original vm log in via ssh as root [ to enable the ssh access check [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17,51],"tags":[57],"class_list":["post-1270","post","type-post","status-publish","format-standard","hentry","category-tech","category-unimportant","tag-vsphere"],"_links":{"self":[{"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/posts\/1270","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/comments?post=1270"}],"version-history":[{"count":5,"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/posts\/1270\/revisions"}],"predecessor-version":[{"id":1275,"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/posts\/1270\/revisions\/1275"}],"wp:attachment":[{"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/media?parent=1270"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/categories?post=1270"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/tags?post=1270"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}