Oracle Linux Virtualization Manager (OLVM) (MOSC)

MOSC Banner

automatic OLVM VMs snapshots removal after XY number of days

OLVM version: 4.3.10.4-1.0.26.el7

Dear OLVM gurus!

I would like to put a script in place for handling OLVM VMs snapshots, as our OffShore team usually forgets to remove snapshots. Asked ChatGPT and MS Coopilot for some hints, but their suggestions is not working. Anybody out there handled similar task?

This is what ChatGPT recomends, but of course, I don't see snapshot directory

#!/bin/bash

  1. Define the path to the OLVM snapshots directory
  2. SNAPSHOT_DIR="/path/to/ovlm/snapshots"
  3. Calculate the timestamp for one week ago
  4. ONE_WEEK_AGO=$(date -d "1 week ago" +%s)
  5. Loop through snapshots in the directory

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center