crc-org / crc

CRC is a tool to help you run containers. It manages a local OpenShift 4.x cluster, Microshift or a Podman VM optimized for testing and development purposes
https://crc.dev
Apache License 2.0
1.26k stars 239 forks source link

[User story] delete #2245

Open gbraad opened 3 years ago

gbraad commented 3 years ago

Description

This command deletes the VM and related files from the disk.

The VM files are stored in ~/.crc/machines/crc/

This command is passed to the hypervisor manager and therefore might not perform a stop beforehand. This depends on the driver.

Options

jsliacan commented 3 years ago

Exit codes: Can crc delete ever fail except for vacuously (when VM does not exist)?

Behavior:

Default:

Is crc delete -f equivalent to rm -rf ~/.crc/machines/crc/*? If not, what happens if a user does this instead of crc delete -f?

Modified:

-f: Is there a practical difference between crc delete and crc delete -f in terms of destroying the VM? The side-effect of -f on this command is not being asked y/N for confirmation.

--clear-cache: delete ~/.crc/machines/crc/<this machine> and ~/.crc/cache? Does --clear-cache ever fail? What happens then?

--output: json? Then crc delete -o json always exits with 0 and JSON output contains the exit status?

Screenshot from 2021-04-21 11-35-04

adrianriobo commented 3 years ago

Add also a link to this possible enhancement on delete (contexts removal) #2375

adrianriobo commented 3 years ago

Delete now takes care of CRC context, should we inspect the state for the file after crc delete? Ensure only affects to crc contexts? also related to https://github.com/code-ready/tray-macos/issues/112

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.