don't read host properties if not required
This commit is contained in:
parent
26cbcaed46
commit
d641a78fb3
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue