Page 1 of 1

Clone only configuration settings?

Posted: 16. Oct 2013, 13:03
by Liman
I'm fiddling with automated installation processes, and I've modified the hardware settings for my guest machines somewhat.

What I often find myself wanting to is to clone (or copy) the hardware settings for a machine, but NOT its hard drive. I want 'a new machine with identical hardware, but with a blank disk'. I want to avoid copying all the drive content from the old machine, because I'm going to overwrite immediately it anyhow, and it only introduces delay and waste of disk space on the host machine.

Is there a way to accomplish what I want to do using the GUI?

Is there a way to accomplish what I want to do using the CLI (short script)?

Hints on either or both (including RTFM pointers) would be appreciated since I seem to have run out of Google foo.

Best regards,
/Lars-Johan Liman

Re: Clone only configuration settings?

Posted: 16. Oct 2013, 21:16
by noteirak
That feature is not available in Virtualbox directly, you'll have to rely on custom scripts.

Two ways I see doing this :
- Safer way : remove all drives from your existing VM, clone, reattach to original VM. You'll need the VM powered off for this.
- Error-prone way but effective : copy the .vbox file of the original VM, remove the storage lines, edit UUIDs around with a new unique UUID and register the newly create VM.