Skip to content

Commit ee619cd

Browse files
hickengwjun
authored andcommitted
fixup! Portlayer images use standard Join pattern (#7397) (#8411)
This fixes an issue on vSAN introduced by the storage function reorg. vSAN cannot use disk paths expressed relative to the VM being created.
1 parent ece1298 commit ee619cd

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

  • lib/portlayer/storage/image/vsphere

lib/portlayer/storage/image/vsphere/join.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ package vsphere
1616

1717
import (
1818
"fmt"
19-
"path"
2019

2120
"github.com/vmware/govmomi/vim25/types"
2221
"github.com/vmware/vic/lib/portlayer/exec"
@@ -30,7 +29,7 @@ func Join(op trace.Operation, handle *exec.Handle, id, imgID, repoName string, i
3029
// set the rw layer name
3130
// NOTE: this is a POOR assumption - I'm not clear on how it's functioning on vSAN at all in shipping code given the assumption that
3231
// "[ds] id/id.vmdk" is a legitimate path. Some vsphere magic path adjustment?
33-
rwlayer := fmt.Sprintf("%s/%s.vmdk", path.Dir(handle.Spec.VMPathName()), id)
32+
rwlayer := handle.Spec.Datastore.Path(fmt.Sprintf("%s/%s.vmdk", id, id))
3433

3534
disk := handle.Guest.NewDisk()
3635
moref := handle.Spec.Datastore.Reference()

0 commit comments

Comments
 (0)