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
|
var host *object.HostSystem
|
||||||
if config.Host != "" {
|
if config.Cluster != "" && config.Host != "" {
|
||||||
h, err := d.FindHost(config.Host)
|
h, err := d.FindHost(config.Host)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
|
Loading…
Reference in New Issue