Skip to content

Commit 184bb8c

Browse files
get bootable index for windows LDM (#855)
1 parent 0bd8afc commit 184bb8c

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

v2v-helper/migrate/migrate.go

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -545,10 +545,18 @@ func (migobj *Migrate) ConvertVolumes(ctx context.Context, vminfo vm.VMInfo) err
545545
if !supported {
546546
return errors.Errorf("unsupported OS detected by guestfish: %s", osDetected)
547547
}
548-
utils.PrintLog("OS compatibility check passed")
548+
utils.PrintLog("operating system compatibility check passed")
549549

550550
} else if strings.ToLower(vminfo.OSType) == constants.OSFamilyWindows {
551-
utils.PrintLog("OS compatibility check passed")
551+
utils.PrintLog("operating system compatibility check passed")
552+
if !useSingleDisk {
553+
utils.PrintLog("checking for bootable volume in case of LDM")
554+
// check for bootable volume in case of LVM
555+
bootVolumeIndex, err = virtv2v.GetBootableVolumeIndex(vminfo.VMDisks)
556+
if err != nil {
557+
return errors.Wrap(err, "Failed to get bootable volume index")
558+
}
559+
}
552560
} else {
553561
return errors.Errorf("unsupported OS type: %s", vminfo.OSType)
554562
}

0 commit comments

Comments
 (0)