diff --git a/pkg/multicloud/azure/storagecache.go b/pkg/multicloud/azure/storagecache.go index 00011b4d34..15f53eb6de 100644 --- a/pkg/multicloud/azure/storagecache.go +++ b/pkg/multicloud/azure/storagecache.go @@ -125,6 +125,10 @@ func (self *SStoragecache) UploadImage(ctx context.Context, userCred mcclient.To } else { log.Debugf("UploadImage: no external ID") } + err := os.MkdirAll(options.Options.TempPath, os.ModePerm) + if err != nil { + log.Warningf("failed to create tmp path %s error: %v", options.Options.TempPath, err) + } return self.uploadImage(ctx, userCred, image, isForce, options.Options.TempPath) }