VMware vSphere

 View Only
Expand all | Collapse all

remove ISO file from vCenter virtual machine

  • 1.  remove ISO file from vCenter virtual machine

    Posted Jun 25, 2024 10:09 AM

    HI

    I just finished update vcenter patching actually from FP file and now I want to remove it. But any time I try to change it to client device and disconnect it vcenter becomes unavailable for about 10 minutes. This only happens with vCenter appliance other machines are OK I can remove ISO but vcenter I had to shut down remove ISO and then power on vcenter appliance

    Any easier way to do it



  • 2.  RE: remove ISO file from vCenter virtual machine

    Posted Jun 25, 2024 12:46 PM

    Removing mounted CD-ROM drives (images) from a Linux/Photon VM is a bit tricky.

    vCenter will usually tell you that the image is mounted, and ask whether you are sure that you want to unmount it. The VM will then be halted (not sure why that is done at this point already) until the question gets answered. In case of the vCenter Server itself, the question will of course not show up in vCenter, because it is halted, but it will show up on the ESXi host on which vCenter Server currently runs.

    So if you want to remove a virtual CD-ROM / ISO from the vCenter Server VM, do this while logged in to the ESXi host.

    André




  • 3.  RE: remove ISO file from vCenter virtual machine

    Posted Jun 25, 2024 12:55 PM

    OK so I would have to be logged into Host UI and then remove it rrom there




  • 4.  RE: remove ISO file from vCenter virtual machine

    Posted Jun 26, 2024 01:08 AM

    It's always a good idea to note down the hostname and credentials while working with vCenter. along with Datastore name for .vmx location and a snapshot.
    So that we have full control over vcsa appliance, sometimes it gives surprises :)




  • 5.  RE: remove ISO file from vCenter virtual machine

    Posted Jun 26, 2024 01:14 AM

    try umount from VCSA, if files are in use (just in case).




  • 6.  RE: remove ISO file from vCenter virtual machine

    Posted Jun 26, 2024 07:02 AM

    I have seen same behavior when attempting to disconnect the iso from within VCenter. If you log into the ESXi webpage of the host managing VCenter appliance you can make the change. A notification will appear that the virtual machine has locked the cd drive because it is in use. It will ask if you want to force the disconnect. Choose yes and the cd drive mapping goes away, and VCenter will not become unresponsive.




  • 7.  RE: remove ISO file from vCenter virtual machine

    Posted Jun 27, 2024 08:13 AM

    Add these two advanced settings to your VCSA VM.  Even better, add it to all of your VMs.  You will never have this problem again.

      cdrom.showIsoLockWarning = False
      msg.autoanswer = True




  • 8.  RE: remove ISO file from vCenter virtual machine

    Posted Jun 28, 2024 01:18 AM

    If you have vCenter nested (managing itself), and you don't have access directly to ESXi host from where you may answer the question, you may ssh to the VCSA appliance (or open console, does not matter), enter bash shell from vcsa cli, and from shell run the:

    eject /dev/cdrom

    This would unmount and free the CD. Then you could edit the CD-ROM in vSphere on VM, and lock won't be there any more.




  • 9.  RE: remove ISO file from vCenter virtual machine

    Posted Jul 03, 2024 01:51 PM

    Today I trapped into the issue and you believe, I tried everything suggested in any article..

    while selecting another ISO , it showing below error.
    Error :  The disk capacity specified is greater than the amount available in the datastore. Disk space overcommitment can consume all space in the virtual disk and block the virtual machine. Increase the datastore capacity before proceeding or enter a smaller disk size.
    However it was not related to datastore or free space etc etc.

    I was not able to delete the old ISO (file is in use). which indicating that it is mounted somehow.

    1> eject cdrom

    2> changed mode to Host device instead of ISO

    2> I restarted all services on VCSA (service-control --stop/start --all)

    3> Reboot the VCSA

    but same issue/error persist.

    While trying all these thing it fixed by changing .iso file in Summary page of VCSA VM.

    you can also try it.. let us know the result.. if it helped



    ------------------------------
    Don't hesitate to Recommend, if you find it helpful.
    This helps to encourage community to help each other :)
    ------------------------------



  • 10.  RE: remove ISO file from vCenter virtual machine

    Posted Jul 04, 2024 02:12 AM
    eject -r from the ssh console of vCenter. Wait 5-10 seconds and thats it.









  • 11.  RE: remove ISO file from vCenter virtual machine

    Posted May 21, 2025 10:10 AM

    This does the trick, quick and easy. Thank you.