[vbox-dev] Problem to attach DVD image by webservice
imooreyahoo at gmail.com
Tue Jan 18 09:22:18 PST 2011
In pseudo-code the entire process should go something like:
machine = IVirtualBox_findMachine(...)
medium = IVirtualBox_openMedium(...)
session = IWebsessionManager_getSessionObject()
session->machine->mountMedium(..., ..., ..., medium)
/* If you wish to save this across reboots */
I can attest that this works fine via vboxwebsrv.
On Tue, Jan 18, 2011 at 10:49 AM, Klaus Espenlaub
<klaus.espenlaub at oracle.com> wrote:
> On 18.01.2011 00:22, DavidW wrote:
>> I am runing 4.0.0 r69151. I have problem to attach dvd image to a
>> running vm by webservice.
>> I did by the following steps
>> 1, IVirtualBox_findMachine
>> 2, IVirtualBox_openMedium
>> 3, IVirtualBox_findMedium (tried with or without this step, same result)
>> 4, IMachine_mountMedium
>> It seems the medium is mounted, I can see the image under “IDE Primary
>> Master (CD/DVD):” on vbox gui, but
>> The driver in the vm shows empty.
>> Another issue is it seems the image is deleted when I delete the vm.
> The 4 steps can't be all what you're doing - you need to lock the machine to
> get an IMachine instance which can be modified.
> How do you trigger VM deletion? The GUI definitely deletes only hard disk
> images (if you select the appropriate button in the dialog), and the same
> applies to VBoxManage. Sure that you didn't just register something
> accidentally as a hard disk instead of a DVD image?
> The SDK has sample code, and as VirtualBox as a whole is open source it also
> counts as a BIG sample.
> vbox-dev mailing list
> vbox-dev at virtualbox.org
More information about the vbox-dev