phenix disk¶
Every command on this page also accepts the global flags.
phenix disk¶
Disk image file management
Synopsis¶
Disk image file management
Lists, inspects and changes the disk images in the minimega files
directory, as the Disks page of the web UI does. A disk is a path relative
to the minimega files directory, or an absolute path inside it. The
commands run in the CLI process, and do not need phenix ui to run.
Options¶
SEE ALSO¶
- phenix - A cli application for phēnix
- phenix disk checksum - Print the SHA-256 checksum of a disk image
- phenix disk clone - Copy a disk image to a new file
- phenix disk commit - Write a disk image into its backing image
- phenix disk delete - Delete a disk image
- phenix disk details - Show what phenix reads from a disk image
- phenix disk list - Display a table of disk images
- phenix disk rebase - Change the backing image of a disk image
- phenix disk rename - Rename a disk image
- phenix disk resize - Change the virtual size of a disk image
- phenix disk snapshot - Create a qcow2 snapshot backed by a disk image
phenix disk checksum¶
Print the SHA-256 checksum of a disk image
Synopsis¶
Print the SHA-256 checksum of a disk image
Reads the whole image, which can take a long time for a large image. The
output has the format of sha256sum: the checksum, two spaces and the path.
-o json and -o yaml print the body of GET /disks/checksum.
Options¶
-h, --help help for checksum
-o, --output string Output format (table, json, yaml) (default "table")
SEE ALSO¶
- phenix disk - Disk image file management
phenix disk clone¶
Copy a disk image to a new file
Synopsis¶
Copy a disk image to a new file
<new> is as for phenix disk snapshot, but the copy keeps the format of
<disk>, so it gets the extension of <disk>. A name with the extension of
another image format is refused. The copy never replaces a file. The
command prints the path of the copy.
Options¶
SEE ALSO¶
- phenix disk - Disk image file management
phenix disk commit¶
Write a disk image into its backing image
Synopsis¶
Write a disk image into its backing image
Both images must be inside the minimega files directory. All images backed
by the backing image then see the changes.
Options¶
SEE ALSO¶
- phenix disk - Disk image file management
phenix disk delete¶
Delete a disk image
Synopsis¶
Delete a disk image
Refuses an image that other images use as their backing image, or that
experiments use, and names them. Give --force to delete it anyway: those
images and experiments then cannot start.
Options¶
--dry-run Show what the command would change, and change nothing
--force delete the image even when other images or experiments use it
-h, --help help for delete
SEE ALSO¶
- phenix disk - Disk image file management
phenix disk details¶
Show what phenix reads from a disk image
Synopsis¶
Show what phenix reads from a disk image
Shows the format, sizes, header, partitions and file systems of the image,
the images backed by it, and the VMs whose drives use it, as the details
card of the Disks page does. The image must be in the disk list. -o json
and -o yaml print the body of GET /disks/details.
Options¶
SEE ALSO¶
- phenix disk - Disk image file management
phenix disk list¶
Display a table of disk images
Synopsis¶
Display a table of disk images
Lists the images in the minimega files directory, and the images that the
experiments' topologies use. With --experiment, the topology images are
only those of that experiment. -o json and -o yaml print each image with
the fields of GET /disks. When the file of an image is a symlink, the
Path column also shows its target: link.qc2 -> win/win10.qc2.
Examples¶
# Every VM and ISO image
phenix disk list --type vm,iso
# The images of one experiment, inspected again
phenix disk list --experiment exp1 --refresh
Options¶
-e, --experiment string only the topology images of this experiment
-h, --help help for list
-o, --output string Output format (table, json, yaml) (default "table")
--refresh inspect every image again, not from the cache
--type string only images of these kinds, separated by commas (vm, container, iso, unknown)
SEE ALSO¶
- phenix disk - Disk image file management
phenix disk rebase¶
Change the backing image of a disk image
Synopsis¶
Change the backing image of a disk image
Without --unsafe, qemu writes into <disk> the differences between the old
and the new backing chains, so both chains must stay in the minimega files
directory. With --unsafe, only the name of the backing image changes: use
it only when the new backing image holds the same data. Give --independent
in place of <backing> to copy all data into <disk> and remove its backing
image.
Examples¶
# Rebase onto another base image
phenix disk rebase win10-snap.qcow2 win10-base.qcow2
# Make the image independent of its backing image
phenix disk rebase win10-snap.qcow2 --independent
Options¶
--dry-run Show what the command would change, and change nothing
-h, --help help for rebase
--independent remove the backing image, and copy its data into the image
--unsafe change only the backing image name, and copy no data
SEE ALSO¶
- phenix disk - Disk image file management
phenix disk rename¶
Rename a disk image
Synopsis¶
Rename a disk image
<new> is as for phenix disk clone. The rename never replaces a file. Images
backed by <disk> and experiments that use it do not change, so check
phenix disk details first. The command prints the new path.
Options¶
SEE ALSO¶
- phenix disk - Disk image file management
phenix disk resize¶
Change the virtual size of a disk image
Synopsis¶
Change the virtual size of a disk image
<size> is an integer followed by one of K, M, G, T, P, E: the new size, or
with + or - before it, the change in size. A smaller size removes the data
at the end of the disk. The image must keep all of its data in itself.
Examples¶
Options¶
SEE ALSO¶
- phenix disk - Disk image file management
phenix disk snapshot¶
Create a qcow2 snapshot backed by a disk image
Synopsis¶
Create a qcow2 snapshot backed by a disk image
<new> is relative to the folder of <disk>, or absolute, and must be inside
the minimega files directory. The snapshot gets the .qcow2 extension unless
<new> ends in .qcow2 or .qc2. The command prints the path of the snapshot.
Options¶
SEE ALSO¶
- phenix disk - Disk image file management