Skip to content

Get-VmdkFromWindowsDisk fails if the VM has a vvol and an RDM attahed. #66

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
nocentino opened this issue Aug 19, 2022 · 0 comments
Open

Comments

@nocentino
Copy link

To reproduce, attach both a vvol and an RDM to a VM and use Get-VmdkFromWindowsDisk.

The issue is on line 907, there is a null exception if there's an RDM in the set of disks attached to a VM.

The workaround I used was to filter out RDMs:
$vmDisk = $vm | Get-HardDisk | Where-Object { $_.DiskType -ne 'RawPhysical' } |Where-Object {$_.ExtensionData.backing.uuid.replace("-","") -eq $VMdiskSerialNumber.SerialNumber}

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

No branches or pull requests

1 participant