{"id":4804,"date":"2008-06-26T16:07:48","date_gmt":"2008-06-26T08:07:48","guid":{"rendered":"https:\/\/www.alfredivy.per.sg\/blogger\/?p=4804"},"modified":"2019-08-03T07:53:02","modified_gmt":"2019-08-02T23:53:02","slug":"administrating-vmware-servers-guest-os-using-scripts","status":"publish","type":"post","link":"https:\/\/www.alfredivy.sg\/blogger\/2008\/06\/administrating-vmware-servers-guest-os-using-scripts\/","title":{"rendered":"Administrating VMware Server&#8217;s Guest OS using scripts"},"content":{"rendered":"\n<p>Sometimes you need to control the guest OS or the virtuals by script.  Good example is stopping all the guests or virtuals to take a backup.  For VMware server, this is controlled by using Perl script via vmware-cmd.<\/p>\n\n\n\n<!--more-->\n\n\n\n<p>The pre-requisite is the installation of VMTools.  Yes, it will work even if vmhgfs and vmxnet are not available.<\/p>\n\n\n\n<p>To stop a guest OS<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>call vmware-cmd &#8220;d:\\virtual machines\\red hat1\\red hat1.vmx&#8221; stop<br> ntbackup backup &#8220;d:\\virtual machiens\\red hat1\\&#8221; .. .. .. ..<\/p><\/blockquote>\n\n\n\n<p>To start a guest OS<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>call vmware-cmd &#8220;d:\\virtual machines\\red hat1\\red hat1.vmx&#8221; start<\/p><\/blockquote>\n\n\n\n<p>Put the above into a batch file and use a scheduled task to control the timing and it is done!  It is possible to take a snapshot but that can be quite slow.<\/p>\n\n\n\n<p>On the backup server using Veritas or Arcserve, use the Pre\/Post option to stop and start the guest OS. A separate job is necessary as the backup job start time and the actual backup time may differ too much.<\/p>\n\n\n\n<p>There is an <a href=\"http:\/\/www.petri.co.il\/virtual_administer_vmware_workstation_from_command_line.htm\">entry <\/a>on Petri, but the program to call is wrong.  The correct article is <a href=\"http:\/\/www.petri.co.il\/virtual_script_startup_shutdown_vmware_servers.htm\">here<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Sometimes you need to control the guest OS or the virtuals by script. Good example is stopping all the guests or virtuals to take a backup. For VMware server, this is controlled by using Perl script via vmware-cmd.<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[124,499],"tags":[],"class_list":["post-4804","post","type-post","status-publish","format-standard","hentry","category-linux-and-unix","category-virtualization"],"_links":{"self":[{"href":"https:\/\/www.alfredivy.sg\/blogger\/wp-json\/wp\/v2\/posts\/4804","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.alfredivy.sg\/blogger\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.alfredivy.sg\/blogger\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.alfredivy.sg\/blogger\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.alfredivy.sg\/blogger\/wp-json\/wp\/v2\/comments?post=4804"}],"version-history":[{"count":1,"href":"https:\/\/www.alfredivy.sg\/blogger\/wp-json\/wp\/v2\/posts\/4804\/revisions"}],"predecessor-version":[{"id":4805,"href":"https:\/\/www.alfredivy.sg\/blogger\/wp-json\/wp\/v2\/posts\/4804\/revisions\/4805"}],"wp:attachment":[{"href":"https:\/\/www.alfredivy.sg\/blogger\/wp-json\/wp\/v2\/media?parent=4804"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.alfredivy.sg\/blogger\/wp-json\/wp\/v2\/categories?post=4804"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.alfredivy.sg\/blogger\/wp-json\/wp\/v2\/tags?post=4804"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}