KVM-VMI / kvm-vmi

KVM-based Virtual Machine Introspection
https://kvm-vmi.github.io/kvm-vmi/master/
314 stars 60 forks source link

vagrant up --provider libvirt failed #154

Closed Glen233 closed 1 year ago

Glen233 commented 1 year ago

Hi, I got an error when I run sudo vagrant up --provider libvirt
image

I can use vagrant ssh to connect the kvmi. But after reloading I can't.
image

By the way, I'm sure I've turned off the firewall.

Glen233 commented 1 year ago

TASK [compile kvm self-tests] ** task path: /vagrant/vagrant/ansible/playbook_2.yml:19

ESTABLISH LOCAL CONNECTION FOR USER: vagrant EXEC /bin/sh -c 'echo ~vagrant && sleep 0' EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/vagrant/.ansible/tmp `"&& mkdir /home/vagrant/.ansible/tmp/ansible-tmp-1687179922.586745-1127-138985071448992 && echo ansible-tmp-1687179922.586745-1127-138985071448992="` echo /home/vagrant/.ansible/tmp/ansible-tmp-1687179922.586745-1127-138985071448992 `" ) && sleep 0' Using module file /usr/lib/python3/dist-packages/ansible/modules/system/make.py PUT /home/vagrant/.ansible/tmp/ansible-local-1018wfsfk_u_/tmp7fs7uwyj TO /home/vagrant/.ansible/tmp/ansible-tmp-1687179922.586745-1127-138985071448992/AnsiballZ_make.py EXEC /bin/sh -c 'chmod u+x /home/vagrant/.ansible/tmp/ansible-tmp-1687179922.586745-1127-138985071448992/ /home/vagrant/.ansible/tmp/ansible-tmp-1687179922.586745-1127-138985071448992/AnsiballZ_make.py && sleep 0' EXEC /bin/sh -c '/usr/bin/python /home/vagrant/.ansible/tmp/ansible-tmp-1687179922.586745-1127-138985071448992/AnsiballZ_make.py && sleep 0' EXEC /bin/sh -c 'rm -f -r /home/vagrant/.ansible/tmp/ansible-tmp-1687179922.586745-1127-138985071448992/ > /dev/null 2>&1 && sleep 0' changed: [kvmi] => changed=true chdir: /vagrant/kvm/tools/testing/selftests/kvm file: null invocation: module_args: chdir: /vagrant/kvm/tools/testing/selftests/kvm file: null params: DEBUG: 1 TEST_GEN_PROGS_x86_64: x86_64/kvmi_test target: all params: DEBUG: 1 TEST_GEN_PROGS_x86_64: x86_64/kvmi_test stderr: |- x86_64/kvmi_test.c:1969:13: warning: test_cmd_vcpu_control_singlestep defined but not used [-Wunused-function] static void test_cmd_vcpu_control_singlestep(struct kvm_vm *vm) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ stderr_lines: - 'x86_64/kvmi_test.c:1969:13: warning: ‘test_cmd_vcpu_control_singlestep’ defined but not used [-Wunused-function]' - ' static void test_cmd_vcpu_control_singlestep(struct kvm_vm *vm)' - ' ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~' stdout: |- make --no-builtin-rules ARCH=x86 -C ../../../.. headers_install make[1]: Entering directory '/vagrant/kvm' INSTALL ./usr/include make[1]: Leaving directory '/vagrant/kvm' gcc -Wall -Wstrict-prototypes -Wuninitialized -O2 -g -std=gnu99 -fno-stack-protector -fno-PIE -I../../../../tools/include -I../../../../usr/include/ -Iinclude -Ix86_64 -Iinclude/x86_64 -I.. -pthread -no-pie x86_64/kvmi_test.c /vagrant/kvm/tools/testing/selftests/kvm/libkvm.a -o /vagrant/kvm/tools/testing/selftests/kvm/x86_64/kvmi_test stdout_lines: target: all TASK [run kvm self-tests] ****************************************************** task path: /vagrant/vagrant/ansible/playbook_2.yml:28 ESTABLISH LOCAL CONNECTION FOR USER: vagrant EXEC /bin/sh -c 'echo ~vagrant && sleep 0' EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/vagrant/.ansible/tmp `"&& mkdir /home/vagrant/.ansible/tmp/ansible-tmp-1687179925.2125804-1546-72901585471995 && echo ansible-tmp-1687179925.2125804-1546-72901585471995="` echo /home/vagrant/.ansible/tmp/ansible-tmp-1687179925.2125804-1546-72901585471995 `" ) && sleep 0' Using module file /usr/lib/python3/dist-packages/ansible/modules/commands/command.py PUT /home/vagrant/.ansible/tmp/ansible-local-1018wfsfk_u_/tmp0zqllxme TO /home/vagrant/.ansible/tmp/ansible-tmp-1687179925.2125804-1546-72901585471995/AnsiballZ_command.py EXEC /bin/sh -c 'chmod u+x /home/vagrant/.ansible/tmp/ansible-tmp-1687179925.2125804-1546-72901585471995/ /home/vagrant/.ansible/tmp/ansible-tmp-1687179925.2125804-1546-72901585471995/AnsiballZ_command.py && sleep 0' EXEC /bin/sh -c 'sudo -H -S -n -u root /bin/sh -c '"'"'echo BECOME-SUCCESS-jllrzaaaxiwwjsohcjwsnnwdswwuwmop; /usr/bin/python /home/vagrant/.ansible/tmp/ansible-tmp-1687179925.2125804-1546-72901585471995/AnsiballZ_command.py'"'"' && sleep 0' The SSH connection was unexpectedly closed by the remote end. This usually indicates that SSH within the guest machine was unable to properly start up. Please boot the VM in GUI mode to check whether it is booting properly. Will it matter if my cpu is amd?
Wenzel commented 1 year ago

Hi @Glen233

Will it matter if my cpu is amd?

AMD doesn't have some features than Intel CPUs have.

For example the MTF flag allowing the CPUs to singlestep the execution in the guest is a feature of Intel VTx

Glen233 commented 1 year ago

Hi @Wenzel

Thank you for your explaination.

Can I skip the self-tests (special feature) and use the kvmi?

Wenzel commented 1 year ago

@Glen233 you can disable the self-tests in the playbook here: https://github.com/KVM-VMI/kvm-vmi/blob/master/vagrant/ansible/playbook_2.yml#L28

Glen233 commented 1 year ago

I disabled the self-tests and it didn't work in build vm with Packer.

In this case, I will use Intel. Thanks for your help.

Wenzel commented 1 year ago

In this case, I will use Intel. Thanks for your help.

Sure @Glen233, I'll be answering on Github if you have any issues in the install setup !