38190 Commits

Author SHA1 Message Date
Abhisar Sinha
4d95f08a3a
Delete template from storage pool instantly if no volume is using it (#11782) 2025-10-09 09:41:18 +02:00
Abhishek Kumar
a6ef24d167
server: consistent domainpath in api responses (#11589)
* server: consistent domainpath in api responses

Currently, some APIs return domainpath as 'ROOT/domain1/domain2' while
other return it as '/domain1/domain2'. This PR makes the response
consistent like "ROOT/domain1/domain2"

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* more changes

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

---------

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2025-10-09 13:06:28 +05:30
dahn
309b444205
pom.xml: update jetty version (#11793)
* update jetty

* Rollback jetty-maven-plugin version in pom.xml

Co-authored-by: Rohit Yadav <rohit.yadav@shapeblue.com>

---------

Co-authored-by: Daan Hoogland <dahn@apache.org>
Co-authored-by: Wei Zhou <weizhou@apache.org>
Co-authored-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2025-10-09 08:39:45 +02:00
Wei Zhou
6089c161a6
Merge remote-tracking branch 'apache/4.20' 2025-10-08 15:40:33 +02:00
Wei Zhou
89d2b17461
storage: change storage pool to Up state when cancel storage migration (#11773)
* storage: change storage pool to Up state when cancel storage migration

* Update 11773: connect host to shared pool after cancelling storage migration

* Update 11773: update db only

* Update 11773: skip capacity update for storpool
2025-10-08 15:34:59 +02:00
Suresh Kumar Anaparti
b143ddc405
Sanitize the rbd file cmd parameter logs during qemu-img convert (through Script) (#11801) 2025-10-08 13:55:08 +02:00
Henrique Sato
cc3170577c
Add Hypervisor default as cache mode for disk offerings (#10282)
Co-authored-by: Henrique Sato <henrique.sato@scclouds.com.br>
2025-10-08 13:39:28 +02:00
Manoj Kumar
9f20979bce
UI: Fix primary storage for datastore cluster and retain traffic labels during zone deployment (#11760) 2025-10-08 13:38:03 +02:00
Abhishek Kumar
a15fbd9bcc
refactor: remove use of term entry-point from extensions code base (#11488)
Addresses #11483

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2025-10-08 15:42:43 +05:30
dahn
270d3f9a2d
UI: Deal with crosssite api call after login (#10533) 2025-10-08 10:42:00 +02:00
Wei Zhou
314c4591ec
systemvmtemplate: Bump Debian version to 12.12.0 (#11778) 2025-10-08 10:25:36 +02:00
Suresh Kumar Anaparti
09b63bc2e8
Storage pool response improvements (#10740)
* Return details of the storage pool in the response including url, and update capacityBytes and capacityIops if applicable while creating storage pool

* Added capacitybytes parameter to the storage pool response in sync with the capacityiops response parameter and createStoragePool cmd request parameter (existing disksizetotal parameter in the storage pool response can be deprecated)

* Don't keep url in details

* Persist the capacityBytes and capacityIops in the storage_pool_details table while creating storage pool as well, for consistency - as these are updated with during update storage pool

* rebase with main fixes
2025-10-08 11:20:37 +05:30
Vishesh
d2615bb142
Add support for providing userdata to system VMs (#11654)
This PR adds support for specifying user data (cloud-init) for system VMs via Zone Scoped global settings. This allows the operators to customize the System VMs and setup monitoring, logging or execute any custom commands.

We set the user data from the global setting in /var/cache/cloud/cmdline, and use the NoCloud datasource to process user data. cloud-init service is still disabled in the system VMs and it's executed as part of the cloud-postinit service which executes the postinit.sh script.

Added global settings:
systemvm.userdata.enabled - Disabled by default. Needs to be enabled to utilize the feature.
console.proxy.vm.userdata - UUID of the User data to be used for Console Proxy
secstorage.vm.userdata - UUID of the User data to be used for Secondary Storage VM
virtual.router.userdata - UUID of the User data to be used for Virtual Routers
2025-10-08 10:44:26 +05:30
Wei Zhou
858663fcf7
UI: fix missing comma at end of line 2025-10-07 16:55:04 +02:00
Daan Hoogland
5f63e8493c Merge branch '4.20' 2025-10-07 15:12:53 +02:00
Daan Hoogland
aca8235960 Merge branch '4.19' into 4.20 2025-10-07 14:28:47 +02:00
Suresh Kumar Anaparti
823cb00a0a
server: do not enable the disabled local storage(s) on host connection during mgmt server / agent start (#11722) 2025-10-07 11:21:47 +02:00
Manoj Kumar
9bcd98876d
Make kvm domain persistent when unmanaged from CS (#11541)
CS creates transient KVM domain.xml. When instance is unmanaged from CS, explicit dump of domain has to be taken to manage is outside of CS.

With this PR

    domainXML gets backed up and becomes persistent for further management of Instance.
    Stopped instance also can be unmanaged, last host for instance is considered for defining domain
    hostid param is supported in unmanageVirtualMachine API for KVM hypervisor and for stopped Instances
    hostid field in response of unmanageVirtualMachine, representing host used for unmanage operation
    Disable unmanaging instance with config drive, can unmanage from API using forced=true param for KVM
2025-10-07 10:32:33 +05:30
Wei Zhou
963a67b816
server: add user.password.reset.smtp.useStartTLS and enabledSecurityProtocols for password reset (#11228) 2025-10-07 10:19:57 +05:30
Suresh Kumar Anaparti
b7a11cb203
NAS backup provider: Support restore from backup to volumes on Ceph storage pool(s), and take backup for stopped instances with volumes on Ceph storage pool(s) (#11684)
Co-authored-by: Abhisar Sinha <63767682+abh1sar@users.noreply.github.com>
2025-10-06 09:13:28 +02:00
Rene Peinthor
a208db54ea
linstor: use sparse/discard qemu-img convert on thin devices (#11787) 2025-10-06 09:10:53 +02:00
Alexandru Bagu
8e4dc0a66d
VMware: match nic mac for ip address fetch (#10641) 2025-10-04 11:49:26 +02:00
Erik Böck
5a8a1e27e1
Fixed and enhanced vlan field validation in the UI (#10983) 2025-10-03 16:12:36 +05:30
Wei Zhou
e12813de49
CKS: fix CKS creation on an existing Shared and Routed network (#11735) 2025-10-03 14:35:43 +05:30
Abhishek Kumar
b09f3e8ff7
ui: fix overflow for value in DetailInput (#11771)
In DetailInput component when a long value is used, it overflows on some
browsers.

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2025-10-03 11:20:22 +05:30
Abhisar Sinha
1efa46cb4d
fix removeUsage for backups (#11522) 2025-10-02 17:15:54 +05:30
Manoj Kumar
ca7138b3bd
server: Consider Instance in Starting state as well for allocation algorithm (#11751)
* Consider Instance in Starting state as well for allocation algorithm

* use IN instead of OR statement
2025-10-02 08:13:48 +02:00
Pearl Dsilva
cd12fa5848
Add UUID field for LDAP configuration (#11462)
* Add UUID field for LDAP configuration

* move db changes to the lastest schema file

* Add ID param to list ldapConf API & delete ldapConf API

* fix ui test

* fix 1 ui test

* fix test

* fix api description

---------

Co-authored-by: dahn <daan@onecht.net>
2025-10-01 14:43:22 +02:00
Abhisar Sinha
7dd0d6e937
add ConfigDrive to datasource_list in SharedfsVM (#11726) 2025-10-01 18:00:44 +05:30
Wei Zhou
2a802a3143
Extensions: use home directory of cloud user instead of /var/lib/cloudstack/management/ (#11732) 2025-10-01 08:49:58 +02:00
Wei Zhou
c631d6a480
CKS: generate a random UUID as password of CKS user in project (#11639) 2025-10-01 08:47:58 +02:00
dk-blackfuel
d60f455b00
Fix detection of Mi3xx GPUs (#11715) 2025-09-30 18:34:58 +05:30
Abhisar Sinha
70af55e848
UI support for extraconfig in deploy and update instance (#11719) 2025-09-30 09:20:44 +02:00
Nicolas Vazquez
30cb8c7a82
Fix importing unmanaged instances due to incorrect internal name (#11753) 2025-09-30 09:01:07 +02:00
Vishesh
3159fa7d84
noVNC: make show dot configurable (#11741) 2025-09-29 16:18:42 +02:00
Wei Zhou
9cc88b8dcc
CKS: fix control plane endpoint IP (#11720) 2025-09-29 09:10:56 +02:00
Abhishek Kumar
2c1aad4db8
Merge remote-tracking branch 'apache/4.20' 2025-09-27 09:00:45 +05:30
Abhishek Kumar
928972f767
extension/proxmox: add console access for instances (#11601)
This PR introduces console access support for instances deployed using Orchestrator Extensions, available via either VNC or a direct URL.

- CloudStack queries the extension using the getconsole action.
- For VNC-based access, the extension must return host/port/ticket details. CloudStack then forwards these to the Console Proxy VM (CPVM) in the instance’s zone. It is assumed that the CPVM can reach the specified host and port.
- For direct URL access, the extension returns a console URL with the protocol set to `direct`. The URL is then provided directly to the user.
- The built-in Proxmox Orchestrator Extension now supports console access via VNC. The extension calls the Proxmox API to fetch console details and returns them in the required format.

Also, adds changes to send caller details to the extension payload.
```
# cat /var/lib/cloudstack/management/extensions/Proxmox/02b650f6-bb98-49cb-8cac-82b7a78f43a2.json | jq
{
  "caller": {
    "roleid": "6b86674b-7e61-11f0-ba77-1e00c8000158",
    "rolename": "Root Admin",
    "name": "admin",
    "roletype": "Admin",
    "id": "93567ed9-7e61-11f0-ba77-1e00c8000158",
    "type": "ADMIN"
  },
  "virtualmachineid": "126f4562-1f0f-4313-875e-6150cabeb72f",
  ...
```

Documentation PR: https://github.com/apache/cloudstack-documentation/pull/560

---------

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2025-09-27 08:54:27 +05:30
Wei Zhou
5dfeb79c63
systemvm: fix failed to get script version when patch system vm or router (#10962)
This is a regression of #9900

prior to this PR
```
2025-06-05 12:28:53,992 DEBUG [cloud.agent.Agent] (AgentRequest-Handler-1:[]) (logid:) Processing command: com.cloud.agent.api.PatchSystemVmCommand
2025-06-05 12:29:25,959 DEBUG [resource.wrapper.LibvirtPatchSystemVmCommandWrapper] (AgentRequest-Handler-1:[]) (logid:) Patch result of systemVM s-368-VM: /root
2025-06-05 12:29:25,961 WARN  [resource.wrapper.LibvirtPatchSystemVmCommandWrapper] (AgentRequest-Handler-1:[]) (logid:) Failed to get the latest script version
2025-06-05 12:29:25,962 DEBUG [cloud.agent.Agent] (AgentRequest-Handler-1:[]) (logid:) Seq 2-7450361158554357406:  { Ans: , MgmtId: 32986204472275, via: 2, Ver: v1, Flags: 10, [{"com.cloud.agent.api.PatchSystemVmAnswer":{"templateVersion":"Cloudstack Release 4.20.1 Wed May 14 05:22:13 PM UTC 2025","scriptsVersion":"5ebc6ded1a3880732363c1cdbbd54cfb
```

with this PR
```
2025-06-05 12:42:46,219 DEBUG [cloud.agent.Agent] (AgentRequest-Handler-2:[]) (logid:) Request:Seq 2-7450361158554357463:  { Cmd , MgmtId: 32986204472275, via: 2, Ver: v1, Flags: 100011, [{"com.cloud.agent.api.PatchSystemVmCommand":{"forced":"true","accessDetails":{"router.ip":"169.254.151.188","router.name":"s-368-VM"},"wait":"0","bypassHostMaintenance":"false"}}] }
2025-06-05 12:42:46,220 DEBUG [cloud.agent.Agent] (AgentRequest-Handler-2:[]) (logid:) Processing command: com.cloud.agent.api.PatchSystemVmCommand
2025-06-05 12:43:18,083 DEBUG [resource.wrapper.LibvirtPatchSystemVmCommandWrapper] (AgentRequest-Handler-2:[]) (logid:) Patch result of systemVM s-368-VM: /root
2025-06-05 12:43:18,083 DEBUG [cloud.agent.Agent] (AgentRequest-Handler-2:[]) (logid:) Seq 2-7450361158554357463:  { Ans: , MgmtId: 32986204472275, via: 2, Ver: v1, Flags: 10, [{"com.cloud.agent.api.PatchSystemVmAnswer":{"templateVersion":"Cloudstack Release 4.20.1 Wed May 14 05:22:13 PM UTC 2025","scriptsVersion":"5ebc6ded1a3880732363c1cdbbd54cfb","result":"true","details":"Successfully patched systemVM s-368-VM ","wait":"0","bypassHostMaintenance":"false"}}] }
```
2025-09-27 01:36:36 +02:00
Wei Zhou
318a4f2b6e
server: set download volume format to qcow2 for KVM volumes (#11198) 2025-09-26 20:25:11 +02:00
Vishesh
ec533cd24d
Add support EL10 (#11546) 2025-09-25 15:37:45 +05:30
Abhisar Sinha
23c9e83047
Create Instance from backup on another Zone (DRaaS use case) (#11560)
* draas initial changes

* Added option to enable disaster recovery on a backup respository. Added UpdateBackupRepositoryCmd api.

* Added timeout for mount operation in backup restore configurable via global setting

* Addressed review comments

* fix for simulator test failures

* Added UT for coverage

* Fix create instance from backup ui for other providers

* Added events to add/update backup repository

* Fix race in fetchZones

* One more fix in fetchZones in DeployVMFromBackup.vue

* Fix zone selection in createNetwork via Create Instance from backup form.

* Allow template/iso selection in create instance from backup ui

* rename draasenabled to crosszoneinstancecreation

* Added Cross-zone instance creation in test_backup_recovery_nas.py

* Added UT in BackupManagerTest and UserVmManagerImplTest

* Integration test added for Cross-zone instance creation in test_backup_recovery_nas.py
2025-09-25 13:28:29 +05:30
Abhishek Kumar
b0c7719006
ui: do not show admin only options to users while registering template (#11702) 2025-09-24 17:42:28 +02:00
Wei Zhou
36cfd76ce1
KVM: fix delete vm snapshot if it does not exist with a Stopped vm (#11687)
* KVM: fix delete vm snapshot if it does not exist with a Stopped vm

* update 11687
2025-09-24 13:53:27 +02:00
dahn
c24d2b88f6
LDAP: honour nested groups for MSAD (#11696) 2025-09-24 11:30:04 +02:00
Manoj Kumar
96992d3d64
server: Fix vpclimit count for listAcccount API response (#11686) 2025-09-24 10:28:24 +02:00
Wei Zhou
e78b5cc3cc
Merge remote-tracking branch 'apache/4.20' 2025-09-24 09:27:08 +02:00
Abhishek Kumar
98b9af2904
server: set VirtualMachineTO arch from template if present (#11530)
* server: set VirtualMachineTO arch from template if present

Fixes #11529

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* refactor

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

---------

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2025-09-24 09:21:40 +02:00
Manoj Kumar
a18b5514e6
kvm: honor templateId passed in importVM API (#11640) 2025-09-24 08:34:18 +02:00
Suresh Kumar Anaparti
a749206eb8
storage: Mount disabled pools by default when host is booted (#11666) 2025-09-24 08:22:49 +02:00