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

libvirt: Could not find any guests for architecure type hvm/x86_64 #570

Closed
jianzhangbjz opened this issue Oct 30, 2018 · 20 comments
Closed

Comments

@jianzhangbjz
Copy link

jianzhangbjz commented Oct 30, 2018

Version

Sorry, I cannot provide the version now. I clone and build it today, may be the latest version. I will provide the exact version later.

$ openshift-install version

Platform (aws|libvirt|openshift):

libevirt

What happened?

[root@dhcp-140-58 installer]# ./bin/openshift-install create cluster --log-level debug
...
...
...
Error: Error applying plan:
 
2 error(s) occurred:
 
* module.bootstrap.libvirt_domain.bootstrap: 1 error(s) occurred:
 
* libvirt_domain.bootstrap: Error defining libvirt domain: virError(Code=8, Domain=44, Message='invalid argument: could not find capabilities for domaintype=kvm ')
* libvirt_domain.master: 1 error(s) occurred:
 
* libvirt_domain.master: Error defining libvirt domain: virError(Code=8, Domain=44, Message='invalid argument: could not find capabilities for domaintype=kvm ')
 
Terraform does not automatically rollback in the face of errors.
Instead, your Terraform state file has been partially updated with
any resources that successfully completed. Please address the error
above and apply again to incrementally change your infrastructure.
FATAL Error executing openshift-install: exit status 1

What you expected to happen?

create the cluster successfully.

How to reproduce it (as minimally and precisely as possible)?

Not sure. I just followed the https://github.com/openshift/installer/blob/master/docs/dev/libvirt-howto.md step by step.

$ no console

Anything else we need to know?

I used Fedora 25 for this building, I'm upgrading it to 28, and then have a try.

References

By the way, how can I build the 4.0 cluster in the MacOS?

@wking
Copy link
Member

wking commented Oct 30, 2018

* libvirt_domain.master: Error defining libvirt domain: virError(Code=8, Domain=44, Message='invalid argument: could not find capabilities for domaintype=kvm ')

I expect this is an old or broken libvirt/QEMU/kernel setup. We'll see if your Fedora upgrade helps.

By the way, how can I build the 4.0 cluster in the MacOS?

More OS X discussion in #201.

@jianzhangbjz
Copy link
Author

@wking I upgrade my Fedora to 27 from 25, but still got the below errors. What do you suggest? Thanks!

[jzhang@dhcp-140-18 installer]$ ./bin/openshift-install create cluster
? Image [? for help] (http://aos-ostree.rhev-ci-vms.eng.rdu2.redhat.com/rhcos/images/cloud/late? Image http://aos-ostree.rhev-ci-vms.eng.rdu2.redhat.com/rhcos/images/cloud/latest/rhcos-qemu.qcow2.gz
INFO Fetching OS image...                         
INFO Using Terraform to create cluster...         
ERROR Error: Error applying plan:

2 error(s) occurred:

* libvirt_domain.master: 1 error(s) occurred:

* libvirt_domain.master: Error defining libvirt domain: virError(Code=8, Domain=44, Message='invalid argument: could not find capabilities for domaintype=kvm ')
* module.bootstrap.libvirt_domain.bootstrap: 1 error(s) occurred:

* libvirt_domain.bootstrap: Error defining libvirt domain: virError(Code=8, Domain=44, Message='invalid argument: could not find capabilities for domaintype=kvm ')

Terraform does not automatically rollback in the face of errors.
Instead, your Terraform state file has been partially updated with
any resources that successfully completed. Please address the error
above and apply again to incrementally change your infrastructure. 
FATAL Error executing openshift-install: exit status 1 

System info:

[jzhang@dhcp-140-18 installer]$ cat /etc/redhat-release 
Fedora release 27 (Twenty Seven)
[jzhang@dhcp-140-18 installer]$ uname -a
Linux dhcp-140-18.nay.redhat.com 4.13.9-300.fc27.x86_64 #1 SMP Mon Oct 23 13:41:58 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

@wking
Copy link
Member

wking commented Oct 31, 2018

Can you provide:

$ openshift-install version
$ ~/.terraform.d/plugins/terraform-libvirt-provider -version
$ cat /proc/cpuinfo
$ lsmod | grep kvm

? The last two are suggested here.

@jianzhangbjz
Copy link
Author

Sure, as below:

[jzhang@dhcp-140-18 installer]$ ./bin/openshift-install version
./bin/openshift-install v0.3.0-75-gc9fe6c03ae21e0bb2d72953111a535d550a47302
Terraform v0.11.8

Your version of Terraform is out of date! The latest version
is 0.11.10. You can update by downloading from www.terraform.io/downloads.html

[jzhang@dhcp-140-18 installer]$ ~/.terraform.d/plugins/terraform-provider-libvirt  -version
/home/jzhang/.terraform.d/plugins/terraform-provider-libvirt was not built correctly
Compiled against library: libvirt 3.7.0
Using library: libvirt 3.7.0
Running hypervisor: QEMU 2.10.0
Running against daemon: 3.7.0

@wking
Copy link
Member

wking commented Oct 31, 2018

Can you also provide the cpuinfo and lsmod output? (Sorry, I'd amended my previous comment to ask for those too)

@ghost
Copy link

ghost commented Oct 31, 2018

@wking Related with BIOS intel virtualization switchs?

@wking
Copy link
Member

wking commented Oct 31, 2018

Related with BIOS intel virtualization switchs?

Could be. The comment I linked earlier suggests the error message comes from broken/missing KVM, but I'm not familiar enough with KVM to know how it's likely to break.

@ghost
Copy link

ghost commented Oct 31, 2018

@wking thanks, and make sense

@jiajliu
Copy link
Contributor

jiajliu commented Oct 31, 2018

I hit a similar issue when create cluster on libvirt.

Error: Error applying plan:

2 error(s) occurred:

* module.bootstrap.libvirt_domain.bootstrap: 1 error(s) occurred:

* libvirt_domain.bootstrap: [DEBUG] Could not find any guests for architecure type hvm/x86_64
* libvirt_domain.master: 1 error(s) occurred:

* libvirt_domain.master: [DEBUG] Could not find any guests for architecure type hvm/x86_64

Terraform does not automatically rollback in the face of errors.
Instead, your Terraform state file has been partially updated with
any resources that successfully completed. Please address the error
above and apply again to incrementally change your infrastructure.


FATAL Error executing openshift-install: exit status 1 

@wking wking changed the title create cluster error: Error defining libvirt domain: libvirt: could not find capabilities for domaintype=kvm Oct 31, 2018
@wking
Copy link
Member

wking commented Oct 31, 2018

* libvirt_domain.master: [DEBUG] Could not find any guests for architecure type hvm/x86_64

What CPU are you on? That looks like dmacvicar/terraform-provider-libvirt#262.

@ghost
Copy link

ghost commented Oct 31, 2018

@jianzhangbjz
Copy link
Author

@wjiangjay cool! Thanks a lot!

@jianzhangbjz
Copy link
Author

@wking Thank you. I also encountered the above errors @jiajliu said.
I running an RHEL 7.3 instance on OpenStack. And then, create the cluster in this instance. But, failed:

INFO Using Terraform to create cluster...         
ERROR Error: Error applying plan:

2 error(s) occurred:

* module.bootstrap.libvirt_domain.bootstrap: 1 error(s) occurred:

* libvirt_domain.bootstrap: [DEBUG] Could not find any guests for architecure type hvm/x86_64
* libvirt_domain.master: 1 error(s) occurred:

* libvirt_domain.master: [DEBUG] Could not find any guests for architecure type hvm/x86_64

Terraform does not automatically rollback in the face of errors.
Instead, your Terraform state file has been partially updated with
any resources that successfully completed. Please address the error
above and apply again to incrementally change your infrastructure. 
FATAL Error executing openshift-install: exit status 1

System info:

[root@preserved-cluster-up-ui-long-term-use installer]$ uname -a
Linux preserve-olm.localdomain 3.10.0-514.26.1.el7.x86_64 #1 SMP Tue Jun 20 01:16:02 EDT 2017 x86_64 x86_64 x86_64 GNU/Linux
[root@preserved-cluster-up-ui-long-term-use installer]$ cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 7.3 (Maipo)

CPU info(8 vcpu, 16G):

[root@preserved-cluster-up-ui-long-term-use installer]$ cat /proc/cpuinfo 
processor	: 0
vendor_id	: GenuineIntel
cpu family	: 6
model		: 85
model name	: Intel(R) Xeon(R) Gold 6152 CPU @ 2.10GHz
stepping	: 4
microcode	: 0x1
cpu MHz		: 2095.078
cache size	: 16384 KB
physical id	: 0
siblings	: 1
core id		: 0
cpu cores	: 1
apicid		: 0
initial apicid	: 0
fpu		: yes
fpu_exception	: yes
cpuid level	: 13
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon rep_good nopl xtopology eagerfpu pni pclmulqdq vmx ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch arat tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx avx512f avx512dq rdseed adx smap clflushopt clwb avx512cd avx512bw avx512vl xsaveopt xsavec xgetbv1
bogomips	: 4190.15
clflush size	: 64
cache_alignment	: 64
address sizes	: 46 bits physical, 48 bits virtual
power management:
...
...
...

You can also access the OpenStack Instances with your libra key, search preserve-olm instance, and debug on it. Thanks a lot!

@jianzhangbjz
Copy link
Author

I guess the original problem could not find capabilities for domaintype=kvm can be addressed by the approach provided by @wjiangjay So, I changed the title to show the new problem: Could not find any guests for architecure type hvm/x86_64

@jianzhangbjz jianzhangbjz changed the title libvirt: could not find capabilities for domaintype=kvm libvirt: Could not find any guests for architecure type hvm/x86_64 Oct 31, 2018
@jiajliu
Copy link
Contributor

jiajliu commented Nov 1, 2018

* libvirt_domain.master: [DEBUG] Could not find any guests for architecure type hvm/x86_64

What CPU are you on? That looks like dmacvicar/terraform-provider-libvirt#262.

The host with libvirt and installer on it is a vm on openstack.
[root@preserve-installer-4 ~]# uname -a
Linux preserve-installer-4.0 3.10.0-862.14.4.el7.x86_64 #1 SMP Fri Sep 21 09:07:21 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
[root@preserve-installer-4 ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.5 (Maipo)

[root@preserve-installer-4 ~]# cat /proc/cpuinfo
...
processor : 15
vendor_id : GenuineIntel
cpu family : 6
model : 85
model name : Intel(R) Xeon(R) Gold 6152 CPU @ 2.10GHz
stepping : 4
microcode : 0x1
cpu MHz : 2095.078
cache size : 16384 KB
physical id : 15
siblings : 1
core id : 0
cpu cores : 1
apicid : 15
initial apicid : 15
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon rep_good nopl xtopology eagerfpu pni pclmulqdq vmx ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx avx512f avx512dq rdseed adx smap clflushopt clwb avx512cd avx512bw avx512vl xsaveopt xsavec xgetbv1 arat pku ospke spec_ctrl intel_stibp
bogomips : 4190.15
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:

@xsgordon
Copy link
Member

xsgordon commented Nov 16, 2018

The reason you hit Could not find any guests for architecure type hvm/x86_64 or at least the reason I did was that the instructions never actually tell you to install qemu, they assume that installing libvirt pulls it in but this is not the case.

You need to explicitly yum install qemu-kvm (or preferably qemu-kvm-[rh]ev if you are on RHEL/CentOS). See also:

#690

@jianzhangbjz
Copy link
Author

@xsgordon Thanks! I will have a try later. Or @jiajliu Does it work now? If yes, could you help post the approach here so that we can close this issue? Thanks!

@crawford
Copy link
Contributor

crawford commented Jan 4, 2019

Closing due to inactivity.

@openshift-ci-robot
Copy link
Contributor

@crawford: Closing this issue.

In response to this:

Closing due to inactivity.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@nathan-b
Copy link

For what it's worth, I was hitting a similar issue to this on Arch Linux, and installing qemu got me past that hurdle. Thanks, @xsgordon!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants