[vbox-dev] Problem to attach DVD image by webservice

DavidW wyx1999 at hotmail.com
Tue Jan 18 23:50:51 PST 2011


I first wondered what I did wrong since I did the same as you listed, it
turned out it did work but I didn't find out due to something else.

It seems without locking, I can still do mountMedium, and that caused vbox
unstable. But with locking, it works fine.


-----Original Message-----
From: vbox-dev-bounces at virtualbox.org
[mailto:vbox-dev-bounces at virtualbox.org] On Behalf Of Ian Moore
Sent: Tuesday, January 18, 2011 9:22 AM
To: vbox-dev at virtualbox.org
Subject: Re: [vbox-dev] Problem to attach DVD image by webservice


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
> 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
> counts as a BIG sample.
> Klaus
> _______________________________________________
> vbox-dev mailing list
> vbox-dev at virtualbox.org
> http://vbox.innotek.de/mailman/listinfo/vbox-dev

vbox-dev mailing list
vbox-dev at virtualbox.org

More information about the vbox-dev mailing list