I need to set all the VMs CDs to Host Device, and not Connected. I have been trying to do this using Set-CDDrive, but not doing something write.
This sets it not connected I think, but I can't figure out how to change from Client Device to Host Device.
Get-VM | Get-CDDrive | Set-CDDrive -NoMedia
Anyone know how to do this?
Thanks,
geob
Try this
Get-VM | Get-CDDrive | Set-CDDrive -HostDevice "/dev/scd0" -Connected:$false -Confirm:$false
____________
Blog: LucD notes
Twitter: lucd22
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Try this
Get-VM | Get-CDDrive | Set-CDDrive -HostDevice "/dev/scd0" -Connected:$false -Confirm:$false
____________
Blog: LucD notes
Twitter: lucd22
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
I'm trying to connect the host cd/dvd drive using:
Get-VM "server" | Get-CDDrive | Set-CDDrive -HostDevice "/dev/scd0" -Connected:$true -Confirm:$false
However I am receiving an error:
Set-CDDrive: 19/06/2023 15:08:28 Set-CDDrive Invalid host device specified for vm 'server: '/dev/scd0''. Valid values are ''.
Is that the CD drive on the ESXi node where the VM is running?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
That's what I want to achieve at least.
What I meant, is '/dev/scd0' the name of the device?
How did you check?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference