apache / cloudstack

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

SystemVm Template #7716

Closed Hossein4185 closed 1 year ago

Hossein4185 commented 1 year ago
ISSUE TYPE

Question

CLOUDSTACK VERSION

4.17.2

CONFIGURATION
OS / ENVIRONMENT

CentOs7

SUMMARY

I updated the cloudstack 4.13.1.to 4.17.2 I have a number of SystemVm Template old version , When systemvm starts it uses the old version. how can I determine which systemVm template a system vm should use?

DaanHoogland commented 1 year ago

It should be the last template with state = Active for your hypervisor_type for account_id = 1

vladimirpetrov commented 1 year ago

Hi @Hossein4185, have you destroyed the systemvms after the upgrade? This will recreate them with the newest version.

Hossein4185 commented 1 year ago

How can i use this scrips for upgrade system vm?

/usr/share/cloudstack-common/scripts/storage/secondary/cloud-install-sys-tmplt -m /mnt/secondary -u http://download.cloudstack.org/systemvm/4.18/systemvmtemplate-4.18.0-vmware.ova -h vmware -s -F

After this script, how should I specify the system vm to run from this?

rajujith commented 1 year ago

@Hossein4185 the above script is required only when you add a new zone. Have you registered the new systemVM templates before upgrading to 4.17.2? made sure it is downloaded ?

based on the hypervisor used in the zone the template with the highest id will be used. select id,name,state,hypervisor_type from vm_template where type='SYSTEM';

[1]http://docs.cloudstack.apache.org/en/4.17.2.0/upgrading/upgrade/upgrade-4.13.html#update-system-vm-templates

Hossein4185 commented 1 year ago

when i upgraded system vm from ui local file mode has "There is no secondary storage VM for downloading '' and url mode has "No route to host (Host unreachable)" error

Hossein4185 commented 1 year ago

@Hossein4185 the above script is required only when you add a new zone. Have you registered the new systemVM templates before upgrading to 4.17.2? made sure it is downloaded ?

based on the hypervisor used in the zone the template with the highest id will be used. select id,name,state,hypervisor_type from vm_template where type='SYSTEM';

[1]http://docs.cloudstack.apache.org/en/4.17.2.0/upgrading/upgrade/upgrade-4.13.html#update-system-vm-templates

this is quey result but not switch from 4.11 to 4.17 i destroyd the system vm and restart managemet service but not switch to 4.17.2 +-----+-------------------------------+--------+-----------------+ | id | name | state | hypervisor_type | +-----+-------------------------------+--------+-----------------+ | 1 | SystemVM Template (XenServer) | Active | XenServer | | 3 | SystemVM Template (KVM) | Active | KVM | | 8 | SystemVM Template (vSphere) | Active | VMware | | 9 | SystemVM Template (HyperV) | Active | Hyperv | | 10 | SystemVM Template (LXC) | Active | LXC | | 12 | SystemVM Template (Ovm3) | Active | Ovm3 | | 335 | systemvm-vmware-4.11.3 | Active | VMware | | 422 | systemvm-vmware-4.17.2 | Active | VMware | +-----+-------------------------------+--------+-----------------+

rajujith commented 1 year ago

Hi @Hossein4185 If the SystemVM template for 4.17.2 was not uploaded/downloaded to the secondary storage completely before the upgrade what you are observing now is expected. You could verify whether the template is downloaded : select id,created,download_pct,download_state,error_str,state from template_store_ref where template_id=422;

Hossein4185 commented 1 year ago

+-----+---------------------+--------------+----------------+-------------------------------------+-----------+ | id | created | download_pct | download_state | error_str | state | +-----+---------------------+--------------+----------------+-------------------------------------+-----------+ | 889 | 2023-07-03 06:12:22 | 0 | DOWNLOAD_ERROR | No route to host (Host unreachable) | Allocated | +-----+---------------------+--------------+----------------+-------------------------------------+-----------+ How do I refresh it to download again?

DaanHoogland commented 1 year ago

@Hossein4185 , first you must make sure that the template url can be reached. The output you showed, is that a query in the DB (template_store_ref) or an API call? in the table template_store_ref delete the record that states the error. In vm_template make sure the template is marked as cross_zones. On restarting the ssvm it should try to download the template a new.

Hossein4185 commented 1 year ago

I deleted the record but template zones status remains active system-vm

Hossein4185 commented 1 year ago

@Hossein4185 , first you must make sure that the template url can be reached. The output you showed, is that a query in the DB (template_store_ref) or an API call? in the table template_store_ref delete the record that states the error. In vm_template make sure the template is marked as cross_zones. On restarting the ssvm it should try to download the template a new.

This problem was solved and she downloaded the template, but when it tries to create ssvm, she receives this error.

2023-07-10 09:32:14,948 ERROR [o.a.c.s.NfsMountManager] (BackgroundTaskPollManager-5:ctx-d89e2fcd) (logid:cf43c07d) Unable to create mount: /var/cloudstack/mnt/345051619551.6cc61b15 2023-07-10 09:32:14,951 ERROR [o.a.c.s.NfsMountManager] (BackgroundTaskPollManager-5:ctx-d89e2fcd) (logid:cf43c07d) Unable to create mount: /var/cloudstack/mnt/345051619551.17554bc2 2023-07-10 09:32:14,951 ERROR [o.a.c.s.NfsMountManager] (BackgroundTaskPollManager-5:ctx-d89e2fcd) (logid:cf43c07d) Unable to create mount: /var/cloudstack/mnt/345051619551.27f66082 2023-07-10 09:32:14,952 ERROR [o.a.c.s.NfsMountManager] (BackgroundTaskPollManager-5:ctx-d89e2fcd) (logid:cf43c07d) Unable to create mount: /var/cloudstack/mnt/345051619551.433175c2 2023-07-10 09:32:14,952 ERROR [o.a.c.s.NfsMountManager] (BackgroundTaskPollManager-5:ctx-d89e2fcd) (logid:cf43c07d) Unable to create mount: /var/cloudstack/mnt/345051619551.f954274 2023-07-10 09:32:14,953 ERROR [o.a.c.s.NfsMountManager] (BackgroundTaskPollManager-5:ctx-d89e2fcd) (logid:cf43c07d) Unable to create mount: /var/cloudstack/mnt/345051619551.1a72eeef 2023-07-10 09:32:14,954 ERROR [o.a.c.s.NfsMountManager] (BackgroundTaskPollManager-5:ctx-d89e2fcd) (logid:cf43c07d) Unable to create mount: /var/cloudstack/mnt/345051619551.4bae78d6 2023-07-10 09:32:14,955 ERROR [o.a.c.s.NfsMountManager] (BackgroundTaskPollManager-5:ctx-d89e2fcd) (logid:cf43c07d) Unable to create mount: /var/cloudstack/mnt/345051619551.5a3916b3 2023-07-10 09:32:14,960 ERROR [o.a.c.s.NfsMountManager] (BackgroundTaskPollManager-5:ctx-d89e2fcd) (logid:cf43c07d) Unable to create mount: /var/cloudstack/mnt/345051619551.7b506608 2023-07-10 09:32:14,961 ERROR [o.a.c.s.NfsMountManager] (BackgroundTaskPollManager-5:ctx-d89e2fcd) (logid:cf43c07d) Unable to create mount: /var/cloudstack/mnt/345051619551.738a9004 2023-07-10 09:32:14,962 WARN [o.a.c.s.NfsMountManager] (BackgroundTaskPollManager-5:ctx-d89e2fcd) (logid:cf43c07d) Unable to create a mount point

DaanHoogland commented 1 year ago

This seems a new issue. Can you log on to the console of the new SSVM? Is this the log on the ssvm? In case it is the MS log, can you scroll back to the point where the SSVM is first created and find any related log messages there?

Hossein4185 commented 1 year ago

The system VM has not been created yet; this is Management Log In this case, the system vm is constantly being created and expunge

DaanHoogland commented 1 year ago

@Hossein4185 Is your storage writable and does it have capacity? Is the offering for your system vm large enough for the new templates?

Hossein4185 commented 1 year ago

Resolve Problem

DaanHoogland commented 1 year ago

Resolve Problem

care to share how, @Hossein4185 ?