Discussion:
[vbox-dev] VirtualBox C API: Request for simple examples
Traiano Welcome
2014-05-11 17:29:13 UTC
Permalink
Hi All

I'm starting out to use the virtualbox C API, my objective is to carry out
the following sequence of simple operations to automate the deployment of
VMs on VirtualBox:

1. Create and Launch a VM
2. Create a virtual disk and attach it to the VM
3. Detach a virtual disk from the VMr
4. Shut the VM down

I'm working through the single example C program supplied with the
VirtualBox SDK, however, I find it's quite a complex piece of work, and
I'd appreciate it if there were smaller more digestable examples for doing
limited sing-purpose operations like those listed above?

Any pointers to working examples of C code would be much appreciated!

Thanks in advance!
Traiano
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.virtualbox.org/pipermail/vbox-dev/attachments/20140511/b468b8fe/attachment.html
Alexey Eromenko
2014-05-11 18:40:22 UTC
Permalink
Try to look for "VBoxManage" front-end source code inside VirtualBox sources.
I think it uses C++ API, and only publicly documented functions.
(Probably something similar exists for C)
Post by Traiano Welcome
Hi All
I'm starting out to use the virtualbox C API, my objective is to carry out
the following sequence of simple operations to automate the deployment of
1. Create and Launch a VM
2. Create a virtual disk and attach it to the VM
3. Detach a virtual disk from the VMr
4. Shut the VM down
I'm working through the single example C program supplied with the
VirtualBox SDK, however, I find it's quite a complex piece of work, and I'd
appreciate it if there were smaller more digestable examples for doing
limited sing-purpose operations like those listed above?
Any pointers to working examples of C code would be much appreciated!
Thanks in advance!
Traiano
_______________________________________________
vbox-dev mailing list
vbox-dev at virtualbox.org
https://www.virtualbox.org/mailman/listinfo/vbox-dev
--
-Alexey Eromenko "Technologov"
Klaus Espenlaub
2014-05-12 15:50:54 UTC
Permalink
Alexey and Traiano,
Post by Alexey Eromenko
Try to look for "VBoxManage" front-end source code inside VirtualBox sources.
I think it uses C++ API, and only publicly documented functions.
(Probably something similar exists for C)
No, there is no C equivalent for VBoxManage. Would be a waste of time.
VBoxManage is quite huge, so is much further away from "smaller more
digestable examples" than the C API sample...

VBoxManage does cover all API functionality, so it definitely can serve
as clarification if the SDK documentation (either look at the included
PDF file or https://www.virtualbox.org/sdkref/ ) isn't answering your
question.

Klaus
Post by Alexey Eromenko
Post by Traiano Welcome
Hi All
I'm starting out to use the virtualbox C API, my objective is to carry out
the following sequence of simple operations to automate the deployment of
1. Create and Launch a VM
2. Create a virtual disk and attach it to the VM
3. Detach a virtual disk from the VMr
4. Shut the VM down
I'm working through the single example C program supplied with the
VirtualBox SDK, however, I find it's quite a complex piece of work, and I'd
appreciate it if there were smaller more digestable examples for doing
limited sing-purpose operations like those listed above?
Any pointers to working examples of C code would be much appreciated!
Thanks in advance!
Traiano
Klaus Espenlaub
2014-05-12 15:46:25 UTC
Permalink
This post might be inappropriate. Click to display it.
Loading...