Hi,
I want to use VirtualBox to programmatically load a snapshot or OS image onto a machine. Could you please guide me how to do that if it is possible?
Please reply its very urgent, I am looking for API which will help me restore OS image
Thanks,
Namrata
How to use virtualbox programmatically to load OS image?
-
- Posts: 69
- Joined: 3. Jun 2008, 22:35
- Primary OS: Mac OS X other
- VBox Version: PUEL
- Guest OSses: MS Windows XP
Your best friend - as always - is the manual. The API is described there.
It boils down to something roughly along these lines (w/o any warranty)
(Found here aka here by googling this.)
aquarius
It boils down to something roughly along these lines (w/o any warranty)
Code: Select all
VBoxManage createvm -name “Your VM” -register
VBoxManage modifyvm “Your VM” -memory “128MB” -acpi on -boot1 dvd -nic1 intnet
VBoxManage createvdi -filename “VM.vdi” -size 4000 -register
VBoxManage modifyvm “Your VM” -hda “VM.vdi”
VBoxManage registerimage dvd /full/path/to/iso.iso
VBoxManage modifyvm “Your VM” -dvd /full/path/to/iso.iso
VBoxManage modifyvm “Your VM” -vrdpport 3390
VBoxVRDP -startvm “Your VM”
aquarius
Re: How to use virtualbox programmatically to load OS image?
I'm getting an error when I type:
Error :
Code: Select all
VBoxManage createvdi -filename “VM.vdi” -size 4000 -register
Code: Select all
Syntax error: unknown option: --register
-
- Site Moderator
- Posts: 34369
- Joined: 6. Sep 2008, 22:55
- Primary OS: Linux other
- VBox Version: OSE self-compiled
- Guest OSses: *NIX
Re: How to use virtualbox programmatically to load OS image?
Best place to see the syntax.
http://www.virtualbox.org/manual/ch07.h ... 5385220400
Notice the dbl --
http://www.virtualbox.org/manual/ch07.h ... 5385220400
Notice the dbl --