Skip to content
This repository has been archived by the owner on Mar 8, 2023. It is now read-only.

Commit

Permalink
don't read host properties if not required
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Kuzmin committed Nov 5, 2018
1 parent 26cbcae commit d641a78
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion driver/vm.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ func (d *Driver) CreateVM(config *CreateConfig) (*VirtualMachine, error) {
}

var host *object.HostSystem
if config.Host != "" {
if config.Cluster != "" && config.Host != "" {
h, err := d.FindHost(config.Host)
if err != nil {
return nil, err
Expand Down

0 comments on commit d641a78

Please sign in to comment.