don't read host properties if not required

pull/8480/head
Michael Kuzmin 8 years ago
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…
Cancel
Save