I have an ISO image on my VMware ESX 3.5 host that I would like to mount in a guest OS. I cannot figure out how to do this. I can easily mount an ISO image with the VMware Infrastructure Client's "Connect CD/DVD" button (that also allows you to mount the local workstation's CD drives), but that button only allows you to reference files from the point of view of the client workstation, which means I'd be accessing that image over the network, which I don't want to do, and I want it to be independent of VIC because it constantly crashes.

Update: I see now that if I edit the guest OS's settings where the CD drive itself is defined, I can mount a datastore-located ISO from there.

Isn't there some way I can log into the host OS and mount/present the image to a guest OS without having to interact with a GUI?

Update 2: I must be an idiot today. I've tried the vmware-cmd utility and I can't get it to work.

# vmware-cmd /vmfs/volumes/<blah>/<host>/<host>.vmx disconnectdevice ide0:0
Error executing the command "disconnectdevice"

Run /usr/bin/vmware-cmd -h to see usage information.
VMControl error -5: Not connected

I get the same thing if I try to connect the device.

  • Can you explain what you mean by "independant of VIC" and "access that image over the netowrk"? Those statements make no sense. You said the ISO was on your ESX host, so I fail to see what would be accessed over the network. Enabling an ISO image with VIC does enable the image locally on the ESX server. Oct 1 '09 at 19:29
  • I copied the ISO image there, but I couldn't figure out how to get a guest OS to access it. I've updated the question with more detail that should explain better what I meant.
    – wfaulk
    Oct 1 '09 at 19:44
  • You can edit the Virtual machines config (VMX) file directly if you want from within the ESX Service Console and change the setting there. I wouldn't recommend doing that unless you know what you're doing but it is just a text file with a fairly straightforward structure. There are also a lot of remote command line tools for ESX\VI out there from VMware and from third parties if you want to go down that route.
    – Helvick
    Oct 1 '09 at 20:01

I am not sure exactly why you say mounting the iso with the VIC client would be over the network, maybe I am misunderstanding how you mean you would be mounting it. But in any case, if you go into "Edit Settings" on the machine on the CD/DVD drive tab there is an option to use "Datastore ISO file". This will let you connect to the ISO on the EX server, and is independent of the VIC client window, meaning once you save the setting you can close the client and the ISO will still be accessible. I have several servers running boot CDs setup like this.

  • I meant by using the "Connect CD/DVD 1" button on the Client. It only allows you to browse your local machine for ISO images (as well as attach your local CDROM drive(s)). I see now that if you edit the machine's settings you can mount an image on the datastore from there, which is what I was looking for. (Have to click "connected", too.) Now, is there any way to do this from the command line rather than arguing with these stupid GUIs?
    – wfaulk
    Oct 1 '09 at 19:39
  • yes I am sure there is a way to do that although I don't know the command offhand. I do see in the comments that someone suggested the RCLI but that would essentially be the same thing except from any computer you want. Just keep in mind there is a completely different set of commands for ESXi vs traditional ESX
    – Charles
    Oct 1 '09 at 20:34
  • "without VMWare client"
    – Cerin
    Sep 5 '12 at 19:51

vmware-cmd blabla.vmx setconfig ide0:0.fileName cdrom.iso is supposed to do that

  • I think maybe that's for an older version of ESX? I can't get it to tell me much beyond "VMControl error -11: No such virtual machine". vmware-vim-cmd looks promising, though.
    – wfaulk
    Oct 1 '09 at 20:22


Page 117 is your need, and for the ISO path you'd use /vmfs/volumes/XXXX/ where XXXX is the actual volume storage you're looking for; in my case I have two standalone servers that use their own internal RAID arrays, so the symlink is /vmfs/volumes/SERVERNAME:storage1/ that gives me the root (I store my iso files under a /iso/ subdir).

  • Still can't make it work. Updated question.
    – wfaulk
    Oct 1 '09 at 22:57

cd into the folder holding the VM config

[root@somerandomesxserver somerandomguest]# vmware-cmd somerandomguest.vmx setconfig ide1:0.file /somerandomiosimg.iso

[root@somerandomesxserver somerandomguest]# vmware-cmd somerandomguest.vmx connectdevice ide1:0

You can then mount /dev/hdc /mnt in the guest.


You can always mount an ISO within the guest using an ISO mounting application (for Windows Guests Daemon Tools or Microsofts Virtual CD driver would be examples.) In general you won't have access to the storage visible to the Hypervisor from within the Guest so mounting an ISO stored on a VMFS Datastore wont be possible but if you are storing your ISO's on an NFS share you could map to that from within the Guest and mount it that way with one of the above tools (or an equivalent for whatever OS you are running in the guest).

However if you don't want to run the full fat VI Client on the machine you want to make the changes from you can still use the VI Web Access console to mount\dismount ISO's for VM's. You connect to the VI Web Access console from the link on the upper right hand side of the default Web page that you will see if you point a browser at the ip-address of either the service console\management network address of the ESX\ESXi Server or the Virtual Center server. There is a brief intro to using VI Web Access in this Petri Knowledgebase article.

  • "In general you won't have access to the storage visible to the Hypervisor from within the Guest" True, but the guest doesn't have access to my local workstation's storage, either, yet I can mount an ISO image that exists on my local workstation to the guest.
    – wfaulk
    Oct 1 '09 at 19:30
  • The Hypervisor can do this but the Guest can't do that unless it's given some means of controlling the Hypervisor. What I meant was that from within a Guest you cannot directly see things like the VMFS datastores that are managed by the ESX Host even though the Guest VM's hard drives are actually files in those Datastores. The VM gets to see the virtualized abstraction not the source.
    – Helvick
    Oct 1 '09 at 19:45
  • 1
    Yeah, I understand that. I want to be able to use a command line utility (presumably on the host/hypervisor OS) to do the same thing that clicking all those GUI buttons in the guest OS setting panel does.
    – wfaulk
    Oct 1 '09 at 19:54
  • 1
    Ah now I get you - you can remote mount ISO's from the command line using the VMWare PowerShell CLI extension. That can run from within the guest or from anywhere else but it requires a Windows system since it's Powershell.
    – Helvick
    Oct 1 '09 at 20:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.