LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-28-2008, 12:44 PM   #1
brianpbarnes
Member
 
Registered: Dec 2005
Posts: 143

Rep: Reputation: 15
VirtualBox virtual disk image backup? .vdi .sav


Hi,
On my 4th attempt, I finally got a VirtualBox XP image with Photoshop stable after reboots of both the Ubuntu host and the xp guest. This is the first attempt with VBox 2.0.6. The duds were all with 2.0.4 *(avoid)*.

Adobe has been hassling me about having installed Photoshop too many times an it takes half an hour of hair pulling to get them to turn it back on. I want to save the current image to another hard drive in case I (or Sun) screw it up again.

I took a fresh snapshot but when I look in my snapshot directory, I see 14 .vdi and .sav files with today's date and 12 have exactly the same time/date stamp. See the ls output below.

My question is which files do I need to backup to capture the entire, current state? The virtual disk manager says that the virtual disk is 3.8 GB which would fit nicely and permanently on a DVD. But, the 14 files total 16 GB. Are these files incremental backups? Due to paranoia, I took snapshots every half hour during setup as I installed one thing after another. Do I need them all?

If I reinstall xp one more time, uncle bill will be on my case for sure.

Thank you,
BrianP

root@godzilla2:/tera/nt.snap# ls -lht | grep 11-28
-rw------- 1 root root 565M 2008-11-28 11:47 {27c0a6dc-bb79-4559-bcfa-c9a55be8c85b}.sav
-rw------- 1 root root 202M 2008-11-28 11:46 {2704ae5a-d773-4285-8fa5-16a9a5c10975}.vdi
-rw------- 1 root root 2.1G 2008-11-28 11:12 {1cf8d753-226f-476c-980d-2bd6d6ec2ae0}.vdi
-rw------- 1 root root 225M 2008-11-28 11:12 {22c5f107-204d-486b-b78c-d05c22dee5fc}.vdi
-rw------- 1 root root 1.9G 2008-11-28 11:12 {2b1b9bb0-f85e-4705-952a-bff303bb62b4}.vdi
-rw------- 1 root root 358M 2008-11-28 11:12 {2fbc5e4f-3114-4695-ae9f-36fe40bce1b3}.vdi
-rw------- 1 root root 545M 2008-11-28 11:12 {56fae044-25b6-4d8b-8b71-72e5e8b28ec1}.sav
-rw------- 1 root root 1.1G 2008-11-28 11:12 {6b94a90a-d798-4e93-9295-fbfbdd498e03}.vdi
-rw------- 1 root root 820M 2008-11-28 11:12 {84ec6583-006b-46e5-92d5-1b4f217d77b6}.vdi
-rw------- 1 root root 1.4G 2008-11-28 11:12 {d56cc484-10a1-4ef3-937c-3f7a474a61c3}.vdi
-rw------- 1 root root 1.5G 2008-11-28 11:12 {db98fbf0-989e-45ad-bd06-29176218164f}.vdi
-rw------- 1 root root 591M 2008-11-28 11:12 {f747171b-ca3a-4054-aedb-c86646b7f751}.vdi
-rw------- 1 root root 1.3G 2008-11-28 11:12 {faf28bbf-ec89-4187-8174-0d23c789e0a7}.vdi
-rw------- 1 root root 3.9G 2008-11-28 11:12 nt_2_img.vdi
 
Old 12-01-2008, 01:51 PM   #2
tgerbert
LQ Newbie
 
Registered: Jul 2008
Distribution: Ubuntu Studio 8.04
Posts: 15

Rep: Reputation: 0
I'm not absolutely 100% sure, but I would think that so long as the VM isn't running, you could just make a copy of the original .vdi.

Why don't you try copying nt_2_img.vdi to test.vdi, then setup another VM with this disk image, boot it up and make sure it's what you expect.

Quote:
Originally Posted by brianpbarnes View Post
Hi,
On my 4th attempt, I finally got a VirtualBox XP image with Photoshop stable after reboots of both the Ubuntu host and the xp guest. This is the first attempt with VBox 2.0.6. The duds were all with 2.0.4 *(avoid)*.

Adobe has been hassling me about having installed Photoshop too many times an it takes half an hour of hair pulling to get them to turn it back on. I want to save the current image to another hard drive in case I (or Sun) screw it up again.

I took a fresh snapshot but when I look in my snapshot directory, I see 14 .vdi and .sav files with today's date and 12 have exactly the same time/date stamp. See the ls output below.

My question is which files do I need to backup to capture the entire, current state? The virtual disk manager says that the virtual disk is 3.8 GB which would fit nicely and permanently on a DVD. But, the 14 files total 16 GB. Are these files incremental backups? Due to paranoia, I took snapshots every half hour during setup as I installed one thing after another. Do I need them all?

If I reinstall xp one more time, uncle bill will be on my case for sure.

Thank you,
BrianP

root@godzilla2:/tera/nt.snap# ls -lht | grep 11-28
-rw------- 1 root root 565M 2008-11-28 11:47 {27c0a6dc-bb79-4559-bcfa-c9a55be8c85b}.sav
-rw------- 1 root root 202M 2008-11-28 11:46 {2704ae5a-d773-4285-8fa5-16a9a5c10975}.vdi
-rw------- 1 root root 2.1G 2008-11-28 11:12 {1cf8d753-226f-476c-980d-2bd6d6ec2ae0}.vdi
-rw------- 1 root root 225M 2008-11-28 11:12 {22c5f107-204d-486b-b78c-d05c22dee5fc}.vdi
-rw------- 1 root root 1.9G 2008-11-28 11:12 {2b1b9bb0-f85e-4705-952a-bff303bb62b4}.vdi
-rw------- 1 root root 358M 2008-11-28 11:12 {2fbc5e4f-3114-4695-ae9f-36fe40bce1b3}.vdi
-rw------- 1 root root 545M 2008-11-28 11:12 {56fae044-25b6-4d8b-8b71-72e5e8b28ec1}.sav
-rw------- 1 root root 1.1G 2008-11-28 11:12 {6b94a90a-d798-4e93-9295-fbfbdd498e03}.vdi
-rw------- 1 root root 820M 2008-11-28 11:12 {84ec6583-006b-46e5-92d5-1b4f217d77b6}.vdi
-rw------- 1 root root 1.4G 2008-11-28 11:12 {d56cc484-10a1-4ef3-937c-3f7a474a61c3}.vdi
-rw------- 1 root root 1.5G 2008-11-28 11:12 {db98fbf0-989e-45ad-bd06-29176218164f}.vdi
-rw------- 1 root root 591M 2008-11-28 11:12 {f747171b-ca3a-4054-aedb-c86646b7f751}.vdi
-rw------- 1 root root 1.3G 2008-11-28 11:12 {faf28bbf-ec89-4187-8174-0d23c789e0a7}.vdi
-rw------- 1 root root 3.9G 2008-11-28 11:12 nt_2_img.vdi
 
Old 04-25-2009, 05:24 PM   #3
axelfc
Member
 
Registered: Jan 2006
Distribution: ArchLinux
Posts: 175

Rep: Reputation: 34
Sorry for bringing back this old topic but I had the same problem. Just copying the .vdi file isn't a proper solution. Here it is how to do it.

How to copy and transfer or backup a Virtualbox Virtual Machine .vdi
 
Old 07-17-2009, 02:12 PM   #4
sh0x
LQ Newbie
 
Registered: Jul 2009
Posts: 2

Rep: Reputation: 0
Nothing is wrong with copy/paste..

For offline backup there is nothing wrong with copying a VDI. I see a lot of posts saying the correct way is to use clonehd. CloneHD is for cloning a disk with a new UUID for use in another virtual machine.

If you copy your VDI files and have errors restoring it due to UUID conflicts, then:

1) modify your vm so it doesn't use the VDI
2) close the disk medium
3) re-open the medium
4) add VDI to VM

If you use clonehd to backup a disk you're creating a bunch of UUIDs that you don't need. The old UUID will still be in virtual box. Here are some truncated command line examples how you can restore a copied VDI file if you're having UUID conflicts.


# show vm info
sh0x@vbox:~# VBoxManage showvminfo moody
UUID: 646e8f73-8c5f-46a9-af3b-3295adc2b859
Name: moody
Primary master: /opt/VBox/HardDisks/moody.vdi (UUID: aa33df2f-f057-4e3f-b10a-124da954381f)


# list virtual box HDDs
sh0x@vbox:~# VBoxManage list hdds
UUID: aa33df2f-f057-4e3f-b10a-124da954381f
Format: VDI
Location: /opt/VBox/HardDisks/moody.vdi
Usage: moody (UUID: 646e8f73-8c5f-46a9-af3b-3295adc2b859)


# remove disk from VM
sh0x@vbox:~# VBoxManage modifyvm moody -hda none


# close medium in virtualbox
sh0x@vbox:~# VBoxManage closemedium disk /opt/VBox/HardDisks/moody.vdi

or

sh0x@vbox:~# VBoxManage closemedium disk aa33df2f-f057-4e3f-b10a-124da954381f


# restore copied VDI and open medium in virtualbox
sh0x@vbox:~# VBoxManage openmedium disk /opt/VBox/HardDisks/moody.vdi


# add disk to VM
sh0x@vbox:~# VBoxManage modifyvm moody -hda /opt/VBox/HardDisks/moody.vdi


# start VM however you normally do
sh0x@vbox:~# VBoxManage startvm moody -type vrdp
 
  


Reply

Tags
backup, drive, hard, state, vdi, virtual, virtualbox



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there a way to increase the VDI size in VirtualBox on Fedora 9? Mr. Rey Linux - Software 10 05-24-2010 08:05 AM
Not able to create virtual disk in VirtualBox harry2006 Linux - Software 1 09-26-2008 01:06 PM
No internet in Virtual Box after vdi transplant Raccoon1400 Slackware 3 06-20-2008 04:33 PM
Migrating a VirtualBox .vdi Image to CoLinux MetalSubstance Linux - Software 2 02-25-2008 07:03 AM
fitting 39 Gb disk image onto 39 Gb backup disk ivlad2002 Linux - Laptop and Netbook 6 03-29-2007 04:45 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:53 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration