[Solved] Restore an Image file

This is for discussing general topics about how to use VirtualBox.
Post Reply
DR I
Posts: 43
Joined: 11. Jul 2009, 13:42
Primary OS: Debian Lenny
VBox Version: OSE other
Guest OSses: Windows XP and Linux

[Solved] Restore an Image file

Post by DR I »

Hello everybody,

I've a question concerning the ISO files.

Is there a way to restore an ISO file into a VM virtualbox?
I've made an ISO image of an production machine, now I want to restore on my Virtual machine create for that.

Can I do that or not?
TerryE
Volunteer
Posts: 3572
Joined: 28. May 2008, 08:40
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Ubuntu 10.04 & 11.10, both Svr&Wstn, Debian, CentOS
Contact:

Re: Restore an ISO file

Post by TerryE »

A longer answer is that you create a VM and use whatever ISO restore S/W that you use on your normal machine, one constraint is that VBox currently only supports a single CDROM so things can get a little convolved. The main issue that the VM is a different H/W spec to the production machine and therefore you may have troubles booting your restored OS -- especially if it is Windows since this is not designed to be rehosted and even if you sort out the driver issues. You will then almost certainly trigger Windows reactivation.
Read the Forum Posting Guide
Google your Q site:VirtualBox.org or search for the answer before posting.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Restore an ISO file

Post by mpack »

vbox4me2 wrote:Short answer: yes.
Perhaps that answer is a little too short, in fact I also doubt that it's correct.

AFAIK, there is no such thing as an "ISO image" in the sense implied by the OP. ISO 9660 is a file system, nothing more. While you can collect any number of files and package them in an ISO container, this would not be an image. It would not for example include boot sector, partition map, and other non-file information, nor does it preserve the assignment of sectors throughout a partition.

Of course, ISO could be used as a generic container format for any information, including drive image information created by a particular application. Perhaps that is what is meant here. In that case the same application would be needed to restore from this image. It doesn't sound to me like this is what the OP means.

I don't know of any generic ISO-aware application that can "restore an ISO image" onto the hard disk of a PC, preserving non file attributes in the way that Ghost or Acronis would preserve them.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Restore an ISO file

Post by mpack »

TerryE wrote:A longer answer is that you create a VM and use whatever ISO restore S/W that you use on your normal machine.
Terry, the only "ISO restore S/W" I'm aware of restores the ISO file onto a CD. Are you aware of software that can image a hard drive using ISO as a container format, and restore onto a hard disk?
 Edit: . It would also help if I was sure of which operating systems were involved - guest and host. 
TerryE
Volunteer
Posts: 3572
Joined: 28. May 2008, 08:40
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Ubuntu 10.04 & 11.10, both Svr&Wstn, Debian, CentOS
Contact:

Re: Restore an ISO file

Post by TerryE »

Some backup products include a small (typically Linux kernel based) bootstrap on an ISO format DVD followed by a system image. These are invariably intended for Windows OS since it is a lot easier in the Linux world to do this using std OS utilities. If you are using normal LiveCD ISOs this is a little more complicated since these normally mount and rely on the boot CD as a system container and so you can't easily restore a second ISO image. However, I suspect that the OP was talking about a Windows image, and so we get into all the boring old issues of who MS go out of thei way to make this difficult and it is usually in breach of the licence agreement under which XP or whatever was originally purchased.
Read the Forum Posting Guide
Google your Q site:VirtualBox.org or search for the answer before posting.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Restore an ISO file

Post by mpack »

I guess this all hinges on what we've interpreted the OP is saying, and that interpretation is based on our own experiences. What I've suspected the OP means is that he's used something like the "Create image file from files/folders..." wizard in ImgBurn (or other CD/DVD burning software) to create the ISO. Obviously this isn't an image of the source drive, at best it's an image of a CD. There would be no one-step method of "restoring" this into a blank (unformatted) VDI to recover a bootable Windows system drive. Whether you could recover a bootable Linux system drive this way I can't say as I don't use Linux.
DR I
Posts: 43
Joined: 11. Jul 2009, 13:42
Primary OS: Debian Lenny
VBox Version: OSE other
Guest OSses: Windows XP and Linux

Re: Restore an ISO file

Post by DR I »

Hi all, thanks a lot for your answers, even if some one has been a little bit too short :D (I'm killing you!).

No in fact I create the image like this:

I ran an Linux Live CD on the desktop, then I execute an dd comand ~# dd if=/dev/sda of=/media/cifs/domino.ISO

Now I want to retore this Image into VBox, Is not really important if I have some troubles with some H/W interface.
Usually when I run an Mastering image with a PXE Server, Ive no troubles with the H/W.

Well, and if I use VBOX like that:

VBoxManage converttoraw MyImage.ISO MyVM.VDI

Is there a chance it works?
vbox4me2
Volunteer
Posts: 5218
Joined: 21. Nov 2008, 20:27
Location: Rotterdam
Contact:

Re: Restore an ISO file

Post by vbox4me2 »

Try it :D (I love short answers)
Else use the livecd again inside the VM and dd it back into its VDI, you might need to fiddle a bit with the mbr if it won't boot.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Restore an ISO file

Post by mpack »

DR I wrote:I ran an Linux Live CD on the desktop, then I execute an dd comand ~# dd if=/dev/sda of=/media/cifs/domino.ISO
I'm not a Linux user, so forgive my ignorance...

Does that command really produce an ISO 9660 (or UDF) compatible output file? Or does it just copy your source partition to an output file with a misleading name?
baf
Volunteer
Posts: 829
Joined: 27. Sep 2008, 06:18
Primary OS: Mac OS X Leopard
VBox Version: PUEL
Guest OSses: linux,xp,win7
Location: Luleå or Skellefteå, Sweden

Re: Restore an ISO file

Post by baf »

mpack you are right. That is not an ISO file just a dump of that harddisk.
Some say: "You learn as long as you live".
My way: "You live as long as you learn".
TerryE
Volunteer
Posts: 3572
Joined: 28. May 2008, 08:40
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Ubuntu 10.04 & 11.10, both Svr&Wstn, Debian, CentOS
Contact:

Re: Restore an ISO file

Post by TerryE »

Dr I, you get people very confused when you use shorthand which is in fact unrelated to the common meanings. A dd to a file is as mpack says not an ISO image. BTW, if you do this again run zerofree (if your host OS is Linux) or sDelete (if Windows; see my tutorial All about VDIs) and use something like
  • dd if=/dev/sda bs=4096 | bzip2 -c >/media/cifs/domino.dmp.bz2
next time. It will be a lot smaller.

You reverse this process the obvious way. Just attach a blank VD of the correct size to your VM; boot the VM off the liveCD and dd the file back to /dev/sda.
Read the Forum Posting Guide
Google your Q site:VirtualBox.org or search for the answer before posting.
DR I
Posts: 43
Joined: 11. Jul 2009, 13:42
Primary OS: Debian Lenny
VBox Version: OSE other
Guest OSses: Windows XP and Linux

Re: Restore an ISO file

Post by DR I »

Yes you're right, it's just an container, not a truly ISO 9660 file system image. I know that.

I've test with convertfromraw and.... Is working perfectly.

Think about your tutorial on VDI format, is really intressting.

PROBLEM FIX!!

Thanks a lot everyone, you're really reactive and brilliant ideas has come, GG.
I really appreciate this forum, really instructive.
Post Reply