Clone problem when Machine is running!!

Discussions related to using VirtualBox on Windows hosts.
Post Reply
themoon17
Posts: 9
Joined: 27. Dec 2008, 12:19

Clone problem when Machine is running!!

Post by themoon17 »

First of all am very sorry if am posting it again!!

I am using the latest version 2.1.2

i know to copy the VDI file to different folder for the sake of backup and set UID.

However i want to use the command tool provided by SUN to clone my HDD which i think is the best way of copying a VDI/Cloning a VDI.

i followed the below command:

VBoxManage clonehd "source" "Target"

But, my problem is whenever i run this tool when my VDI is in use. I am unable to get my VDI cloned.But whenever my VDI is in off state this tools works gr8.

Can anybody help me how to figure out this problem?
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

Post by Sasquatch »

Duh!!! The file is locked for read and write, so the clone will fail. You can't copy a file that is in constant change. Would you be able to copy a file that is being written to constantly with your host, like a download?
Another example: can you copy a piece of paper when it's written on?

The file need to be closed before you can clone it.
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.
themoon17
Posts: 9
Joined: 27. Dec 2008, 12:19

Post by themoon17 »

Yes!!

I understand the logic. that is the reason am asking.

How about pausing a virtual machine and cloning ?

Do you think it is feasible?

If it is possible let me know.

Also is there any script which i can use to take backups of VDIs on timely basis?

Thanks for the support from all of you.

Awaiting reply
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

Post by Sasquatch »

Just shutdown the Guest, clone it, then start it again. There will be downtime anyway, better to do a clean shutdown than get a corrupted VM or clone.

For a backup, a simple file copy should be enough. Because if you happen to have to restore the backup, you can just overwrite the current file and you won't have to register a new VDI.
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.
Post Reply