LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud
User Name
Password
Linux - Virtualization and Cloud This forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.

Notices


Reply
  Search this Thread
Old 06-20-2016, 07:00 AM   #1
LinuxRSA
Member
 
Registered: Apr 2015
Location: South Africa
Posts: 71

Rep: Reputation: Disabled
How to take a Snapshot of a KVM at Location A and Restore that Snapshot at Location B


Hi All

Iv searched snapshots / snapshots KVM on this Forum and Some Posts aren't completed as Resolved I However require more Info.

I am New to This and would like as much detail as possible.

I have a KVM running at Location A called qa3. - See Below:

Quote:
root@wgcptlogserver:~# hostname
wgcptlogserver
root@wgcptlogserver:~# virsh
Welcome to virsh, the virtualization interactive terminal.

Type: 'help' for help with commands
'quit' to quit

virsh # list
Id Name State
----------------------------------
3 qa3 running

virsh #
Questions:

1 - How do i take a snapshot of qa3 ? What is the Command ?

2 - Where would i find a copy of this snapshot ? Where would it be Stored ?

3 - How do i move this snapshot from Location A to Location B ?

3 - How would i restore it at Location B ? How do i start it up ? What is the Command ?

4 - Is there any Network/Systems Settings that is required when completing such a Task ?

Thanks Guys

ps - This Forum is Flipping AWESOME!!

Last edited by LinuxRSA; 06-20-2016 at 07:02 AM.
 
Old 06-21-2016, 02:48 PM   #2
jefro
Moderator
 
Registered: Mar 2008
Posts: 22,008

Rep: Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629
I think this should still be relevant and useful. https://kashyapc.com/2011/10/04/snap...-qcow2-images/

It also may still need a CQOW file to start. Not sure if a raw or other virtual hard drive can support this live.
 
Old 06-21-2016, 03:04 PM   #3
notKlaatu
Senior Member
 
Registered: Sep 2010
Location: Lawrence, New Zealand
Distribution: Slackware
Posts: 1,077

Rep: Reputation: 732Reputation: 732Reputation: 732Reputation: 732Reputation: 732Reputation: 732Reputation: 732
I don't use virt manager much, or any of those frontends, but this might be helpful anyway.

You can create a snapshot file based on a source .qcow2 image with qemu:

Code:
qemu-img create -f qcow2 -b slackware.qcow2 slackware.snap001.img
Then you can run the snapshot file as your new starting point. In other words, the anything you do in that virtual machine only gets preserved in the snapshot file (which itself is a kind of overlay to the original .qcow2 image):

Code:
qemu-kvm [all your usual options here] -drive file=slackware.snap001.img
I have all my qemu notes stored here, if it's of any use: http://straightedgelinux.tk/unix/qemu/?dir=unix

Not entirely sure how it all translates to the virt frontend stuff.
 
Old 06-21-2016, 06:05 PM   #4
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,783

Rep: Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214
Note that the snapshot is dependent on the original base image. Sending the snapshot to a remote location would be meaningful only if an exact copy of the base image were already there.
 
1 members found this post helpful.
Old 06-22-2016, 11:59 AM   #5
dyasny
Member
 
Registered: Dec 2007
Location: Canada
Distribution: RHEL,Fedora
Posts: 995

Rep: Reputation: 115Reputation: 115
You do not need a snapshot in this case. Just stop the VM, use qemu-img convert to clone the disk, and virsh dumpxml to get the VM definitions, copy the disk and the xml to a new location, edit the xml to reflect the new disk name and location, use virsh define to create a new VM based on the copied and modified definition file.
 
  


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
KVM snapshot backup shengyang999 Linux - Virtualization and Cloud 1 09-24-2015 10:34 AM
kvm snapshot zolainfo Linux - Virtualization and Cloud 5 08-05-2015 08:13 PM
LXer: Google I/O Android News: Location, Location, Location (Plus Cloud Messaging and Bluetooth) LXer Syndicated Linux News 0 06-05-2013 01:00 PM
Snapshot & Clone on KVM benelux.j Linux - Virtualization and Cloud 3 12-03-2012 02:37 AM
How to snapshot and restore Linux? yitzhakbg Linux - Software 0 12-14-2004 10:37 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud

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