Conditional reload.

This commit is contained in:
Alexander Laamanen 2017-02-23 22:08:11 +02:00 committed by Megan Marsh
parent 17845beadc
commit c940f7e754
1 changed files with 5 additions and 1 deletions

View File

@ -119,7 +119,11 @@ func (d *ESX5Driver) IsRunning(string) (bool, error) {
} }
func (d *ESX5Driver) ReloadVM() error { func (d *ESX5Driver) ReloadVM() error {
if d.vmId != "" {
return d.sh("vim-cmd", "vmsvc/reload", d.vmId) return d.sh("vim-cmd", "vmsvc/reload", d.vmId)
} else {
return nil
}
} }
func (d *ESX5Driver) Start(vmxPathLocal string, headless bool) error { func (d *ESX5Driver) Start(vmxPathLocal string, headless bool) error {