crc-org / osp4

Proof of Concept repository of CodeReady Containers [Archived]
Apache License 2.0
26 stars 16 forks source link

Cannot check QEMU binary /usr/bin/qemu-kvm: No such file or directory #29

Open rbaumgar opened 5 years ago

rbaumgar commented 5 years ago

crc_libvirt.sh create does not run on my RHEL 7.6 CSB

$ ./crc_libvirt.sh create /dev/kvm Loaded plugins: changelog, fs-snapshot, priorities, product-id, refresh-packagekit, rhnplugin, rpm-warm-cache, search-disabled-repos, subscription-manager, verify This system is receiving updates from RHN Classic or Red Hat Satellite. Repository google-chrome is listed more than once in the configuration Repository google-talkplugin is listed more than once in the configuration 12935 packages excluded due to repository priority protections Package libvirt-4.5.0-10.el7_6.3.x86_64 already installed and latest version Package libvirt-devel-4.5.0-10.el7_6.3.x86_64 already installed and latest version Package 10:qemu-kvm-1.5.3-160.el7.x86_64 is obsoleted by 10:qemu-kvm-rhev-2.9.0-16.el7_4.13.x86_64 which is already installed Resolving Dependencies --> Running transaction check ---> Package libvirt-daemon-kvm.x86_64 0:4.5.0-10.el7_6.3 will be installed --> Finished Dependency Resolution

Dependencies Resolved

============================================================================================================================================================================================== Package Arch Version Repository Size

Installing: libvirt-daemon-kvm x86_64 4.5.0-10.el7_6.3 production-rhel-x86_64-workstation-7.6 181 k

Transaction Summary

Install 1 Package

Total download size: 181 k Installed size: 0
Downloading packages: libvirt-daemon-kvm-4.5.0-10.el7_6.3.x86_64.rpm | 181 kB 00:00:00
Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : libvirt-daemon-kvm-4.5.0-10.el7_6.3.x86_64 1/1 Verifying : libvirt-daemon-kvm-4.5.0-10.el7_6.3.x86_64 1/1

Installed: libvirt-daemon-kvm.x86_64 0:4.5.0-10.el7_6.3

Complete! net.ipv4.ip_forward = 1 active Warning: ZONE_ALREADY_SET: '192.168.126.0/24' already bound to 'public' success Warning: ALREADY_ENABLED: '16509:tcp' already in 'public' success Network test1 defined from ./network.xml

Network test1 started

Vol test1-base created

Vol test1-master-0 created

Vol test1-worker-0-98nsr created

error: Failed to define domain from ./master-0.xml error: Cannot check QEMU binary /usr/bin/qemu-kvm: No such file or directory

error: Failed to define domain from ./test1-worker-0-98nsr.xml error: Cannot check QEMU binary /usr/bin/qemu-system-x86_64: No such file or directory

Cluster created successfully use './crc_libvirt.sh start' to start it

praveenkumar commented 5 years ago

@rbaumgar looks like we have a missing package to be installed in the script but can you install qemu-system and then run, make sure use ./crc_libvirt.sh delete first?

]$ sudo dnf whatprovides "/usr/bin/qemu-kvm"
[sudo] password for prkumar: 
Last metadata expiration check: 4:47:04 ago on Mon 04 Feb 2019 11:37:13 AM IST.
qemu-system-x86-core-2:2.11.2-4.fc28.x86_64 : QEMU system emulator for x86
Repo        : @System
Matched from:
Filename    : /usr/bin/qemu-kvm

qemu-system-x86-core-2:2.11.2-4.fc28.x86_64 : QEMU system emulator for x86
Repo        : updates
Matched from:
Filename    : /usr/bin/qemu-kvm

qemu-system-x86-core-2:2.11.1-2.fc28.x86_64 : QEMU system emulator for x86
Repo        : fedora
Matched from:
Filename    : /usr/bin/qemu-kvm
rbaumgar commented 5 years ago

I had to fix multiple issues...

error: Failed to start domain test1-worker-0-98nsr error: Cannot access storage file '/var/lib/libvirt/images/test1-worker-0-98nsr' (as uid:107, gid:107): No such file or directory

The "virsh vol-create-as..." creates the files in my home under VirtualMachines. At start qemu searches at 
/var/lib/libvirt/images/... Copy test1-base and test1-worker-0-98nsr into /var/lib/libvirt/images/

- then the machine does not fit to the environment. "    <type arch='x86_64' machine='pc-i440fx-2.11'>hvm</type>" change to "<type arch='x86_64' machine='pc-i440fx-2.0'>hvm</type>"

After all this changes my OpenShift 4 is up and running and I was able to do things like 

oc get nodes --config=kubeconfig oc get pod --all-namespaces `--config=kubeconfig

gbraad commented 5 years ago

These are RHEL7 related issues. To be honest, we might have to do some further testing around this... at the moment we have only targeted Fedora.

cfergeau commented 5 years ago

On RHEL, qemu-kvm is installed in /usr/libexec/qemu-kvm But you don't need to add an tag at all in your domain definition, libvirt will add it itself.