Mount an ISO

Jul 14, 2009 at 5:30 PM
Edited Jul 14, 2009 at 5:41 PM

Is it possible to mount an ISO on a virtual CDRom with VMWare Tasks?

Billy3

EDIT:

 

        /// <summary>
        /// Mounts an ISO image in the Virtual Machine's CDRom Drive.
        /// </summary>
        /// <param name="VM">The VM on which to mount the ISO.</param>
        /// <param name="target">The full path to the ISO to mount.</param>
        protected void mountISO(Vestris.VMWareLib.VMWareVirtualMachine VM, string target)
        {
            VM.RuntimeConfigVariables["ide1:0.deviceType"] = "cdrom-image";
            VM.RuntimeConfigVariables["ide1:0.fileName"] = target;
            VM.RuntimeConfigVariables["ide1:0.present"] = "TRUE";
            VM.RuntimeConfigVariables["ide1:0.startConnected"] = "TRUE";
        }

Does nothing to the VM.

 

EDIT2: This is targeting VMWare Workstation 6.5.2.

 

Coordinator
Jul 14, 2009 at 6:53 PM

I don't know whether it's possible with the VixCOM API at all, you should ask the developer forum. If the answer is yes, then VMWareTasks should be able to do it.

Where did you get this list of runtime configuration variables (ie. ide1:0:deviceType, etc.)?

Jul 14, 2009 at 7:10 PM

[quote]

Where did you get this list of runtime configuration variables (ie. ide1:0:deviceType, etc.)?

[/quote]

I opened the .VMX file in notepad.

Billy3

Coordinator
Jul 15, 2009 at 2:55 AM

I c. I think this is not within the scope of VixCOM (there's an SDK that lets you talk to the host itself and manage virtual machines from the host perspective). Do post a link/info here if you find something.

Jul 15, 2009 at 3:02 AM

It's sort of a hack... I just installed Virtual Clone Drive in the VM :)

Thanks again for the library :)

Billy3