XEN-DELETE-IMAGE(8)
π 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 therootuser. (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:
- Steve Kemp,
https://steve.fi/ - Axel Beckert,
https://axel.beckert.ch/ - Stephane Jourdois
β 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
- debian bookworm: xen-tools 4.9.2-1
- ubuntu noble: xen-tools 4.9.2-1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms