apache / cloudstack

Apache CloudStack is an opensource Infrastructure as a Service (IaaS) cloud computing platform
https://cloudstack.apache.org/
Apache License 2.0
2.05k stars 1.1k forks source link

add hosts fail #9034

Closed 0xdddddddd closed 4 months ago

0xdddddddd commented 5 months ago

I failed to test adding a host to cloudstack on the local server. I'm not sure what the reason is.

I think my IP address configuration should be correct.

I work on the management platform and host platform under the current server. They are together.

I am using Cloudstack version: 4.19.0.1

My operating system: Debian 12 x64

image

image

image

image

image

image

image

image

image

log file management-server.log

boring-cyborg[bot] commented 5 months ago

Thanks for opening your first issue here! Be sure to follow the issue template!

weizhouapache commented 5 months ago

@0xdddddddd can you check if file /dev/kvm exists ?

0xdddddddd commented 5 months ago

@0xdddddddd can you check if file /dev/kvm exists ?

Yes, it exists.

image

image

weizhouapache commented 5 months ago

@0xdddddddd can you check if file /dev/kvm exists ?

Yes, it exists.

image

image

that's strange, the logs show

Starting to configure your system:
Checking KVM...[Failed]
Please enable KVM on this machine

Try to restore your system:

can you re-add the host ?

0xdddddddd commented 5 months ago

@0xdddddddd can you check if file /dev/kvm exists ?

Yes, it exists. image image

that's strange, the logs show

Starting to configure your system:
Checking KVM...[Failed]
Please enable KVM on this machine

Try to restore your system:

can you re-add the host ?

Okay, please wait a few minutes. I will clear the logs, add a new host, and provide you with a new log

0xdddddddd commented 5 months ago

@weizhouapache

Hello, I have kept you waiting for a long time. I have added a brand new host log, and besides that, I haven't done anything on the web UI.

Unable to add the host: Cannot find the server resources at http://192.168.64.129

image

log file:

agent.log

management-server.log

0xdddddddd commented 5 months ago

@weizhouapache

The libvirtd configuration file, which is automatically generated by Cloudstack, has not been modified by me

libvirtd.txt

0xdddddddd commented 5 months ago

@weizhouapache

After my continuous investigation. I found that the kvm ok program is missing in the debian12 system. That's because cloudstack setup agent called kvm ok. Just install: sudo apt install cpu-checker to solve the problem. This is the "/var/log/cloudstack/agent/setup. log" log error.

DEBUG:root:Failed to execute:/bin/sh: 1: kvm-ok: not found
DEBUG:root:execute:/usr/bin/lsb_release -i
DEBUG:root:execute:hostname -f
DEBUG:root:execute:kvm-ok
DEBUG:root:Failed to execute:/bin/sh: 1: kvm-ok: not found
DEBUG:root:execute:/usr/bin/lsb_release -i
DEBUG:root:execute:hostname -f
DEBUG:root:execute:kvm-ok
DEBUG:root:Failed to execute:/bin/sh: 1: kvm-ok: not found
DEBUG:root:execute:/usr/bin/lsb_release -i
DEBUG:root:execute:hostname -f
DEBUG:root:execute:kvm-ok
DEBUG:root:Failed to execute:/bin/sh: 1: kvm-ok: not found

In addition, I am facing a new problem Error will be reported when adding storage "Something wet wrong; Please correct the following: Fail"

0xdddddddd commented 5 months ago

When I failed to add storage, I clicked on return to fix and then clicked on next again. Add Host reported an error again, stating that it already exists. I think this is a logical bug in the web UI.

image

0xdddddddd commented 5 months ago

Cloudstack agent has been successfully added, but it is always in an initialized state. Because I am testing cloudstack in a virtual machine, which belongs to nested virtualization. Cloudstack was executing LSCPU related instructions and attempted to obtain CPU related information, but failed. Causing the cloudstack agent to remain in the initialization phase forever. Ultimately, the storage function could not be added properly.

agent.log

weizhouapache commented 5 months ago

When I failed to add storage, I clicked on return to fix and then clicked on next again. Add Host reported an error again, stating that it already exists. I think this is a logical bug in the web UI.

image

this is a known UI bug: https://github.com/apache/cloudstack/issues/8597 please ignore it for now

weizhouapache commented 5 months ago

Cloudstack agent has been successfully added, but it is always in an initialized state. Because I am testing cloudstack in a virtual machine, which belongs to nested virtualization. Cloudstack was executing LSCPU related instructions and attempted to obtain CPU related information, but failed. Causing the cloudstack agent to remain in the initialization phase forever. Ultimately, the storage function could not be added properly.

agent.log

agent.log looks ok, although there are some errors.

is the host Up ? check Infrastructure -> Hosts

0xdddddddd commented 5 months ago

Cloudstack agent has been successfully added, but it is always in an initialized state. Because I am testing cloudstack in a virtual machine, which belongs to nested virtualization. Cloudstack was executing LSCPU related instructions and attempted to obtain CPU related information, but failed. Causing the cloudstack agent to remain in the initialization phase forever. Ultimately, the storage function could not be added properly. agent.log

agent.log looks ok, although there are some errors.

is the host Up ? check Infrastructure -> Hosts

No, I don't know where the mistake was, I feel like there's still a long way to go. The main issue is the lack of some components, but I don't know what they are.

weizhouapache commented 5 months ago

Cloudstack agent has been successfully added, but it is always in an initialized state. Because I am testing cloudstack in a virtual machine, which belongs to nested virtualization. Cloudstack was executing LSCPU related instructions and attempted to obtain CPU related information, but failed. Causing the cloudstack agent to remain in the initialization phase forever. Ultimately, the storage function could not be added properly. agent.log

agent.log looks ok, although there are some errors.

is the host Up ? check Infrastructure -> Hosts

No, I don't know where the mistake was, I feel like there's still a long way to go. The main issue is the lack of some components, but I don't know what they are.

Add primary storage Add secondary storage Enable the zone

0xdddddddd commented 5 months ago

Cloudstack agent has been successfully added, but it is always in an initialized state. Because I am testing cloudstack in a virtual machine, which belongs to nested virtualization. Cloudstack was executing LSCPU related instructions and attempted to obtain CPU related information, but failed. Causing the cloudstack agent to remain in the initialization phase forever. Ultimately, the storage function could not be added properly. agent.log

agent.log looks ok, although there are some errors. is the host Up ? check Infrastructure -> Hosts

No, I don't know where the mistake was, I feel like there's still a long way to go. The main issue is the lack of some components, but I don't know what they are.

Add primary storage Add secondary storage Enable the zone

I can't add it because they will report errors. I've been working on it all day and I'm very tired. There are not enough detailed logs, the failure rate is too high. Poor system compatibility. The official installation package contains too many missing items during installation. Not easy to get started with. I feel very uncomfortable.

rajujith commented 5 months ago

@0xdddddddd I tried using Debian12 as a KVM host with CloudStack 4.19.0.1. Addhost failed initially, then I installed the cpu-checker. Then executed the cloudstack-setup-agent , and the host is visible in the cloudstack UI now.

0xdddddddd commented 4 months ago

@0xdddddddd I tried using Debian12 as a KVM host with CloudStack 4.19.0.1. Addhost failed initially, then I installed the cpu-checker. Then executed the cloudstack-setup-agent , and the host is visible in the cloudstack UI now.

Although successful, it's just that you can see success, and in fact, the functionality is not available. The default installation package is missing too many dependent components. Some things are not included in Debian itself, so I think you should check if there are any critical components in the system

rohityadavcloud commented 4 months ago

@0xdddddddd Yes, it's because the current deb packages are only tested, used and supported for Ubuntu that you're welcome to use to an out-of-box installation experience, support for Debian is largely experimental and it's possible (as you've found out the hard way) Debian needs additional packages and specific configuration.

Most of us may not have any incentive to support Debian (yet), and it's hard to work on all the issues, features and requirements that each and every user wants in our 'free time'. We want to help but as much frustrating it is for you, it's equally or may be more frustrating that we can't help or support you in something that's not supported (yet). As a community-driven opensource project, our community of users help solve such problems with us and we welcome any and all feedback and contributions, and pull requests.