WilliamLam.com

  • About
    • About
    • Privacy
  • VMware Cloud Foundation
  • VKS
  • Homelab
    • Resources
    • Nested Virtualization
  • VMware Nostalgia
  • Apple
You are here: Home / Uncategorized / How to mount a cdrom using vsish on ESXi

How to mount a cdrom using vsish on ESXi

04.12.2011 by William Lam // 17 Comments

While browsing the VMTN community forums today, I noticed a very interesting post about mounting the CD-ROM device from within ESXi. The solution involved the use of vsish as the traditional mount utility did not function as expected in the Busybox Console of ESXi. I thought this was a very clever solution and might be worth sharing for those that may have similar needs.

Note: This trick looks like it only works with ESXi 4.1, as previous releases of ESXi may not include the iso9660 VMkernel module.

First you will need to load a VMkernel module: iso9660 which will allow you to mount and access the CD-ROM device.

You will need to run the following command:

vmkload_mod iso9660

You should see a successful message after the module has loaded:

Note: To see a list of VMkernel modules that can be loaded/unloaded, take a look at /usr/lib/vmware/vmkmod

Next you will need to identify the path to your CD-ROM device, you can do so by using the esxcfg-mpath utility.

You can run the following shorthand command to locate the path:

esxcfg-mpath -b | grep "CD-ROM"

You should see something in the form of mpx.*:

Now we will use vsish to perform the mount operation. Before we get started, if you did not perform the VMkernel module load of iso9660, you would not see the following path in /vmkModules/iso9660. Once the module has been loaded, you can perform a "ls" (listing) of the operations supported by this module which is mount and umount. You will need to run a "set" operation on the "mount" command and specify the device in which you would like to mount.

You will need to run the following command:

vsish -e set /vmkModules/iso9660/mount $(esxcfg-mpath -b | grep "CD-ROM" | awk '{print $1}')

If you do not see any messages after executing the command, it was successful, else you may see an error/warning for incorrect syntax.

The CD-ROM device will automatically be mounted under /vmfs/volumes/mpx.* and there will also be a symlink with the CD-ROM label. In this example, I mounted an ESXi 4.1 Update 1 ISO file.

We can change into the directory to confirm we actually have the CD-ROM device mounted and list the contents.

Once you are done with your task, to umount is the same syntax except you will be using the "umount" operation. You can unmount by using the following command:

vsish -e set /vmkModules/iso9660/umount $(esxcfg-mpath -b | grep "CD-ROM" | awk '{print $1}')

Another alternative is to mount the image on another system and copy the contents to your ESXi host, but if you only had your ESXi host and needed to pull something from a CD-ROM, this is how you would do it.

Thanks again to agodwin for sharing this tidbit.

More from my site

  • How to query for MACs on internal vSwitch on ESXi
  • Quick Tip - Using ESXi to send Wake-on-Lan (WoL) packet
  • How to prevent physical CD-ROM from ejecting after installing or upgrading ESXi?
  • Verify Hypervisor-Assisted Guest Mitigation (Spectre) patches using PowerCLI
  • Quick Tip - How to mount CIFS & NFS volumes on Photon OS?

Categories // Uncategorized Tags // cdrom, ESXi 4.1, mount, vsish

Comments

  1. *protectedQPippen says

    07/21/2011 at 8:26 pm

    What if I load the module but don't see the /vmkModules stuff... I'm running esxi 4.1

    any idea ?

    Reply
  2. *protectedWilliam says

    07/23/2011 at 1:48 am

    @qpippen

    The example I used was with latest ESXi 4.1u1, if you're using 4.1, perhaps the functionality is not there.

    Reply
  3. *protectedSteve says

    09/15/2011 at 2:38 pm

    pity that it doesnt work on vSphrere (ESXi) 5.0

    ~ # vsish -e set /vmkModules/iso9660/mount $(esxcfg-mpath -b | grep "CD-ROM" | awk '{print $1}')
    VSISHCmdSet():Set failed: Not supported

    Reply
  4. *protectedAnarkista says

    09/23/2011 at 8:17 pm

    I did it once, i use the instructions and mount & umonut the CD successfully, but when i try to make it again a have VSISHCmdSet():Set failed: Not supported

    any Idea?

    Reply
  5. *protectedjhamoline says

    12/30/2011 at 3:41 pm

    This comment has been removed by the author.

    Reply
  6. *protectedjhamoline says

    12/30/2011 at 3:43 pm

    On vSphere (ESXi) 5.0.0 Build 469512 do the following:

    1. load the iso9660 module (vmkload_mod iso9660)
    2. run esxcfg-mpath -b |grep "CD-ROM" (note the mpx.* string of the drive you want to mount)
    3. run /sbin/vsish (it will bring you to the VMkernel Sys Info Shell kernel prompt)
    4. Type the following, replacing the mpx.* string with the one from step 2 (I had to run the following command twice, the first time failed. I assume its because of the way the Dell iDRAC mounted my local CD-ROM drive): set /vmkModules/iso9660/mount mpx.vmhba38:C0:TO:L0
    5. Type exit (to exit the VMkernel Sys Info Shell kernel prompt)
    6. The CD-ROM or DVD-ROM will be mounted in /vmfs/volumes.

    Reply
    • *protectedNone says

      06/08/2015 at 2:38 pm

      This also worked on an ESXi 6.0 build, just for those that are curious.

      Reply
    • *protectedChristian says

      10/30/2015 at 7:37 am

      I try this on esx6.0 - mounted successfully an iso Image over hp ilo, but @all files the ls command reply "no such file or directory"
      I created the iso image with the tool UltraISO, why ? what have I done wrong?

      Reply
      • *protectedGrant says

        01/16/2016 at 2:29 am

        This may be an old reply but I had the same issue with "no file or directory". I don't think the Windows tools create the rock ridge extensions that is used by linux/unix. Copy your files to a linux vm and install genisoimage using apt-get or yum. Then run 'genisoimage -r -J -o cd_image.iso /directory'. Now I can see files when mounting over remote console.

        Reply
        • *protectedMatty T. says

          02/03/2016 at 4:04 pm

          THIS. I tried PowerISO and ISO Creator on Windows and couldn't get a valid ISO. Eventually found this article which lead me to spin up an Ubuntu VM, SCP the files over, create the ISO using the genisoimage command above, attached the new ISO via iLO4 Integrated Remote Console, mounted within ESXi 6 U1 using the commands in the main article and, VOILA!. The only extra thing I had to do was a few mv commands, (eg: mv CPXXXXXX.VME to CPXXXXXX.vmexe) to get the file extensions correct and in the correct case that the HP utility was looking for. Once done, I was able to apply the necessary firmware update and install the correct drivers so I could access the host via something other than iLO. UGH.

          Reply
  7. *protectedTim Neto says

    04/24/2012 at 4:58 am

    Hello.

    Thanks for this article.

    It saved me hours of effort.

    Tim

    Reply
  8. *protectedAnonymous says

    05/15/2012 at 9:56 am

    I am trying to import files from a mounted CD-Rom during a kickstart install: I cant seem to get it to work?

    # +---------------------------------------------------------------------------+
    # | Import the SED form the DVD-ROM, unzip the .tar file and register the VM
    # +---------------------------------------------------------------------------+
    vmkload_mod iso9660
    vsish -e set /vmkModules/iso9660/mount $(esxcfg-mpath -b | grep "CD-ROM" | awk '{print $1}')
    source_dir=/vmfs/volumes/VMWARE_ESXI5_CUSTOM/VM
    post_dir=/vmfs/volumes/$(hostname -s)-datastore1/Staging_Folder
    mkdir -p ${post_dir}
    cp -r ${source_dir}/* ${post_dir}
    sleep 5
    tar -xvf /vmfs/volumes/$(hostname -s)-datastore1/2012.tar -C /vmfs/volumes/$(hostname -s)-datastore1
    sleep 5

    # +---------------------------------------------------------------------------+
    # | Register the SED with ESXi
    # +---------------------------------------------------------------------------+
    vim-cmd solo/registervm /vmfs/volumes/$(hostname -s)-datastore1//

    Any Idea's

    *protected email*

    Reply
  9. *protectedAnonymous says

    02/06/2013 at 11:32 am

    ESXi5.1
    any Idea?

    Reply
  10. *protectedJohn says

    03/04/2013 at 6:39 pm

    NICE!!! Thanks for posting this.

    Reply
  11. *protected1111S says

    07/13/2015 at 5:24 pm

    Load of crap from vmware. Why not just enable the good old mount command instead of all this do hickery.

    Reply
  12. *protectedm&m says

    07/30/2015 at 9:21 am

    I know somebody mentioned this works in ESXi 6.0 but I haven't manage it to work. I loaded the module successfully but when executing the vsish command I get this error:

    VSISHCmdSet():Set failed: Not supported

    Any hint?

    Reply
  13. *protectedGordon Grant says

    10/14/2016 at 4:26 am

    Thank you Sir William! Used this today to manually install a HP NIC driver. Total life saver *salute*

    Reply

Thanks for the comment!Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Search

Thank Author

Author

William is Distinguished Platform Engineering Architect in the VMware Cloud Foundation (VCF) Division at Broadcom. His primary focus is helping customers and partners build, run and operate a modern Private Cloud using the VMware Cloud Foundation (VCF) platform.

Connect

  • Bluesky
  • Email
  • GitHub
  • LinkedIn
  • Mastodon
  • Reddit
  • RSS
  • Twitter
  • Vimeo

Recent

  • VMUG Connect 2025 - Minimal VMware Cloud Foundation (VCF) 5.x in a Box  05/15/2025
  • Programmatically accessing the Broadcom Compatibility Guide (BCG) 05/06/2025
  • Quick Tip - Validating Broadcom Download Token  05/01/2025
  • Supported chipsets for the USB Network Native Driver for ESXi Fling 04/23/2025
  • vCenter Identity Federation with Authelia 04/16/2025

Advertisment

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy

Copyright WilliamLam.com © 2025