How to mount and unmount CDROMs in ESXi

Not documented, but here’s how you do it:

# vmkload_mod iso9660
Module iso9660 loaded successfully

# /sbin/vsish -e set /vmkModules/iso9660/mount mpx.vmhba32:C0:T0:L0

# ls -al /vmfs/volumes/CDROM
lrwxr-xr-x    1 root     root                 20 Sep 29 22:39 /vmfs/volumes/CDROM -> mpx.vmhba32:C0:T0:L0
# ls /vmfs/volumes/CDROM
A.Z           DRYRUN.CFG    INSTALL.VGZ   OPEN_SOU.TXT  VMKERNEL.GZ
BOOT.CAT      IENVIRON.VGZ  ISOLINUX.BIN  README.TXT
CIM.VGZ       IMAGEDD       ISOLINUX.CFG  SYS.VGZ
CIMSTG.TGZ    IMAGEDD.BZ2   MBOOT.C32     TBOOT.GZ
CUSTOM.CFG    IMAGEDD.MD5   MENU.C32      VMKBOOT.GZ 

And to unmount it:

# /sbin/vsish -e set /vmkModules/iso9660/umount mpx.vmhba32:C0:T0:L0
# ls /vmfs/volumes
3c3693e8-f77a642a-1910-5c6bdcb26d3a  Hypervisor2
4ca3b6e9-fd9ada85-a674-000c29e3db40  Hypervisor3
70589275-fb41eccd-6632-ac007674ad55  d0900a77-edfa5e08-0fee-561dd908cfcd
Hypervisor1                          datastore1
# vmkload_mod -u iso9660
Module iso9660 successfully unloaded
#
Advertisements

8 Responses to How to mount and unmount CDROMs in ESXi

  1. Ron says:

    So what does it mean when I try to load the iso9660 module and it says…

    vmkload_mod iso9660
    vmkload_mod: Can not load module iso9660: not found

    I’m running ESXi 4.0.0 build-261974

    • Chris Wells says:

      I think it only works on ESXi 4.1:

      ~ # vmkload_mod -l | grep 9660
      ~ # vmkload_mod iso9660
      Module iso9660 loaded successfully
      ~ # vmkload_mod -l | grep 9660
      iso9660 0 16
      ~ # uname -a
      VMkernel box1 4.1.0 #1 SMP Release build-320092 Nov 2 2010 10:34:17 x86_64 unknown
      ~ # find / -name iso9660\* -print
      /usr/lib/vmware/vmkmod/iso9660
      ~ # vmkload_mod -u iso9660
      Module iso9660 successfully unloaded

      ~ # uname -a
      VMkernel box2 4.0.0 #1 SMP Release build-208167 Nov 8 2009 01:02:11 x86_64 unknown
      ~ # ls -la /usr/lib/vmware/vmkmod/iso9660
      ls: /usr/lib/vmware/vmkmod/iso9660: No such file or directory

  2. bob says:

    top post – been trying to do this for ages and it worked a treat for me… managed to mount an ISO presented by the Dell DRAC virtual CDROM and copy files to a standalone host on an otherwise isolated network vis the DRAC šŸ™‚

    Thanks again!

  3. hoge says:

    I used ESXi4.1 Build 348481 and 381591, but an error is appeared.

    # vsish -r set /vmkModules/iso9660/mount mpx.vmhba33:C0:T0:L0
    VSISHCmdSet():Set failed: Not supported

    • Mark says:

      If you don’t know mpx.xxxxxxxxx
      use it:
      # vsish -e set /vmkModules/iso9660/mount $(esxcfg-mpath -b | grep CD-ROM | awk ‘{print $1}’)

      • Mark says:

        I use iLO mount ISO. also failed.
        ============================

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

  4. Andy Mac says:

    thanks a lot for this. Check exact handle for CD drive with
    ls /dev/cdrom
    our was mpx.vmhba0:C0:T0:L0 …

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: