Skip to content

Conversation

@OmkarDeshpande7
Copy link
Collaborator

@OmkarDeshpande7 OmkarDeshpande7 commented Jan 29, 2026

What this PR does / why we need it

This PR pre-bakes specific virtio version (0.1.189) to VJB VM. Now during migration v2v-helper determines the OS release and version and switches to this virtio-win version in case of windows server 2012

Which issue(s) this PR fixes

(optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged)

fixes #1409

Special notes for your reviewer

Testing done

TBD

Copy link
Contributor

@windsurf-bot windsurf-bot bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 To request another review, post a new comment with "/windsurf-review".

finalBootIndex, err = virtv2v.GetBootableVolumeIndex(vminfo.VMDisks)
if err != nil {
return -1, errors.Wrap(err, "Failed to get bootable volume index")
return -1, "", errors.Wrap(err, "Failed to get bootable volume index")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The error return statement doesn't match the updated function signature. You need to return an empty string for the osRelease parameter when returning an error.

Suggested change
return -1, "", errors.Wrap(err, "Failed to get bootable volume index")
return -1, "", errors.Wrap(err, "Failed to get bootable volume index")

if useSingleDisk {
productName, err = RunCommandInGuest(diskPath, fmt.Sprintf("inspect-get-product-name %s", osPath), false)
} else {
productName, err = RunCommandInGuestAllVolumes(disks, "inspect-get-product-name", false, osPath)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's an issue with how inspect-get-product-name is called. The osPath parameter should be part of the command string rather than passed as a separate argument.

Suggested change
productName, err = RunCommandInGuestAllVolumes(disks, "inspect-get-product-name", false, osPath)
productName, err = RunCommandInGuestAllVolumes(disks, fmt.Sprintf("inspect-get-product-name %s", osPath), false)

Copy link
Collaborator

@spai-p9 spai-p9 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@OmkarDeshpande7 OmkarDeshpande7 force-pushed the private/main/omkard/bake-virtio-0.1.189 branch 2 times, most recently from 6f537b3 to 82466ac Compare February 2, 2026 10:19
@OmkarDeshpande7 OmkarDeshpande7 force-pushed the private/main/omkard/bake-virtio-0.1.189 branch from a33af47 to 4d7f0f0 Compare February 9, 2026 18:27
@OmkarDeshpande7 OmkarDeshpande7 force-pushed the private/main/omkard/bake-virtio-0.1.189 branch from 4d7f0f0 to 62b71b0 Compare February 10, 2026 07:57
@OmkarDeshpande7 OmkarDeshpande7 changed the title bake virtio 0.1.189 for windows server 2012 bake virtio 0.1.185 for windows server 2012 Feb 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Network adapter and IP address are not present in the machine configuration after migrating Windows Server 2012

2 participants