VHD to ISO

I have found these forums very useful when tackling any Linux questions I’ve had in the past, but this is my first time to post and be a part of the problem/solution. I am hoping that all of your expertise can assist me in a VHD to ISO project.

I was approached today by my boss asking me to take one of my production OpenSuse Web Servers (currently running with a VHD) and create an ISO image that can be deployed on other machines. Please excuse my ignorance if this is an easy project that I’m making a mountain out of as I am not as versed in Linux as I am in Windows. I have done this before on windows machine by mounting the VHD and using imagex to create a new Install.wim file that I simply use as a replacement on the original Windows installation ISO. Obviously this method will not work on a Linux machine. What options do I have to accomplish this project?

Thanks in advance,

-plant-

On 2014-02-14 22:26, ManOfPlants wrote:
>
> I have found these forums very useful when tackling any Linux questions
> I’ve had in the past, but this is my first time to post and be a part of
> the problem/solution. I am hoping that all of your expertise can assist
> me in a VHD to ISO project.
>
> I was approached today by my boss asking me to take one of my production
> OpenSuse Web Servers (currently running with a VHD) and create an ISO
> image that can be deployed on other machines. Please excuse my
> ignorance if this is an easy project that I’m making a mountain out of
> as I am not as versed in Linux as I am in Windows. I have done this
> before on windows machine by mounting the VHD and using imagex to create
> a new Install.wim file that I simply use as a replacement on the
> original Windows installation ISO. Obviously this method will not work
> on a Linux machine. What options do I have to accomplish this project?

Well… some/many of us do not know what does imagex. I don’t, so I can
not even imagine a Linux way of doing it.

I see that VHD stands for Microsoft Virtual Hard Disk, a virtual machine
disk image format. I’m not familiar with that, either.

So lets do some guessing.

Maybe I could boot a “live CD” on that virtual machine of yours, running
Linux. Once there, I could create an image of the “hard disk” as seen
from inside the running live Linux. It would appear a standard disk
image, byte by byte… so I could just ‘dd’ a copy. Or use tools like
clonezilla or G4L (ghost for Linux).

The result would be an image clone, not an install disk. If you want an
install disk customized for your needs, have a look at susestudio
instead. It does just that.


Cheers / Saludos,

Carlos E. R.

(from 13.1 x86_64 “Bottle” (Minas Tirith))

Thank you very much for responding Robin. That would definitely be a good solution to cloning the disk, but I already have a “clone”. What I am really looking for is an ISO file (similar to what you use to do the initial installation. For instance, openSUSE-13.1-DVD-i586.iso) that includes all the programs and packages already installed with the current configuration of the machine.

Many organizations currently do this with their Windows machines. That way when a user does something that renders the machine unusable (i.e. virus, registry errors, etc) they don’t need to spend valuable man hours to repair it. They simply “re-image” the machine with the ISO with the modified “install.wim” file.

I would think there would be a way to do this in a Linux environment, otherwise technicians would have to reinstall the OS and programs from scratch every time one of the hundreds of machines they service went down. Maybe even a third party utility?

Have you tried installing the application AcetoneISO? It allows you to convert anything inside a folder to an ISO file.
You can find it in the KDE Extra repository.

I just converted my test MSDOS-7 VirtualBox VDI folder into an ISO file.

Or in Linux we can use from the command prompt:
**To make an ISO from files on your hard drive
**

**mkisofs -o /tmp/cd.iso /tmp/directory/**

On 02/14/2014 06:16 PM, ManOfPlants wrote:
>
> Thank you very much for responding Robin. That would definitely be a
> good solution to cloning the disk, but I already have a “clone”. What I
> am really looking for is an ISO file (similar to what you use to do the
> initial installation. For instance, openSUSE-13.1-DVD-i586.iso) that
> includes all the programs and packages already installed with the
> current configuration of the machine.
>
> Many organizations currently do this with their Windows machines. That
> way when a user does something that renders the machine unusable (i.e.
> virus, registry errors, etc) they don’t need to spend valuable man hours
> to repair it. They simply “re-image” the machine with the ISO with the
> modified “install.wim” file.
>
> I would think there would be a way to do this in a Linux environment,
> otherwise technicians would have to reinstall the OS and programs from
> scratch every time one of the hundreds of machines they service went
> down. Maybe even a third party utility?

I’m not sure you understand what is on the openSUSE DVDs. They are no more a
configured, ready to run system than there is one on the Windows distribution
CD. It is a set of files that can be unpacked and copied to the user’s disk to
create a system.

What I think you need to do is create a VM and install openSUSE on it. After you
finish configuring the system the way you like it, you then backup the VDI file.
Then if a user destroys their copy, all you need to do is copy that backup over
the bad one and start over. You could even create two virtual disks with one
having the system, and the other having the user’s home. That way restoring from
the backup would not destroy the user files.

On 2014-02-15 01:16, ManOfPlants wrote:
>
> Thank you very much for responding Robin. That would definitely be a
> good solution to cloning the disk, but I already have a “clone”. What I
> am really looking for is an ISO file (similar to what you use to do the
> initial installation. For instance, openSUSE-13.1-DVD-i586.iso) that
> includes all the programs and packages already installed with the
> current configuration of the machine.

I see.

> Many organizations currently do this with their Windows machines. That
> way when a user does something that renders the machine unusable (i.e.
> virus, registry errors, etc) they don’t need to spend valuable man hours
> to repair it. They simply “re-image” the machine with the ISO with the
> modified “install.wim” file.

The places I have been at used Ghost images or equivalent. I have never
seen those .wim files you mention.

> I would think there would be a way to do this in a Linux environment,
> otherwise technicians would have to reinstall the OS and programs from
> scratch every time one of the hundreds of machines they service went
> down. Maybe even a third party utility?

No, there isn’t.
Or not that easy.

You have, as I said, susestudio (go to susestudio.com). Basically, you
create your own install disk: AFAIK, not based on the installation you
are using on your computer, but based on what you design on that web
page (from scratch, or based on a previous one). I think you test the
resulting install media virtually, on the web. Finally, you download
your cd or dvd.

I do not see a link with demo or instructions, though. The place wants
you to login first.

Then there is also autoyast. You can create an autoconfig file based on
the current list of packages, then you have to continue and adapt it.
Documented. Complex.

If you search “autoyast” in the package manager, you will see three
packages.

During installation, you have to feed the openSUSE DVD plus the
autoinstallation xml file; initially, it was searched for in the floppy,
automatically, and used. I don’t know where nowdays you are supposed to
put it.


Cheers / Saludos,

Carlos E. R.

(from 13.1 x86_64 “Bottle” (Minas Tirith))

Believe this has little to do with the diskfile is a VHD aside from the fact your current VM is likely running on a Windows box.

Your Q has more to do with creating a bootable diskfile (livecd) with your custom built openSUSE.

If you were deployed on an openSUSE host, I’d suggest Kiwi or the Open Build Service. It might still be an option if you first convert to a file format that can be mounted on an openSUSE machine.

Otherwise, if you’re already on a Windows machine it’s probably possible to do everything on Windows. I’d do a Google search “V2P VHD” to extract the files from the VHD disk, then use almost any utility to create a bootable ISO.

TSU

On 2014-02-15 23:26, tsu2 wrote:

> If you were deployed on an openSUSE host, I’d suggest Kiwi or the Open
> Build Service.

IIRC, susestudio is based on kiwi. I forgot about that one.


Cheers / Saludos,

Carlos E. R.

(from 13.1 x86_64 “Bottle” (Minas Tirith))