Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions pkg/driverutil/disk.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ func EnsureDisk(ctx context.Context, instDir, diskSize string, diskImageFormat i
if err != nil {
return err
}
destDisk := baseDisk
srcDisk := baseDisk
if isBaseDiskISO {
destDisk = diffDisk
srcDisk = diffDisk

// Create an empty data volume for the diff disk
diffDiskF, err := os.Create(diffDisk)
Expand All @@ -54,8 +54,8 @@ func EnsureDisk(ctx context.Context, instDir, diskSize string, diskImageFormat i
}
// Check whether to use ASIF format

if err = diskUtil.Convert(ctx, diskImageFormat, destDisk, diffDisk, &diskSizeInBytes, false); err != nil {
return fmt.Errorf("failed to convert %q to a disk %q: %w", baseDisk, diffDisk, err)
if err = diskUtil.Convert(ctx, diskImageFormat, srcDisk, diffDisk, &diskSizeInBytes, false); err != nil {
return fmt.Errorf("failed to convert %q to a disk %q: %w", srcDisk, diffDisk, err)
}
return err
}
Loading