I just tried to create an OpenShift 4.7 cluster using a vCenter appliance that was configured with the "tiny" size from the installer. This gives it 2 vcpus and 10GB RAM. I was using Installer Provided Infrastructure (IPI) on vSphere 6.7. The cluster creation failed with a timeout. I looked at the vCenter server performance stats and saw that it was using all of its CPU and memory. So I destroyed the cluster and doubled the resources on the vCenter VM. I then ran the cluster creation again, and everything completed as expected.
Monday, March 22, 2021
Tuesday, March 16, 2021
Troubleshooting Red Hat CodeReady Containers
Background
Environment
Guest VM
crc VM log file
virsh command
virsh list --all
virt-manager
You can then click on the crc VM to see the console. There is no way to actually log into the crc VM because you can only log in via the core user's private key (shown later). Googling around, I see that password access has been requested/suggested, but there appears to be no plan to implement it at this time.
crc VM
crc pods log files
ssh -i ~/.crc/machines/crc/id_ecdsa core@api.crc.testing
That's all for now
As I said in the beginning, I just included a few tools, but this is more than in the product documentation. CRC and OpenShift are really complex frameworks that rely on tons of components like libvirt, Kubernetes, and tons of other complex components. It is understandable why it's so hard to troubleshoot. However, I personally believe that the development team could include more logging information in the web console itself so that users/operators of the system have access to the data without having to separately open a terminal window.Monday, March 15, 2021
Increasing the crc VM disk size for CodeReady Containers
Background
Versions and hardware specs
Start
First Issue
libguestfs-tools
libguestfs-xfs
Increase the disk size of the crc.qcow2 image
CRC_MACHINE_IMAGE=${HOME}/crc.qcow2
sudo qemu-img resize ${CRC_MACHINE_IMAGE} +900G
sudo cp ${CRC_MACHINE_IMAGE}
${CRC_MACHINE_IMAGE}.ORIGINAL
# user qemu needs access to the file AND the directory
containing the file.
sudo chown qemu.qemu crc*
sudo mv crc* /tmp
cd /tmp
sudo virt-resize --expand /dev/vda4
${CRC_MACHINE_IMAGE}.ORIGINAL ${CRC_MACHINE_IMAGE}
# The above command took 30+ minutes on my machine.
This is
what success looks like at the end of the command:
Resize
operation completed with no errors.
carefully
check that the resized disk boots and works correctly.
Before deleting the old disk,
Copy the crc.qcow2 file back
Get the sha256sum value and size of the file
sha256sum crc.qcow2
01839ceda9cad333d7ae9f5033a54c528698ec70bdde2077a7669efd9cf923c9
Edit the crc-bundle-info.json file
Why?
Now run 'crc start'
INFO Creating CodeReady Containers VM for
OpenShift 4.7.0...
Error creating machine: Error creating the
VM: Error creating machine: Error in driver during machine creation: current
disk image capacity is bigger than the requested size (999653638144 >
33285996544)
ssh -i ~/.crc/machines/crc/id_ecdsa core@api.crc.testing