LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 08-22-2014, 12:40 AM   #1
sindh
LQ Newbie
 
Registered: Aug 2014
Posts: 24

Rep: Reputation: Disabled
How to clone an image on kvm using clonezilla


I have used clonezilla to save image on a bare metal device to external disk. And used the cloned iso image to install on other UCS machines.

But I want the same to be done for KVM setups, which are instantiated from bare metal device. In short, I would like to take cloned image from KVM and install on other KVM. Please help, how can I do it.
Appreciate your help!!
 
Old 08-22-2014, 03:48 PM   #2
jefro
Moderator
 
Registered: Mar 2008
Posts: 16,694

Rep: Reputation: 2455Reputation: 2455Reputation: 2455Reputation: 2455Reputation: 2455Reputation: 2455Reputation: 2455Reputation: 2455Reputation: 2455Reputation: 2455Reputation: 2455
Your thinking needs to be changed. You imagine right now that a KVM machine is somehow different than a real machine. I say imagine that it is a real machine. You boot (this kvm machine) to a clonezilla iso (or disc) and clone it off to some resource. You can attach a new drive to the vm or use networked location.



However, from your question I'd have to suggest a different method. Just copy the machine and associated files. http://serverfault.com/questions/434...to-move-kvm-vm

It may be possible to migrate it also.
http://www.linux-kvm.org/page/Migration

Last edited by jefro; 08-22-2014 at 03:50 PM.
 
Old 08-23-2014, 02:19 PM   #3
Doug G
Member
 
Registered: Jul 2013
Posts: 749

Rep: Reputation: Disabled
Quote:
I say imagine that it is a real machine.
Yep. I recently cloned a kvm centos 6.5 to a physical disk using a dd created .iso. Worked fine after some hostname/udev/ifcfg edits.

You may want convert the image file to raw format before cloning.
 
Old 08-25-2014, 02:35 AM   #4
sindh
LQ Newbie
 
Registered: Aug 2014
Posts: 24

Original Poster
Rep: Reputation: Disabled
Thank you Jefro for your response. I understood Your point.
-I had a new image on my kvm vm with 3.10.11 kernel
-All graphical interfaces were disabled.
So my doubt is, how can I use clonezilla during reboot? The only way I can access VM is through VNC console, where I am not getting any booting options.

-->However, from your question I'd have to suggest a different method. Just copy the machine and associated files.

Let me explain my requirement properly. Would like to clone a kvm VM and use the same iso for other number of vm's.

Please provide some pointers or procedure,how can I proceed further.
 
Old 08-25-2014, 03:30 PM   #5
jefro
Moderator
 
Registered: Mar 2008
Posts: 16,694

Rep: Reputation: 2455Reputation: 2455Reputation: 2455Reputation: 2455Reputation: 2455Reputation: 2455Reputation: 2455Reputation: 2455Reputation: 2455Reputation: 2455Reputation: 2455
A hint to the solution.

A vm is three things for the most part.

One is the vm application/software. (kvm/qemu in this case)

Two is a configuration file or set of files that describe the vm client to the vm software.

Three is the virtual hard drive files.

You don't need to use the phrase clone in this case. You just need to copy the files associated with the client.

See web posts on how to copy kvm. Generally steps are shut down vm. Copy files. May need to use words like import kvm to simplify install.
 
Old 09-04-2014, 02:43 AM   #6
sindh
LQ Newbie
 
Registered: Aug 2014
Posts: 24

Original Poster
Rep: Reputation: Disabled
Thank you Jefro, Thank you Doug.
But I have an issue during restoring clonezilla image.
I am getting error like -failed to install grub.
Please find the attached image.
Attached Thumbnails
Click image for larger version

Name:	error.png
Views:	64
Size:	68.3 KB
ID:	16307  
 
Old 09-04-2014, 03:40 PM   #7
jefro
Moderator
 
Registered: Mar 2008
Posts: 16,694

Rep: Reputation: 2455Reputation: 2455Reputation: 2455Reputation: 2455Reputation: 2455Reputation: 2455Reputation: 2455Reputation: 2455Reputation: 2455Reputation: 2455Reputation: 2455
I see it but not sure why. It is saying that it is trying to install grub 0.97 to an ext4 partition.

Did you create the formatted virtual hard drive to begin with?

Why didn't you just copy the files?
 
Old 09-04-2014, 04:03 PM   #8
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,838

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
What version of clonezilla are you using?
It may be that the version is too old & was created when grub1 was the default.
 
  


Reply


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
Clonezilla Disk Clone Problem ajkannan83 Linux - General 2 05-23-2014 06:25 PM
[SOLVED] Clonezilla Image Data JJJCR Linux - General 4 09-17-2012 07:17 PM
LXer: How to Clone Drives and Partitions with Clonezilla LXer Syndicated Linux News 0 01-29-2010 12:00 AM
clonezilla clone disk to image, when restore from image to destination hdd problem. hocheetiong Linux - Newbie 3 05-06-2008 07:59 PM
LXer: Clone Linux, Windows disks with Clonezilla LXer Syndicated Linux News 0 03-17-2008 07:20 AM

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

All times are GMT -5. The time now is 07:39 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration