Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to start CRC on Google cloud VM #4638

Open
kansal-mukul opened this issue Feb 25, 2025 · 13 comments
Open

Unable to start CRC on Google cloud VM #4638

kansal-mukul opened this issue Feb 25, 2025 · 13 comments
Labels
kind/bug Something isn't working

Comments

@kansal-mukul
Copy link

General information

I am access of google cloud on which i spin up one VM and trying to start CRC but everytime i am getting please enable virtualization. i follow this blog : https://www.redhat.com/en/blog/codeready-containers . I tried with many OS (Centos , RHEL etc) but everytime i am not able to run crc setup command . please help and share the correct documents with full steps .

Image

Operating System

Linux

Hypervisor

KVM

Did you run crc setup before crc start?

no

Running on

VM

Steps to reproduce

  1. gcloud compute instances create crc-rhel-vm
    --zone=us-east1-b
    --machine-type=c2-standard-8
    --image-family=rhel-8
    --image-project=rhel-cloud
    --boot-disk-size=200GB
    --boot-disk-type=pd-standard
    --no-address
    --min-cpu-platform="Intel Cascade Lake"
    --metadata=startup-script='#!/bin/bash
    sudo yum module install -y virt
    sudo yum install -y virt-install virt-viewer
    sudo systemctl start libvirtd
    sudo systemctl enable libvirtd
    sudo virt-host-validate'
  2. ssh into the VM and run sudo dnf install NetworkManager
  3. curl -LO https://developers.redhat.com/content-gateway/rest/mirror/pub/openshift-v4/clients/crc/latest/crc-linux-amd64.tar.xz

tar -xvf crc-linux-amd64.tar.xz
mkdir -p ~/bin
cp /home/mukul_kansal/crc-linux-2.47.0-amd64/crc ~/bin
export PATH=$PATH:$HOME/bin
echo 'export PATH=$PATH:$HOME/bin' >> ~/.bashrc
cd crc-linux-2.47.0-amd64/
crc setup

CRC version

CRC status

CRC config

Host Operating System

centos 8 , RHEL . i tried both

Expected behavior

it should complete the CRC setup

Actual behavior

Image

CRC Logs

Additional context

PLease help on this ASAP . this is very urgent because i am working on one POC so planning to use this CRC cluster for further development,

@kansal-mukul kansal-mukul added the kind/bug Something isn't working label Feb 25, 2025
@praveenkumar
Copy link
Member

praveenkumar commented Feb 25, 2025

@kansal-mukul you need to enable the nested virtualization flag on Google cloud if you want to use the OpenShift Local because it does create a VM https://cloud.google.com/compute/docs/instances/nested-virtualization/enabling

Any specific reason you can't use your laptop for POC?

@kansal-mukul
Copy link
Author

I added this flag (--metadata=google-compute-enable-nested-virtualization=true)in above gcloud command for enable virtualization but that everytime shows that you need to enable virtualization (above screenshot).

I am using windows laptop (that dont have admin rights) . One more reason to use VM as in google cloud we have lots of resources that may required while using CRC for further deployment of application like velero, operators etc. and might we need loadbalancer . So thats teh reason . PLease help @praveenkumar

@praveenkumar
Copy link
Member

Have a look to https://github.com/ironcladlou/openshift4-libvirt-gcp/blob/master/provision.sh#L41-L47 one.

might we need loadbalancer

I don't think this can be enabled on CRC side you might need to take a look to https://github.com/crc-org/crc-cloud one

@kansal-mukul
Copy link
Author

kansal-mukul commented Feb 26, 2025

@praveenkumar thanks for sharing but I tried with above video as well but getting error "/lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found".

Below is the command that i ran 👍
gcloud compute disks create crc-disk --image-project ubuntu-os-pro-cloud --image-family ubuntu-pro-1804-lts --zone us-central1-a

gcloud compute images create crc-v4-image --source-disk crc-disk --source-disk-zone us-central1-a --licenses "https://www.googleapis.com/compute/v1/projects/vm-options/global/licenses/enable-vmx"

gcloud compute disks delete crc-disk --zone=us-central1-a

gcloud compute images delete crc-v4-image

sudo apt-get update

sudo apt-get install --assume-yes qemu-kvm libvirt-daemon libvirt-daemon-system dnsmasq

sudo usermod -a -G libvirt $(whoami)

sudo usermod -a -G libvirt-qemu $(whoami)

sudo usermod -a -G libvirt-dnsmasq $(whoami)

groups $(whoami)

sudo reboot

cat << EOF | sudo tee /etc/systemd/resolved.conf > /dev/null
[Resolve]
DNS=127.0.0.2
Domains=apps-crc.testing crc.testing
EOF

sudo sed -i 's/#listen-address=/listen-address=127.0.0.2/g' /etc/dnsmasq.conf

cat << EOF | sudo tee /etc/default/dnsmasq > /dev/null
DOMAIN_SUFFIX=''
ENABLED=1
CONFIG_DIR=/etc/dnsmasq.d,.dpkg-dist,.dpkg-old,.dpkg-new
IGNORE_RESOLVCONF=yes
EOF

cat << EOF | sudo tee /etc/dnsmasq.d/crc.conf > /dev/null
address=/crc.testing/192.168.130.11
address=/apps-crc.testing/192.168.130.11
server=/#/8.8.8.8
EOF

sudo systemctl restart systemd-resolved
sudo systemctl restart dnsmasq

dig foo.apps-crc.testing | echo $(grep 192.168.130.11)
dig api.crc.testing | echo $(grep 192.168.130.11)

curl -LO https://mirror.openshift.com/pub/openshift-v4/clients/crc/latest/crc-linux-amd64.tar.xz && tar -Jxvf crc-linux-amd64.tar.xz && mkdir -p /bin && export PATH=$PATH:/bin && mv crc-linux*/crc ~/bin/ && rm -rf crc*

crc config set skip-check-network-manager-installed true then getting error

@kansal-mukul
Copy link
Author

IN this article they mentioned that this is not supported . https://crc.dev/docs/installing/

Ubuntu 18.04 LTS or later and Debian 10 or later
Not supported.

Might require manual set up of the host machine.

@kansal-mukul
Copy link
Author

Can you suggest which kmage and image family we have to use on which crc will install successfully .

Example :
gcloud compute images create crc-v4-image --source-disk crc-disk --source-disk-zone us-central1-a --licenses "https://www.googleapis.com/compute/v1/projects/vm-options/global/licenses/enable-vmx"

@kansal-mukul
Copy link
Author

I tried with these commands : gcloud compute disks create crc-disk --image-project ubuntu-os-cloud --image-family ubuntu-2204-lts --zone us-central1-a

gcloud compute images create crc-v4-image --source-disk crc-disk --source-disk-zone us-central1-a --licenses "https://www.googleapis.com/compute/v1/projects/vm-options/global/licenses/enable-vmx"

gcloud compute instances create crc-vm --disk name=crc-disk,boot=yes --zone us-central1-a --machine-type n1-standard-8 --metadata=google-compute-enable-nested-virtualization=true --no-address

error 👍

Last login: Thu Feb 27 10:45:36 2025 from 35.235.241.17
mukul_kansal@crc-vm:~$ crc setup
INFO Using bundle path /home/mukul_kansal/.crc/cache/crc_libvirt_4.17.14_amd64.crcbundle
INFO Checking if running as non-root
INFO Checking if running inside WSL2
INFO Checking if crc-admin-helper executable is cached
INFO Checking if running on a supported CPU architecture
INFO Checking if crc executable symlink exists
INFO Checking minimum RAM requirements
INFO Check if Podman binary exists in: /home/mukul_kansal/.crc/bin/oc
INFO Checking if Virtualization is enabled
INFO Setting up virtualization
You need to enable virtualization in BIOS

@kansal-mukul
Copy link
Author

gcloud compute disks create crc-disk --image-project ubuntu-os-pro-cloud --image-family ubuntu-pro-1804-lts --zone us-central1-a

gcloud compute images create crc-v4-image --source-disk crc-disk --source-disk-zone us-central1-a --licenses "https://www.googleapis.com/compute/v1/projects/vm-options/global/licenses/enable-vmx"

gcloud compute instances create crc-vm --disk name=crc-disk,boot=yes --zone us-central1-a --machine-type n1-standard-8 --min-cpu-platform "Intel Haswell" --enable-nested-virtualization --no-address

Getting this error while running crc setup : crc: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found (required by crc)

@cfergeau
Copy link
Contributor

cfergeau commented Feb 27, 2025

/lib/x86_64-linux-gnu/libc.so.6: version 'GLIBC_2.28' not found is expected when using ubuntu-pro-1804-lts. We should update our docs, but at best we'd be "supporting" 22.04

@kansal-mukul
Copy link
Author

As per documentation : Ubuntu 18.04 LTS or later and Debian 10 or later
Not supported.

Which ubuntu we have to use ? Is this means Ubuntu 18.04 LTS or later is not supported

Check Ref Link : https://crc.dev/docs/installing/

IN video https://www.youtube.com/watch?v=apV_nhEb4Ss they are using ubuntu-1804-lts

@cfergeau
Copy link
Contributor

IN video https://www.youtube.com/watch?v=apV_nhEb4Ss they are using ubuntu-1804-lts

but this video is 4 years old, we can't support linux distributions forever.

@kansal-mukul
Copy link
Author

kansal-mukul commented Feb 28, 2025

@cfergeau So please suggest distribution i should use

gcloud compute disks create crc-disk --image-project --image-family --zone us-central1-a

gcloud compute images create crc-v4-image --source-disk crc-disk --source-disk-zone us-central1-a --licenses "https://www.googleapis.com/compute/v1/projects/vm-options/global/licenses/enable-vmx"

gcloud compute instances create crc-vm --disk name=crc-disk,boot=yes --zone us-central1-a --machine-type n1-standard-8 --min-cpu-platform "Intel Haswell" --enable-nested-virtualization --no-address

@cfergeau
Copy link
Contributor

I'd recommend something fedora/rhel/centos based, and less than 2 years old as this is what we are testing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants