LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS
User Name
Password
CentOS This forum is for the discussion of CentOS Linux. Note: This forum does not have any official participation.

Notices


Reply
  Search this Thread
Old 08-31-2017, 04:21 PM   #1
robertkwild
Member
 
Registered: Feb 2015
Posts: 382

Rep: Reputation: Disabled
cloning linux KVM VMs for backups


hi all,

just want to know how you all clone your VMs on linux KVM as i have done it this way and it works

all my vm file(s) are stored on my KVM server here -

/home/KVM/script.qcow2

i have only one vm atm but you get the jist, there all in /home/KVM

i have noticed in virt-manager if you right click on your vm and select clone it says it must be paused or switched off ie you cant do hot backups, just cold

i have created a samba share on my KVM server so i can access it from other machines, so i can save the files somewhere else for safe keeping, location /home/files/

cp -f /home/KVM/script.qcow2 /home/files/
[root@kvm ~]# rm -f /home/KVM/script.qcow2
[root@kvm ~]# cp -f /home/files/script.qcow2 /home/KVM/

once i have done this, i made a new vm from my clone, added the same network to it and i can succesfully log in and access the apache server on it

just wondered how you guys do it

rob
 
Old 09-07-2017, 08:58 PM   #2
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,624

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
just make a copy of the *.qcow file
that is the virtual drive
 
Old 09-07-2017, 09:56 PM   #3
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,982

Rep: Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626
Are you copying the virtual disk while it is running?
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Best Practice in Cloning RHEL VMs in VMWare JockVSJock Linux - Enterprise 5 08-05-2016 12:03 AM
KVM connecting VMs (same network) blackRonin Linux - Virtualization and Cloud 3 12-19-2014 04:46 PM
thumbrule for KVM virtualization - How Many VMs? austinium Linux - Server 4 10-26-2013 04:01 PM
Backups by cloning the running system disk? CamilliLa Linux - General 1 03-12-2013 03:43 AM
Any way to access old VMs after reinstalling KVM? shadowbox12 Linux - Virtualization and Cloud 3 03-19-2010 10:09 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS

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