Closed brokedba closed 4 years ago
btw, I was using Virtuabox so I had to upgrade to the las version to enable nested virtualization. Intel VT cpu instruction set (vmx) is now visible in the KVM host but I still have the same error.
[vagrant@localhost ~]$ lsmod | grep kvm
kvm_intel 229376 0
kvm 659456 1 kvm_intel
irqbypass 16384 1 kvm
[root@localhost vagrant]# kcli list product
No configuration found nor local hypervisor
I don't know why but it works now . I wanted to know if this error is normal
`[root@localhost .kcli]# kcli download image centos7
Using pool guest_images
Using url https://cloud.centos.org/centos/7/images/CentOS-7-x86_64-GenericCloud.qcow2...
Grabbing image centos7...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0Warning: Failed to create the file
Warning: /u01/guest_images/CentOS-7-x86_64-GenericCloud.qcow2: No such file or
Warning: directory
0 898M 0 16384 0 0 48761 0 5:22:07 --:--:-- 5:22:07 48761
curl: (23) Failed writing body (0 != 16384)
Image centos7 not Added because Unable to download indicated image`
by the way where is the list of cloud image aliases stored ?? I wanted to download ubuntu but don't know what name to put in the command .
hello,
No configuration found nor local hypervisor
error:
install.sh
takes care of creating the proper alias for you, something like the following:alias kcli="docker run --net host -it --rm --security-opt label=disable -v $HOME/.kcli:/root/.kcli -v /var/lib/libvirt/images:/var/lib/libvirt/images -v /var/run/libvirt:/var/run/libvirt -v $PWD:/workdir -v /var/tmp:/ignitiondir karmab/kcli"
Regarding the error on kcli download, it means kcli couldn't write in the /u01/guest_images directory, which i assume is your pool.
Since you're running containerized, i guess it' s also an alias issue. For container mode to be able to write to your hypervisor (and persist), you'd need an extra volume alias in kcli invocation, something like /u01/guest_images:/u01/guest_images
should do the trick
For a list of could images, you can run kcli download image -h
usage: kcli download image [-h] [-c CMD] [-p POOL] [-u URL] [-s] IMAGE
Download Cloud Image
positional arguments:
IMAGE Image to download. Choose between arch centos6 centos7
centos8 cirros coreos debian8 debian9 debian10
fedora28 fedora29 fedora30 fcos fedora31 freebsd112
freebsd121 netbsd81 netbsd90 openbsd66 gentoo opensuse
rhcos41 rhcos42 rhcos43 rhcos44 rhcos45 rhcoslatest
rhel7 rhel8 ubuntu1804 ubuntu1810 ubuntu1904
ubuntu1910
optional arguments:
-h, --help show this help message and exit
-c CMD, --cmd CMD Extra command to launch after downloading
-p POOL, --pool POOL Pool to use. Defaults to default
-u URL, --url URL Url to use
-s, --skip-profile Skip Profile update
Hi , Thanks a lot for the feedback . I thought there was something wrong with the pool access as well. I just didn't get how to add the container alias for the pool directory in the kcli invocation. Do you know which argument I should ad the alias to ? or is it a separate alias command run beforehand . Thanks
[root@localhost terraform]# kcli download image ubuntu1804 /u01/guest_images:/u01/guest_images
usage: kcli [-h] [-C CLIENT] [--containerclient CONTAINERCLIENT]
[--dnsclient DNSCLIENT] [-d] [-n NAMESPACE] [-r REGION] [-z ZONE]
this alias should do the trick for you
alias kcli="docker run --net host -it --rm --security-opt label=disable -v $HOME/.kcli:/root/.kcli -v /var/lib/libvirt/images:/var/lib/libvirt/images -v /var/run/libvirt:/var/run/libvirt -v $PWD:/workdir -v /var/tmp:/ignitiondir karmab/kcli"
about your example, the command would be
kcli download image ubuntu1804 -p your_pool
where your_pool would be the storage pool associated to your /u01/guest_images directory, which should be listed with the command kcli list pool
also, consider joining my slack channel on k8s for more live troubleshooting https://app.slack.com/client/T09NY5SBT/CU76B52JE
whats your slack workspace ? I wanted to join way before submitting the issue.
Thanks Karmab for your help, Here is a little wrap up of what had to be done to get the above issue resolved. In case other users face the same symptoms.
Adapt the pool parameter in the ~/.kcli/config.yml file accordingly.
Edit the alias for kcli : i.e my pool was named guest_images and the path is : /u01/guest_images The alias will hence look like this :
alias kcli='docker run --net host -it --rm --security-opt label=disable -v /root/.kcli:/root/.kcli -v /root/.ssh:/root/.ssh -v /u01/guest_images:/u01/guest_images -v /var/run/libvirt:/var/run/libvirt -v $PWD:/workdir -v /var/tmp:/ignitiondir karmab/kcli'
# systemctl restart libvirtd
Cheers
Hi , I just installed kvm in my Rhel7 clone (Oracle L7) and when I install kcli and try the list command I receive the below error . Is anything wrong?
`
`