[vbox-dev] Live CD/DVD Setting

Klaus Espenlaub klaus.espenlaub at oracle.com
Wed Oct 5 13:31:24 GMT 2011


On 04.10.2011 22:52, Emad Steitieh wrote:
> Thank you for your email. How can I make the DVD Device a Live CD/DVD
> like in VBox GUI?

The GUI is also an API client - so it can serve as a sample. Likewise 
for VBoxManage.

Does your code save the settings at the end? Otherwise it's expected 
behavior that the changes don't make it to the VM config.

Klaus

> Regards,
> emadns
>
> *From:* Huihong Luo <huisinro at yahoo.com>
> *To:* "vbox-dev at virtualbox.org" <vbox-dev at virtualbox.org>; Emad Steitieh
> <emadns at yahoo.com>
> *Sent:* Tuesday, October 4, 2011 7:37 PM
> *Subject:* Re: [vbox-dev] Live CD/DVD Setting
> /* Attach live or empty CD/DVD ROM Device */
> CVirtualBox vbox = vboxGlobal().virtualBox();
> QVector <CMedium> dvds = vbox.GetHost().GetDVDDrives();
> QString dvdId(
> "");
> if(dvds.count() > 0)
> {
> dvdId = dvds[0].GetId();
> vmedium = vboxGlobal().findMedium(dvdId);
> medium = vmedium.medium();
> m.AttachDevice (ctrDvdName, 1, 0, KDeviceType_DVD, medium);
> }
> else
> {
> m.AttachDevice (ctrDvdName, 1, 0, KDeviceType_DVD, CMedium());
> }
>
>
> --- On *Tue, 10/4/11, Emad Steitieh /<emadns at yahoo.com>/* wrote:
>
>
>     From: Emad Steitieh <emadns at yahoo.com>
>     Subject: [vbox-dev] Live CD/DVD Setting
>     To: "vbox-dev at virtualbox.org" <vbox-dev at virtualbox.org>
>     Date: Tuesday, October 4, 2011, 3:10 AM
>
>     Hello Experts,
>     I tried to find the API that makes a DVD live but could not. If you
>     add a DVD drive to a machine you have the option to set it to be
>     Live CD/DVD. How can I do that using the MSCOM? Thank you
>     Regards,
>     emadns
>




More information about the vbox-dev mailing list