crc-org / crc-extension

Red Hat OpenShift Local Extension for integration of OpenShift Local clusters with Podman Desktop
Apache License 2.0
18 stars 21 forks source link

VM start failure is not reported in UI #243

Open jeffmaury opened 3 months ago

jeffmaury commented 3 months ago

To reproduce, create and start a CRC VM with 4.5GB of memory

General information

Expected

VM start will fail (unaligned memory size) and error is reported into UI

Actual

VM start but UI says created !

lstocchi commented 3 months ago

Not able to replicate :/

crc config view
- consent-telemetry                     : no
- cpus                                  : 6
- disk-size                             : 32
- memory                                : 4500
- preset                                : microshift
- pull-secret-file                      : C:\Users\baldr\Downloads\pull-secret.txt
crc start
WARN A new version (2.39.0) has been published on https://developers.redhat.com/content-gateway/file/pub/openshift-v4/clients/crc/2.39.0/crc-windows-installer.zip
INFO Using bundle path C:\Users\baldr\.crc\cache\crc_microshift_hyperv_4.15.17_amd64.crcbundle
INFO Checking minimum RAM requirements
INFO Check if Podman binary exists in: C:\Users\baldr\.crc\bin\oc
INFO Checking if running in a shell with administrator rights
INFO Checking Windows release
INFO Checking Windows edition
INFO Checking if Hyper-V is installed and operational
INFO Checking if Hyper-V service is enabled
INFO Checking if crc-users group exists
INFO Checking if current user is in crc-users and Hyper-V admins group
INFO Checking if vsock is correctly configured
INFO Checking if the win32 background launcher is installed
INFO Checking if the daemon task is installed
INFO Checking if the daemon task is running
INFO Checking admin helper service is running
INFO Checking SSH port availability
INFO Loading bundle: crc_microshift_hyperv_4.15.17_amd64...
INFO Creating CRC VM for MicroShift 4.15.17...
INFO Generating new SSH key pair...
INFO Starting CRC VM for microshift 4.15.17...
INFO CRC instance is running with IP 127.0.0.1
INFO CRC VM is running
INFO Updating authorized keys...
INFO Extending and resizing '/dev/rhel/root' logical volume
INFO Resizing /dev/sda5 filesystem
INFO Check internal and public DNS query...
INFO Check DNS query from host...
INFO Starting Microshift service... [takes around 1min]
INFO Waiting for kube-apiserver availability... [takes around 2min]
INFO Adding microshift context to kubeconfig...
Started the MicroShift cluster.

Use the 'oc' command line interface:
  PS> & crc oc-env | Invoke-Expression
  PS> oc COMMAND
jeffmaury commented 3 months ago

Settings the memory to 4.5GB in UI will set memory to 4291 in crc config:

crc config view
- consent-telemetry                     : no
- disk-size                             : 32
- memory                                : 4291
- preset                                : microshift
lstocchi commented 3 months ago

Settings the memory to 4.5GB in UI will set memory to 4291 in crc config:

crc config view
- consent-telemetry                     : no
- disk-size                             : 32
- memory                                : 4291
- preset                                : microshift

Not sure if we can do much here bc the values in the UI are displayed in bytes, but then in CRC we save them in bits (MiB,/GiB) so there is a conversion which happens behind. And the conversion is actually correct

jeffmaury commented 3 months ago

Settings the memory to 4.5GB in UI will set memory to 4291 in crc config:

crc config view
- consent-telemetry                     : no
- disk-size                             : 32
- memory                                : 4291
- preset                                : microshift

Not sure if we can do much here bc the values in the UI are displayed in bytes, but then in CRC we save them in bits (MiB,/GiB) so there is a conversion which happens behind. And the conversion is actually correct

I agree I'm just requesting the error to be reported when starting/creating the VM