LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 08-30-2016, 05:22 PM   #1
tushar.jadhav29
LQ Newbie
 
Registered: Apr 2016
Posts: 11
Blog Entries: 1

Rep: Reputation: Disabled
How to Backup running Virtual Machine in XenServer


Xen server snapshot backup creation

1) mkdir /vm_backup
#mount -t nfs 192.168.10.212:/vol/vmimgbackup /vm_backup


2) List VM's (Steps to Manually Backup Running VM)

2.1) Find VMs UUID
xe vm-list is-control-domain=false is-a-snapshot=false
uuid ( RO) : 04eb7bf4-d5d1-e17f-cd73-90f469705c23
name-label ( RW): CentOS_6_Noc_Test
power-state ( RO): running

04eb7bf4-d5d1-e17f-cd73-90f469705c23 -- we get Server UUID


3) Create VMs Snapshot (Snapshot VM to template)
xe vm-snapshot uuid=04eb7bf4-d5d1-e17f-cd73-90f469705c23 new-name-label=Backup-test-Webserver-1-28JUN16

{Above command will retrun a UUID of snapshot, Use that UUID to convert snapshot to a vm, so we can export it to file using below command.}
426ef33c-24a2-252d-d4e3-cf012382ae66 -- Template UUID


4) Export template to standby VM - Backup NFS mount
xe template-param-set is-a-template=false ha-always-run=false uuid=426ef33c-24a2-252d-d4e3-cf012382ae66 ((Temlate on UUID ) )


5) Export Snapshot to file
xe vm-export vm=426ef33c-24a2-252d-d4e3-cf012382ae66 filename=/var/run/sr-mount/226ccade-c619-a32d-5ac0-116d66b8f505/bakcup/Backup-test-Webserver-1-28JUN16.xva

--------------------------------------------------------------------------------------------------------------
Import snapshot/create server from snapshot
xe vm-import filename=Backup-test-Webserver-1-28JUN16.xva

9c5e0951-ec6d-0e9a-ec22-0ad3c88ac525

Restart VM
xe vm-reset-powerstate uuid=9c5e0951-ec6d-0e9a-ec22-0ad3c88ac525 force=true

--------------------------------------------------------------------------------------------------------------
error resolved XenServer host CLI

Please execute "xe-toolstack-restart" command on the XenServer host CLI and let me know if it resolved the issue

--------------------------------------------------------------------------------------------------------------
################# 1.4. Destroy Snapshot ##############

{Finally as we have already taken backup to xva file, so we can destroy created snapshot from xenserver.}
xe snapshot-list -----use for lost snapshot
xe host-list
xe sr-list

# xe vm-uninstall uuid=69616fa4-da57-947c-a8a7-aa043cf644ec force=true
384e54d6-fd6c-c041-90e8-f7db18aa89a5 --------- 1
8851d761-278d-5e4a-0ca1-43483c8b5aac --------- 2

Delete Snapshots
List VM's
xe vm-list is-control-domain=false is-a-snapshot=false

Delete Snapshots
xe vm-uninstall uuid=snapshot-name force=true
xe vm-uninstall uuid=9c5e0951-ec6d-0e9a-ec22-0ad3c88ac525 force=true
 
Old 09-01-2016, 06:24 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
...so, if you don't mind me asking, what's the deal with posting here what you posted elsewhere in your web log?
 
  


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
Keeping a backup of my linux virtual machine on my pc - I'm a newbie alyab Linux - Virtualization and Cloud 6 04-29-2014 10:06 PM
Is base memory of virtual machine used when virtual machine is not running? ravisingh1 Linux - Virtualization and Cloud 3 04-09-2013 03:41 AM
Running a windows xp virtual machine on a old Dell Dimension 4600(running ubuntu) shadogamon Linux - Virtualization and Cloud 11 04-01-2011 02:08 PM
[SOLVED] Need to take backup of Virtual Machine digsecurity Linux - Virtualization and Cloud 15 04-30-2010 08:02 AM
Running virtual pc files in a virtual machine in linux ... preferably virtual box biharibong Linux - Software 4 01-21-2009 01:04 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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