From ddb56f6626120ef44fdb18b929abcfe3adf97834 Mon Sep 17 00:00:00 2001 From: Fabio Rauber Date: Wed, 7 Nov 2018 14:43:12 -0200 Subject: [PATCH] Do not download Boot2Docker when an existing template is specified --- xenserver/xenserver.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/xenserver/xenserver.go b/xenserver/xenserver.go index 2e314ab..47802c2 100644 --- a/xenserver/xenserver.go +++ b/xenserver/xenserver.go @@ -320,9 +320,11 @@ func (d *Driver) Create() error { d.setMachineNameIfNotSet() - b2dutils := mcnutils.NewB2dUtils(d.StorePath) - if err := b2dutils.CopyIsoToMachineDir(d.Boot2DockerURL, d.MachineName); err != nil { - return err + if d.osTemplateLabelName == "Other install media" { + b2dutils := mcnutils.NewB2dUtils(d.StorePath) + if err := b2dutils.CopyIsoToMachineDir(d.Boot2DockerURL, d.MachineName); err != nil { + return err + } } log.Infof("Logging into XenServer %s...", d.Server)