Cloning .vdi

Discussions related to using VirtualBox on Windows hosts.
Post Reply
DavidG
Posts: 18
Joined: 20. Mar 2009, 19:10

Cloning .vdi

Post by DavidG »

Can a VM be safely cloned while stopped in the 'Saved State' and not the
'Powered Off' state?

Windows host. VirtualBox 2.2.0.


VBoxManage.exe clonehd /path/name.vdi /path/new_name.vdi
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: Cloning .vdi

Post by Sasquatch »

People have cloned the drive even when they had snapshosts, though those snapshots weren't in the clone. It's always best to have a clean shutdown of the VM, but a clone of a saved state VM will boot as if the machine had a power failure. You can try, it shouldn't harm the original file.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
spaceball
Posts: 6
Joined: 19. Apr 2009, 20:23
Primary OS: MS Windows XP
VBox Version: OSE other
Guest OSses: xp, solaris

Re: Cloning .vdi

Post by spaceball »

Hi,
I'm not that expert in VB, but at least in theory it should be possible to make a clone of a VM at any time, the source VM is "down".
It shouldn't matter what state the guest (VM) has inside it's plain file. As long as this file is not handled by VB or what ever application,
it's just a plain file. If the mentioned "source" VM is not corrupt and somehow startable, it also has a readable structure from VB's point of fiew
and so the clone-tool should be able to copy and modify the destinating clone-ID.

each VM, as long as it is somehow consistant and shutted down, is just a single bloody File's. Nothing more, nothing magic.
DavidG
Posts: 18
Joined: 20. Mar 2009, 19:10

Re: Cloning .vdi

Post by DavidG »

Thanks for the words of encouragement. :) If I find time this coming weekend I'll give this a try. If you, either of you, are interested in the results I'll post them here.
Post Reply