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 242 forks source link

Machine disk file not deleted after crc delete #4319

Closed jeffmaury closed 3 months ago

jeffmaury commented 3 months ago

General information

CRC version

CRC version: 2.40.0+a14925
OpenShift version: 4.16.4
MicroShift version: 4.16.4

CRC status

DEBU CRC version: 2.40.0+a14925
DEBU OpenShift version: 4.16.4
DEBU MicroShift version: 4.16.4
DEBU Running 'crc status'
Machine does not exist. Use 'crc start' to create it

CRC config

# Put `crc config view` output here
- preset                                : microshift

Host Operating System

# Put the output of `cat /etc/os-release` in case of Linux
# put the output of `sw_vers` in case of Mac
# Put the output of `systeminfo` in case of Windows

Steps to reproduce

  1. crc start
  2. crc delete

Expected

The .vhdx file is removed from the .crc/cache folder

Actual

ls crc_microshift_hyperv_4.16.4_amd64
crc-bundle-info.json  crc.vhdx  id_ecdsa_crc  kubeconfig  oc.exe  podman.exe

Logs

Before gather the logs try following if that fix your issue

$ crc delete -f
$ crc cleanup
$ crc setup
$ crc start --log-level debug

Please consider posting the output of crc start --log-level debug on http://gist.github.com/ and post the link in the issue.

praveenkumar commented 3 months ago

@jeffmaury We don't remove disk image from cache folder as part of delete because it is used as part of start and every start we don't want to extract bundle. this disk image is copied to other location ( $HOME/.crc/machine) as part of start and then removed when delete happen.

I don't this this is a bug.

jeffmaury commented 3 months ago

Yeah I was just a bit puzzled by the disk space as every update and setup create such a folder