Page 1 of 1
Make a configuration file after creating a VM
Posted: 24. Jun 2013, 06:08
by macro
Is it possible to create a VM using a GUI initially, setting it all up and then tweaking it to perfection from the command line, and then, printing out a report, or a making a file, which contains "all" the corresponding settings thus made, in a format such that I could turn around and create the same machine again but this time by using only the command line to do so, with, for example, a template of "vboxmanage" commands? Does Virtualbox have a method for this sort of approach?
Re: Make a configuration file after creating a VM
Posted: 24. Jun 2013, 10:58
by noteirak
Nothing of the like exists, no. The .vbox file would have all the required info inside tho, but you need to manually go through it.
Re: Make a configuration file after creating a VM
Posted: 24. Jun 2013, 11:07
by Martin
With some amount of scripting you could use the output of "VBoxManage showvminfo" to create a new machine with the VBoxManage commands creatvm, modifyvm, storagectl, createhad and storageattach.
Re: Make a configuration file after creating a VM
Posted: 24. Jun 2013, 12:56
by mpack
Um.... Isn't this just cloning? In which case "VBoxManage clonevm" would be the command to use.
Re: Make a configuration file after creating a VM
Posted: 24. Jun 2013, 13:09
by noteirak
Good point Don... I am under the impression the OP only wants some kind of text template (most likely for archiving/documentation?) so the VM can be rebuilt from scratch.
@macro : could you tell us the prupose of your request?
Re: Make a configuration file after creating a VM
Posted: 24. Jun 2013, 16:40
by macro
Indeed, I am finding it difficult and inefficient to create desired VM from scratch using only the command line on a headless server. Although I can create one that works basically, the tweaking of it, especially in relation to some of the storage components, is exceedingly frustrating for me. So, my thought was to build one with the desired attributes in a more amenable environment, say, one with a GUI on a workstation, and then I could relocate or rebuild said VM to the headless environment. Yet, at least one question I have about this approach is whether the mere presence of a GUI environment, as I would have at the workstation while building it but not later at the server, might not allow certain attributes to be built and made functional, which would not function correctly when attempting to transfer them afterwards.
Perhaps the cloning approach is what I should try at this point.