Thursday Mar 24, 2016

Oracle VM 3.4: guest hot-backup on different repository (v0.8)

Not more than a couple of hours ago Oracle VM 3.4 has been announced on Virtualization Blog.

Here you can find the new version ( 0.8 ) of the HotCloneVm.sh script.

Download it here

Once downloaded, you'll find a zipped file containing:

  • "SetupSsh.sh" script to setup key-based authentication to Oracle VM Manager 3 CLI
  • "HotCloneVm.sh" script to execute guests hot-backups and proceed to apply retention policies
  • "HotCloneVM.pdf" containing a real user-guide to implement this backup strategy
  • "README_FIRST.txt" containing some tips to configure ssh timeout(s)  

Fixes introduced in 0.8:

  • Fixed Oracle VM CLI release check 

New features available in 0.7a:

  • Compatible with Oracle VM 3.3 / 3.4
  • Script is now able to identify Oracle VM Manager release and evaluate features enabled or not
  • New options for backup-type available: FULL, SNAP and OVA (OVA available only with 3.4 OVM Release)
    • FULL => HotClone will create a full vdisk backup on a further repository
    • SNAP => HotClone will create an ocfs2 reference-link snapshot of the vm on the same repository
    • OVA  => HotClone will create a packaged OVA file on a further repository
  • Retention is now applied on different backup-types
  • New definition of backup vm name:
    • $guest-OVA for OVA backup types
    • $guest-SNAP for ocfs2-reflink backup types
    • $guest-FULL for full-backup types
  • Retention continues to be applied also on old backups ( $guest-CLONE )

The hot-backup obtained by this script is always a crash-consistent backup of the running vm; if the VM owns also physical-disks, the backup will contain only virtual-disks and so, a manual intervention is needed to have it correctly booting/starting.

Here you can find one high-level picture of the target of this script:

The idea, here, is to have low-retention backups available on one NFS repository and medium/long retention on a Tape-Library / Further solution (see NDMP); an example could be to have latest 8/15 days (from 8 to 15) on the NFS share and oldest backups on the Tape-Library / NDMP.

So the retention can be managed between the two solutions (HotCloneVm script and Tape Library/NDMP) where:

  • HotCloneVm.sh will manage the low-retention on the NFS Repository
    • both Incremental and Full approaches are available with "SNAP" and "FULL"
  • Tape Library / NDMP will manage the long-retention on the Tape Library / NDMP solution
    • both Incremental and Full approaches can be managed by Tape Library / NDMP

Having the low-retention on the NFS will allow, moreover, to have a fast restore point for:

  • Single VM file restore or a list of them
    • Just start the VM, that resides on the NFS repository, with a temporary IP address and get files needed.
  • Entire VM restore
    • Stop the original VM and Start a snapshot and/or Clone/Move the FULL backup from the NFS
    • You can also evaluate to start the vm on the NFS repository to be even faster

Another option, available only with 3.4 release, is to have backups in OVA format; this option will allow to have backups that can be exported/imported to further Oracle VM Pools; for example you can use OVA exported to have the same VM available on a different Oracle VM Pool (like a clone from Production to Development) or on your laptop/desktop using VirtualBox.

First of all you need to setup an ssh-key exchange to obtain a self-authenticated system:

[scoter@ovmm: ~/Documents/OVM_34/HotCloneVm_0.7a]# ./SetupSsh.sh
#####################################################################################
You have to specify <guest id> or <guest name>:
Use SetupSsh.sh <Oracle VM Manager host> <Linux oracle user password> <Oracle VM Manager Password> 
Example:
SetupSsh.sh ovm-mgr.oracle.local oracle Welcome1
##########################################################################################
[scoter@ovmm: ~/Documents/OVM_34/HotCloneVm_0.7a]# 

NB: If you have already configured ssh-key exchange vs OVMCli you don't need to execute "SetupSsh.sh" script.

To identify syntax to be used, you have only to execute the command without any option:

[scoter@myhost: ~/]# ./HotCloneVm.sh
#####################################################################################
 You have to specify <guest id> or <guest name>:
 Use HotCloneVm.sh <Oracle VM Manager password> <Oracle VM Manager host> <guest name> <Oracle VM Server Pool> <target Repository> <Backup Retention> <backup_type>
 <backup_type> options are (no case-sensitive):
        - FULL => HotClone will create a full vdisk backup on a further repository
        - SNAP => HotClone will create an ocfs2 reference-link snapshot of the vm on the same repository
        - OVA  => HotClone will create a packaged OVA file on a further repository
Example:
 HotCloneVm.sh Welcome1 ovm-mgr.oracle.local vmdb01 myPool repotarget 8d (retention will be 8 days)
 HotCloneVm.sh Welcome1 ovm-mgr.oracle.local vmdb01 myPool repotarget d8 (retention will be 8 days)
 HotCloneVm.sh Welcome1 ovm-mgr.oracle.local vmdb01 myPool repotarget 8c (retention will be 8 copies)
 HotCloneVm.sh Welcome1 ovm-mgr.oracle.local vmdb01 myPool repotarget c8 (retention will be 8 copies)
##########################################################################################

As usual, your feedback will be really appreciated. 

Wednesday Sep 11, 2013

Script: Know which dom(0) hold a dom(u)

More than one time we would like to know on which physical server our guest resides without open a new connection to our Oracle VM Manager.

So I created a little script that interact with Oracle VM Manager 3 CLI and supply us this information automatically.

Requirements:

- expect installed

- Oracle VM Manager network reachable

Executing the script:

########################################################
 While executing on Oracle VM Guest:
 Use whohost.sh <Oracle VM Manager password> <Oracle VM Manager host>
 Example:
           whohost.sh Welcome1 ovm-mgr.oracle.local
########################################################
#####################################################################################
 If executed from a client and want to specify <guest id> or <guest name>:
 Use whohost.sh <Oracle VM Manager password> <Oracle VM Manager host> <guest vmid(uuid)>
 Example <guest id>:
           whohost.sh Welcome1 ovm-mgr.oracle.local id=0004fb00000600006e13bfb3507a2f29
 Use whohost.sh <Oracle VM Manager password> <Oracle VM Manager host> <guest name>

 Example <guest name>:            whohost.sh Welcome1 ovm-mgr.oracle.local name=vmdb01 #####################################################################################

This little bash script could be executed on a client ( laptop ) or directly on a guest; when executed on a linux guest

we can evaluate to leave out the guest vmid or guest name ( the script automatically picks up the uuid of the guest ).

Execution examples:

From a laptop ( simple client ):

[scoter@area51: ~]# ./whohost.sh Welcome1 srvovmm.oracle.local name=srvtestdb01.oracle.local
 Name = srvtestdb01.oracle.local
 Id = 0004fb0000060000d84a68991ef40c69
 Operating System = Microsoft Windows Server 2008
 Server = 00:14:5e:bc:a7:e8:00:14:5e:bc:a7:e8:00:0e:0c:b1  [srvovm04.oracle.local]

From an Oracle VM guest ( linux ):

 [root@srvlnx01 ~]# ./whohost.sh Welcome1 srvovmm.oracle.local
  Name = srvlnx01.oracle.local
  Id = 0004fb0000060000a8e1af6d58064b4f
  Operating System = Oracle Linux 5
  Server = 00:14:5e:bc:a7:e8:00:14:5e:bc:a7:e8:00:0e:0c:b1  [srvovm02.oracle.local]

Here you can find the little script.

I would like to thank you my colleague Jerome Anten for the collaboration on building up this little but handy script.

Corrections, comments and enhancements are welcome.

Simon Coter

About

Simon Coter is a Principal Product Manager for Oracle VM and VirtualBox.

Search

Categories
Archives
« May 2016
SunMonTueWedThuFriSat
1
3
4
5
6
7
8
9
10
11
13
14
15
16
17
18
19
21
22
23
24
25
26
27
28
29
30
31
    
       
Today