LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-02-2017, 02:53 PM   #16
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,965

Rep: Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622

My understanding is the OP wanted a V2P solution. Not a V2V. (virtual to physical)

One could boot to a live media in the vm and then clone (dd,tar,cpio...) to a dvd. Then take those to images and load to a new system.

One could squash the entire current vm OS and then add it to an existing live media if they really needed to.

Cloning to a usb hard drive is pretty easy on many VM's.
 
Old 06-02-2017, 05:23 PM   #17
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524

Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
I understand now. Well, the answer is you can't make an install disk from a virtual machine. Install disks are compressed software packages that get installed to the new system. And, the exercise is pointless, because VMs are portable.
 
Old 06-02-2017, 05:44 PM   #18
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,965

Rep: Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622
It is possible to create an install disk from a working vm. I don't know of a single click way to do it. The common way to create a live distro is a number of steps. One part is to have a working system. The OP has that.
 
1 members found this post helpful.
Old 06-02-2017, 08:17 PM   #19
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524

Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
OK, V to P. I know how to do it, but it would be arduous. I'm not aware of any distro that provides such functionality. But it's something to think about developing!

You would dump the entire file system into a directory structure and run genisoimage on it. But that would not account for customizations that might not work on other hardware. It would need to be as generic as possible.

You'd need to allow partitioning of the target drive. And also to install grub on it.

And you'd need to refer genisoimage to a boot sector/loader, such as isolinux, to make the disk bootable.

OR, you could write a small bootable system to the DVD along with the iso image of the desired system, mount the iso as a loop device in the installer, and copy the files in the iso image to the desired hdd/sdd. You could use rsync for that.

You'd need to omit virtual file systems, like /proc, /dev, /sys, /run, and /var/run; and just use empty directories in the iso image. I think it might work with the proper amount of effort, and if it will fit on a DVD.

I'm not quite sure, but you might be able to use dd to make an image of the VM, and then write that image to a DVD as a file, using wodim. You could boot your small install system, and dd (verb) the image file to the target hdd/sdd.

If the drive was too big, it would require additional partitioning to reclaim the empty space after the image was copied over.
 
Old 06-02-2017, 09:14 PM   #20
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
I dare say that (nearly) all modern virtualization packages have export features.
 
Old 06-03-2017, 10:14 AM   #21
DVOM
Member
 
Registered: Nov 2010
Posts: 223

Rep: Reputation: 48
I have cloned VMs before and transferred them to physical HDD. I think one misunderstanding is that people, and the OP, assume that linux, like windows, installs only the necessary drivers when installing. AFAIK, linux doesn't just install the necessary drivers, it installs ALL the drivers. Meaning that the cloned image will work on most/any machine.

I explained how I do this in this post:

http://www.linuxquestions.org/questi...14#post5656514

Copy and paste from that post:

I'll give you a step by step:

1) Create your VM.

2) Create a virtual HDD to use to store the "image".

3) Attach the virtual HDD to the VM and boot up, now create a folder in the virtual HDD for the image. I name mine like "1610xubu011517x64" so I know the date and the architecture.

4) Shut down again and attach the Clonezilla ISO.

5) Boot to Clonezilla and image the VM.

6) Now you have to move the "image" from the virtual HDD to an actual partition so you can get at it from clonezilla.

So shut down and remove the clonezilla ISO and reboot to the VM and move the "image", you're going to need to install VB guest tools to be able to "see" you machines partitions.

7) Now you're going to need to put a clonezilla ISO onto a USB stick. I recommend using Parted Magic as it's got clonezilla and the ability to install grub where you want it. The new version of Parted Magic is sold for $9 but you can find older versions that work for free: http://www.majorgeeks.com/files/deta...ted_magic.html

8) A couple of things to keep in mind while working with clonezilla, you can only restore the image to a partition that is at least as big or bigger than the original. And you've got to make sure the names of the files match up to the new partition. I've included a pic of the files in a image folder: The 2 files that are important are the ones named "sda1.ext4-ptcl-img.gz.aa" and the one named "parts" Make sure the "sda1" in the first file name is the name of the partition you're restoring to. If not, change that part of the name. The second file named "parts", open it up and change it to the correct partition. In all probability you're going to find the file names don't need changing.

9) Now that you've got the image restored to your preferred partition, now in Parted Magic go to the start button and scroll up to "Grub doctor" or whatever. I can't remember what it's called in that menu, However its obvious.

Now you're good to go. Reboot.

And, no I've never had problems with drivers, however I've only done this with ubuntu, other distros might not be as easy.
 
Old 06-04-2017, 07:03 AM   #22
HT-Borås
Member
 
Registered: Apr 2016
Location: Borås, Sweden
Distribution: CentOS
Posts: 54

Rep: Reputation: 18
Take a look at how OSBoxes does it.
 
Old 06-14-2017, 01:20 AM   #23
haseem saeed
Member
 
Registered: Jan 2017
Location: karachi,Pakistan
Distribution: Centos,Ubuntu
Posts: 34

Original Poster
Rep: Reputation: Disabled
Smile

Quote:
Originally Posted by Rickkkk View Post
... Cool. While waiting for some more experienced advice, you might want to take a look at these links that I found with a quick search:

http://www.smorgasbork.com/2014/07/1...t-disc-part-1/

http://everyday-tech.com/create-a-custom-centos-iso/

Cheers !
Thanks,
 
Old 06-14-2017, 01:36 PM   #24
Rickkkk
Senior Member
 
Registered: Dec 2014
Location: Montreal, Quebec and Dartmouth, Nova Scotia CANADA
Distribution: Arch, AntiX, ArtiX
Posts: 1,364

Rep: Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511
Quote:
Originally Posted by haseem saeed View Post
Thanks,
You are most welcome - hope you're successful !

Cheers,
 
  


Reply

Tags
centos, clone image, iso


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
How to modify ISO image or How to create Bootable ISO images.. sampappachan_nyc Linux - Software 2 01-22-2014 03:42 PM
How to make boot.iso image from rhel6 installation dvd iso ? Rohit_4739 Linux - Newbie 4 05-25-2012 07:45 AM
When mounting cd-image files the ISO unpacks and iso-inates it self Hevithan Linux - Newbie 6 05-04-2012 09:14 AM
LXer: Edit the Contents of ISO Disk Image with ISO Master LXer Syndicated Linux News 0 09-25-2011 04:20 PM
How do you merge 4 CD ISO images into one DVD ISO image? nsydenham Linux - Software 6 01-15-2007 09:49 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:36 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