VMware Cloud Community
geob
Enthusiast
Enthusiast
Jump to solution

Setting CDs to Host Device ?

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

0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

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

View solution in original post

0 Kudos
5 Replies
LucD
Leadership
Leadership
Jump to solution

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

0 Kudos
rhaslund
Enthusiast
Enthusiast
Jump to solution

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 ''.

0 Kudos
LucD
Leadership
Leadership
Jump to solution

Is that the CD drive on the ESXi node where the VM is running?


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
rhaslund
Enthusiast
Enthusiast
Jump to solution

That's what I want to achieve at least.

0 Kudos
LucD
Leadership
Leadership
Jump to solution

What I meant, is '/dev/scd0' the name of the device?
How did you check?


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos