XEN-DELETE-IMAGE(8)

πŸ“¦
version 4.9.2 Β· 4 versions
, in debian bookworm, ubuntu noble

πŸ’– xen-delete-image β€” the manual, but make it make sense πŸ’–

okay bestie, gather round, because this one is the manual page for xen-delete-image, part of the Perl Programmers Reference Guide set of pages (the (8) bit means it's a sysadmin-y command, iykyk). It's a little Perl script, and honestly? It's giving "cleanup era." ✨


✨ NAME ✨

xen-delete-image β€” delete previously created Xen instances. πŸ’…

Like. It deletes them. That's the whole job. She's simple, she's efficient, she's an icon.


πŸ¦‹ SYNOPSIS πŸ¦‹

xen-delete-image [options] [--hostname=]imageName1 [--hostname=]imageName2

And here's the full menu of flags, grouped exactly how the script groups them:

Filename Options:

  • --extension β€” specify the file extension to use. An empty extension is equal to any extension.

Help Options:

  • --help β€” show help information.
  • --manual β€” read the manual for this script.
  • --version β€” show the version information and exit.
  • --verbose β€” show diagnostic output.

General options:

  • --dir β€” specify the output directory where images were previously saved.
  • --evms β€” specify the EVMS container to use.
  • --lvm β€” specify the LVM volume to use.
  • --zpool β€” specify the ZFS pool to use.

Specifying hosts:

  • --hostname β€” specify the image name to delete.

Testing options:

  • --test β€” don't complain if we're not invoked by root.

πŸŽ€ OPTIONS πŸŽ€

  • --dir β€” specify the output directory where images were previously saved. πŸ—‚οΈ
  • --evms β€” specify the EVMS container where images were previously saved.
  • --help β€” show help information.
  • --hostname β€” specify the hostname to delete.
  • --lvm β€” specify the LVM volume group where images were previously saved.
  • --zpool β€” specify the ZFS pool where images were previously saved.
  • --manual β€” read the manual for this script.
  • --test β€” do not complain, or exit, if the script is not executed by the root user. (Only works in conjunction with --dir.) πŸ‘€
  • --version β€” show the version number and exit.

🌸 DESCRIPTION 🌸

xen-delete-image is a simple script which allows you to delete Xen instances which have previously been created by xen-create-image. It's the reverse uno card of the xen-tools family. πŸ”₯

You must be root to run this script as it removes the Xen configuration file from /etc/xen and potentially removes LVM and EVMS volumes. No root, no deletion, no exceptions, bestie.

(When invoked with the --test flag the script will continue running, but will fail to remove anything which the user does not have permission to delete.)

🌈 LOOPBACK EXAMPLE 🌈

Let's say you have three images β€” 'foo', 'bar', and 'baz' β€” stored beneath /home/xen. The first two may be deleted via:

xen-delete-image --dir=/home/xen foo bar

You may also delete them by running:

xen-delete-image --dir=/home/xen --hostname=foo --hostname=bar

Both routes, same destination. Choose your fighter. 🫢

(The matching Xen configuration files beneath /etc/xen will also be removed.)

πŸ’œ LVM EXAMPLE πŸ’œ

Now let's say you have the volume group 'skx-vol' containing three Xen instances β€” 'foo', 'bar', and 'baz'. The first two may be deleted via:

xen-delete-image --lvm=skx-vol foo bar

This will remove the volumes 'foo-disk', 'foo-swap', 'bar-disk', and 'bar-swap'. Four volumes, one command, absolutely ate. πŸ’…

Note that if the images were created with --noswap then the swap volumes will not be present, so will not need to be deleted.

The Xen configuration files will also be removed from beneath /etc/xen.


🧚 EVMS EXAMPLE 🧚

And finally, say you have the container 'mycontainer' containing three Xen instances β€” 'foo', 'bar', and 'baz'. The first two may be deleted via:

xen-delete-image --evms=lvm2/mycontainer --hostname=foo --hostname=bar

This will remove the volumes 'foo-disk', 'foo-swap', 'bar-disk', and 'bar-swap'.

Note that if the images were created with --noswap then the swap volumes will not be present, so will not need to be deleted.

The Xen configuration files will also be removed.


πŸ‘‘ AUTHORS πŸ‘‘

These are the legends who built her:


⭐ LICENSE ⭐

Copyright (c) 2005-2009 by Steve Kemp, (c) 2010-2013 by The Xen-Tools Development Team. All rights reserved.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The LICENSE file contains the full text of the license.


okay that's the whole page, you're officially certified in xen-delete-image πŸ’– this is from version 4.9.2, dated 2023-02-06, and it's part of the Perl Programmers Reference Guide β€” go forth and delete responsibly, bestie, and remember: root only, no cap. πŸŽ€βœ¨

πŸ“¦ where this page comes from