diff --git a/api/src/main/java/org/apache/cloudstack/api/ApiConstants.java b/api/src/main/java/org/apache/cloudstack/api/ApiConstants.java index 6db1ed06eff..7a167a7aeb6 100644 --- a/api/src/main/java/org/apache/cloudstack/api/ApiConstants.java +++ b/api/src/main/java/org/apache/cloudstack/api/ApiConstants.java @@ -593,6 +593,7 @@ public class ApiConstants { public static final String AGGREGATE_NAME = "aggregatename"; public static final String POOL_NAME = "poolname"; public static final String VOLUME_NAME = "volumename"; + public static final String VOLUME_STATE = "volumestate"; public static final String SNAPSHOT_POLICY = "snapshotpolicy"; public static final String SNAPSHOT_RESERVATION = "snapshotreservation"; public static final String IP_NETWORK_LIST = "iptonetworklist"; diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/usage/GenerateUsageRecordsCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/usage/GenerateUsageRecordsCmd.java index 491b0fe85ba..a0314586d92 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/usage/GenerateUsageRecordsCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/usage/GenerateUsageRecordsCmd.java @@ -47,13 +47,13 @@ public class GenerateUsageRecordsCmd extends BaseCmd { @Parameter(name = ApiConstants.END_DATE, type = CommandType.DATE, - required = true, + required = false, description = "End date range for usage record query. Use yyyy-MM-dd as the date format, e.g. startDate=2009-06-03.") private Date endDate; @Parameter(name = ApiConstants.START_DATE, type = CommandType.DATE, - required = true, + required = false, description = "Start date range for usage record query. Use yyyy-MM-dd as the date format, e.g. startDate=2009-06-01.") private Date startDate; diff --git a/api/src/main/java/org/apache/cloudstack/api/response/SnapshotResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/SnapshotResponse.java index e160f64ebe9..02132416b8a 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/SnapshotResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/SnapshotResponse.java @@ -71,6 +71,10 @@ public class SnapshotResponse extends BaseResponseWithTagInformation implements @Param(description = "type of the disk volume") private String volumeType; + @SerializedName(ApiConstants.VOLUME_STATE) + @Param(description = "state of the disk volume") + private String volumeState; + @SerializedName(ApiConstants.CREATED) @Param(description = " the date the snapshot was created") private Date created; @@ -199,6 +203,10 @@ public class SnapshotResponse extends BaseResponseWithTagInformation implements this.volumeType = volumeType; } + public void setVolumeState(String volumeState) { + this.volumeState = volumeState; + } + public void setCreated(Date created) { this.created = created; } diff --git a/debian/rules b/debian/rules index b5280370272..e7ff6759d44 100755 --- a/debian/rules +++ b/debian/rules @@ -4,6 +4,7 @@ VERSION := $(shell grep '' pom.xml | head -2 | tail -1 | cut -d'>' -f2 PACKAGE = $(shell dh_listpackages|head -n 1|cut -d '-' -f 1) SYSCONFDIR = "/etc" DESTDIR = "debian/tmp" +CMK_REL := $(shell wget -O - "https://api.github.com/repos/apache/cloudstack-cloudmonkey/releases" 2>/dev/null | jq -r '.[0].tag_name') %: dh $@ --with systemd @@ -85,7 +86,7 @@ override_dh_auto_install: rm -rf $(DESTDIR)/usr/share/$(PACKAGE)-management/templates/systemvm/md5sum.txt # Bundle cmk in cloudstack-management - wget https://github.com/apache/cloudstack-cloudmonkey/releases/download/6.3.0/cmk.linux.x86-64 -O $(DESTDIR)/usr/bin/cmk + wget https://github.com/apache/cloudstack-cloudmonkey/releases/download/$(CMK_REL)/cmk.linux.x86-64 -O $(DESTDIR)/usr/bin/cmk chmod +x $(DESTDIR)/usr/bin/cmk # nast hack for a couple of configuration files diff --git a/engine/schema/src/main/java/com/cloud/usage/dao/UsageDaoImpl.java b/engine/schema/src/main/java/com/cloud/usage/dao/UsageDaoImpl.java index b849378c705..fb925a28513 100644 --- a/engine/schema/src/main/java/com/cloud/usage/dao/UsageDaoImpl.java +++ b/engine/schema/src/main/java/com/cloud/usage/dao/UsageDaoImpl.java @@ -545,16 +545,11 @@ public class UsageDaoImpl extends GenericDaoBase implements Usage TransactionLegacy txn = TransactionLegacy.currentTxn(); PreparedStatement pstmt = null; try { - txn.start(); pstmt = txn.prepareAutoCloseStatement(DELETE_ALL_BY_INTERVAL); pstmt.setLong(1, days); pstmt.executeUpdate(); - txn.commit(); } catch (Exception ex) { - txn.rollback(); logger.error("error removing old cloud_usage records for interval: " + days); - } finally { - txn.close(); } } }); diff --git a/engine/schema/src/main/resources/META-INF/db/views/cloud.snapshot_view.sql b/engine/schema/src/main/resources/META-INF/db/views/cloud.snapshot_view.sql index c6b8d6b4d05..d0eddc1fc4b 100644 --- a/engine/schema/src/main/resources/META-INF/db/views/cloud.snapshot_view.sql +++ b/engine/schema/src/main/resources/META-INF/db/views/cloud.snapshot_view.sql @@ -48,6 +48,7 @@ SELECT `volumes`.`uuid` AS `volume_uuid`, `volumes`.`name` AS `volume_name`, `volumes`.`volume_type` AS `volume_type`, + `volumes`.`state` AS `volume_state`, `volumes`.`size` AS `volume_size`, `data_center`.`id` AS `data_center_id`, `data_center`.`uuid` AS `data_center_uuid`, diff --git a/packaging/centos8/cloud.spec b/packaging/centos8/cloud.spec index ebb7af12583..3b801f0f1f3 100644 --- a/packaging/centos8/cloud.spec +++ b/packaging/centos8/cloud.spec @@ -260,7 +260,8 @@ install -D client/target/utilities/bin/cloud-setup-baremetal ${RPM_BUILD_ROOT}%{ install -D client/target/utilities/bin/cloud-sysvmadm ${RPM_BUILD_ROOT}%{_bindir}/%{name}-sysvmadm install -D client/target/utilities/bin/cloud-update-xenserver-licenses ${RPM_BUILD_ROOT}%{_bindir}/%{name}-update-xenserver-licenses # Bundle cmk in cloudstack-management -wget https://github.com/apache/cloudstack-cloudmonkey/releases/download/6.3.0/cmk.linux.x86-64 -O ${RPM_BUILD_ROOT}%{_bindir}/cmk +CMK_REL=$(wget -O - "https://api.github.com/repos/apache/cloudstack-cloudmonkey/releases" 2>/dev/null | jq -r '.[0].tag_name') +wget https://github.com/apache/cloudstack-cloudmonkey/releases/download/$CMK_REL/cmk.linux.x86-64 -O ${RPM_BUILD_ROOT}%{_bindir}/cmk chmod +x ${RPM_BUILD_ROOT}%{_bindir}/cmk cp -r client/target/utilities/scripts/db/* ${RPM_BUILD_ROOT}%{_datadir}/%{name}-management/setup diff --git a/server/src/main/java/com/cloud/api/ApiResponseHelper.java b/server/src/main/java/com/cloud/api/ApiResponseHelper.java index 7b341b0fedb..d247aaf5328 100644 --- a/server/src/main/java/com/cloud/api/ApiResponseHelper.java +++ b/server/src/main/java/com/cloud/api/ApiResponseHelper.java @@ -669,6 +669,7 @@ public class ApiResponseHelper implements ResponseGenerator { snapshotResponse.setVolumeId(volume.getUuid()); snapshotResponse.setVolumeName(volume.getName()); snapshotResponse.setVolumeType(volume.getVolumeType().name()); + snapshotResponse.setVolumeState(volume.getState().name()); snapshotResponse.setVirtualSize(volume.getSize()); DataCenter zone = ApiDBUtils.findZoneById(volume.getDataCenterId()); if (zone != null) { diff --git a/server/src/main/java/com/cloud/api/query/dao/SnapshotJoinDaoImpl.java b/server/src/main/java/com/cloud/api/query/dao/SnapshotJoinDaoImpl.java index 76b3ffae566..42a35f4412c 100644 --- a/server/src/main/java/com/cloud/api/query/dao/SnapshotJoinDaoImpl.java +++ b/server/src/main/java/com/cloud/api/query/dao/SnapshotJoinDaoImpl.java @@ -125,6 +125,7 @@ public class SnapshotJoinDaoImpl extends GenericDaoBaseWithTagInformation 0: self.restartAllManagementServers() - wait = 2 * purge_task_delay - logging.info("Waiting for 2x%d = %d seconds for background task to execute" % (purge_task_delay, wait)) + wait_multiple = 2 + wait = wait_multiple * purge_task_delay + logging.info(f"Waiting for {wait_multiple}x{purge_task_delay} = {wait} seconds for background task to execute") time.sleep(wait) + logging.debug("Validating expunged VMs") self.validatePurgedVmEntriesInDb( [self.vm_ids[self.timestamps[0]], self.vm_ids[self.timestamps[1]], self.vm_ids[self.timestamps[2]]], None diff --git a/tools/appliance/README.md b/tools/appliance/README.md index e9293d6373b..bc5b2014a59 100644 --- a/tools/appliance/README.md +++ b/tools/appliance/README.md @@ -25,7 +25,8 @@ CentOS based built-in user VM template. # Setting up Tools and Environment -- Install packer and latest KVM, qemu on a Linux machine +- Install packer (v1.8.x, v1.9.x tested) and latest KVM, qemu on a Linux x86 + machine (Ubuntu 20.04 tested) - Install tools for exporting appliances: qemu-img, ovftool, faketime, sharutils - Build and install `vhd-util` as described in build.sh or use pre-built binaries at: @@ -33,10 +34,18 @@ CentOS based built-in user VM template. http://packages.shapeblue.com/systemvmtemplate/vhd-util http://packages.shapeblue.com/systemvmtemplate/libvhd.so.1.0 +- For building ARM64 systemvm template on amd64 systems, please also install: + qemu-utils qemu-system-arm qemu-efi-aarch64 + # How to build appliances Just run build.sh, it will export archived appliances for KVM, XenServer, VMWare and HyperV in `dist` directory: - bash build.sh systemvmtemplate + bash build.sh + bash build.sh systemvmtemplate 4.19.1.0 x86_64 + bash build.sh systemvmtemplate 4.19.1.0 aarch64 + +For building builtin x86_64 template run: + bash build.sh builtin diff --git a/tools/appliance/build.sh b/tools/appliance/build.sh index 1c83f9aba51..4865842d17b 100755 --- a/tools/appliance/build.sh +++ b/tools/appliance/build.sh @@ -27,6 +27,8 @@ Usage: (or use command line arg, default systemvmtemplate) * Set \$version to provide version to apply to built appliance (or use command line arg, default empty) + * Set \$target_arch to provide target architecture + (or use command line arg, default to current architecture. Currently x86_64 and aarch64 are implemented) * Set \$BUILD_NUMBER to provide build number to apply to built appliance (or use command line arg, default empty) * Set \$DEBUG=1 to enable debug logging @@ -85,12 +87,18 @@ if [[ ! -z "${JENKINS_HOME}" ]]; then DEBUG=1 fi +# get current system architecture +base_arch=`arch` + # which packer definition to use appliance="${1:-${appliance:-systemvmtemplate}}" # optional version tag to put into the image filename version="${2:-${version:-}}" +# which architecture to build the template for +target_arch="${3:-${target_arch:-${base_arch}}}" + # optional (jenkins) build number tag to put into the image filename BUILD_NUMBER="${4:-${BUILD_NUMBER:-}}" @@ -105,7 +113,7 @@ elif [ ! -z "${BUILD_NUMBER}" ]; then version_tag="-${BUILD_NUMBER}" fi -appliance_build_name=${appliance}${version_tag} +appliance_build_name="${appliance}${version_tag}-${target_arch}" ### ### Generic helper functions @@ -218,7 +226,7 @@ function prepare() { function packer_build() { log INFO "building new image with packer" - cd ${appliance_build_name} && packer build template.json && cd .. + cd ${appliance_build_name} && packer build template-base_${base_arch}-target_${target_arch}.json && cd .. } function stage_vmx() { @@ -349,10 +357,12 @@ function main() { # process the disk at dist kvm_export - ovm_export - xen_server_export - vmware_export - hyperv_export + if [ "${target_arch}" == "x86_64" ]; then + ovm_export + xen_server_export + vmware_export + hyperv_export + fi rm -f "dist/${appliance}" cd dist && chmod +r * && cd .. cd dist && md5sum * > md5sum.txt && cd .. diff --git a/tools/appliance/systemvmtemplate/http/preseed_aarch64.cfg b/tools/appliance/systemvmtemplate/http/preseed_aarch64.cfg new file mode 100644 index 00000000000..5262603deaa --- /dev/null +++ b/tools/appliance/systemvmtemplate/http/preseed_aarch64.cfg @@ -0,0 +1,122 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +### Localization +# Locale sets language and country. +d-i debian-installer/locale string en_US.UTF-8 +d-i debian-installer/country string IN + +# Keyboard selection. +d-i keymap select us +d-i keyboard-configuration/xkb-keymap select us + +### Network configuration +d-i netcfg/choose_interface select auto +d-i netcfg/get_hostname string systemvm +d-i netcfg/get_domain string apache.org +d-i netcfg/wireless_wep string + +d-i hw-detect/load_firmware boolean true + +### Mirror settings +d-i mirror/country string manual +d-i mirror/http/hostname string deb.debian.org +d-i mirror/http/directory string /debian +d-i mirror/http/proxy string + +### Apt setup +d-i apt-setup/cdrom/set-first false +d-i apt-setup/security-updates boolean true +d-i apt-setup/services-select multiselect security, updates +d-i apt-setup/security_host string security.debian.org +d-i apt-setup/local0/source boolean false +d-i apt-setup/multiarch string i386 +d-i apt-setup/backports boolean true +d-i apt-setup/contrib boolean true +d-i apt-setup/multiverse boolean true +d-i apt-setup/universe boolean true + +### Clock and time zone setup +d-i clock-setup/utc boolean true +d-i time/zone string UTC +d-i clock-setup/ntp boolean true + +### Partitioning +d-i partman-auto/disk string /dev/vda +d-i partman-auto/method string regular +d-i partman-auto/expert_recipe string \ + boot-root :: \ + 538 538 1075 free \ + $iflabel{ gpt } \ + $reusemethod{ } \ + method{ efi } \ + format{ } \ + . \ + 400 60 400 ext2 \ + $primary{ } $bootable{ } \ + method{ format } format{ } \ + use_filesystem{ } filesystem{ ext2 } \ + mountpoint{ /boot } \ + . \ + 256 1000 256 linux-swap \ + method{ swap } format{ } \ + . \ + 2240 40 4000 ext4 \ + method{ format } format{ } \ + use_filesystem{ } filesystem{ ext4 } \ + mountpoint{ / } \ + . + +d-i partman-md/confirm boolean true +d-i partman-partitioning/confirm_write_new_label boolean true +d-i partman/choose_partition select finish +d-i partman/confirm boolean true +d-i partman/confirm_nooverwrite boolean true +grub-efi-arm64 grub2/force_efi_extra_removable boolean true +d-i partman-partitioning/choose_label select gpt +d-i partman-partitioning/default_label string gpt + +### Base system installation +# ... + +### Account setup +d-i passwd/root-login boolean false +d-i passwd/root-password password password +d-i passwd/root-password-again password password +d-i passwd/user-fullname string Cloud User +d-i passwd/username string cloud +d-i passwd/user-password password cloud +d-i passwd/user-password-again password cloud +d-i user-setup/encrypt-home boolean false +d-i user-setup/allow-password-weak boolean true +d-i passwd/user-default-groups string audio cdrom video admin + +### Package selection +tasksel tasksel/first multiselect ssh-server +d-i pkgsel/include string openssh-server ntp acpid sudo bzip2 openssl +# Allowed values: none, safe-upgrade, full-upgrade +d-i pkgsel/upgrade select full-upgrade +d-i pkgsel/update-policy select none + +popularity-contest popularity-contest/participate boolean false + +### Boot loader installation +d-i grub-installer/only_debian boolean true +d-i grub-installer/bootdev string default +d-i finish-install/reboot_in_progress note + +#### Advanced options diff --git a/tools/appliance/systemvmtemplate/http/preseed.cfg b/tools/appliance/systemvmtemplate/http/preseed_x86_64.cfg similarity index 100% rename from tools/appliance/systemvmtemplate/http/preseed.cfg rename to tools/appliance/systemvmtemplate/http/preseed_x86_64.cfg diff --git a/tools/appliance/systemvmtemplate/scripts/install_systemvm_packages.sh b/tools/appliance/systemvmtemplate/scripts/install_systemvm_packages.sh index 92223cfbd88..686661a72f9 100644 --- a/tools/appliance/systemvmtemplate/scripts/install_systemvm_packages.sh +++ b/tools/appliance/systemvmtemplate/scripts/install_systemvm_packages.sh @@ -83,7 +83,7 @@ function install_packages() { apt_clean # 32 bit architecture support for vhd-util - if [ "${arch}" != "i386" ]; then + if [[ "${arch}" != "i386" && "${arch}" != "arm64" ]]; then dpkg --add-architecture i386 apt-get update ${apt_get} install libuuid1:i386 libc6:i386 @@ -92,17 +92,25 @@ function install_packages() { # Install docker and containerd for CKS curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add - apt-key fingerprint 0EBFCD88 - add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable" + if [ "${arch}" == "arm64" ]; then + add-apt-repository "deb [arch=arm64] https://download.docker.com/linux/debian $(lsb_release -cs) stable" + elif [ "${arch}" == "amd64" ]; then + add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable" + else + add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable" + fi apt-get update ${apt_get} install containerd.io apt_clean - install_vhd_util - # Install xenserver guest utilities as debian repos don't have it - wget --no-check-certificate https://download.cloudstack.org/systemvm/debian/xe-guest-utilities_7.20.2-0ubuntu1_amd64.deb - dpkg -i xe-guest-utilities_7.20.2-0ubuntu1_amd64.deb - rm -f xe-guest-utilities_7.20.2-0ubuntu1_amd64.deb + if [ "${arch}" != "arm64" ]; then + install_vhd_util + # Install xenserver guest utilities as debian repos don't have it + wget --no-check-certificate https://download.cloudstack.org/systemvm/debian/xe-guest-utilities_7.20.2-0ubuntu1_amd64.deb + dpkg -i xe-guest-utilities_7.20.2-0ubuntu1_amd64.deb + rm -f xe-guest-utilities_7.20.2-0ubuntu1_amd64.deb + fi } return 2>/dev/null || install_packages diff --git a/tools/appliance/systemvmtemplate/template-base_aarch64-target_aarch64.json b/tools/appliance/systemvmtemplate/template-base_aarch64-target_aarch64.json new file mode 100644 index 00000000000..2ceadeaf742 --- /dev/null +++ b/tools/appliance/systemvmtemplate/template-base_aarch64-target_aarch64.json @@ -0,0 +1,93 @@ +{ + "_license": "Apache License 2.0", + "builders": [ + { + "accelerator": "kvm", + "boot_command": [ + "c", + "linux /install.a64/vmlinuz ", + "preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed_aarch64.cfg ", + "debian-installer=en_US.UTF-8 ", + "auto ", + "language=en locale=en_US.UTF-8 ", + "kbd-chooser/method=us ", + "keyboard-configuration/xkb-keymap=us ", + "netcfg/get_hostname=systemvm ", + "netcfg/get_domain=apache.org ", + "country=IN keymap=us ", + "fb=false ", + "debconf/frontend=noninteractive ", + "console-setup/ask_detect=false ", + "console-keymaps-at/keymap=us ", + "---", + "", + "initrd /install.a64/initrd.gz", + "", + "boot" + ], + "boot_wait": "180s", + "disk_interface": "virtio", + "cdrom_interface": "virtio-scsi", + "disk_size": "5000M", + "format": "qcow2", + "headless": true, + "http_directory": "http", + "iso_checksum": "sha512:14c2ca243ee7f6e447cc4466296d974ee36645c06d72043236c3fbea78f1948d3af88d65139105a475288f270e4b636e6885143d01bdf69462620d1825e470ae", + "iso_url": "https://cdimage.debian.org/mirror/cdimage/archive/12.5.0/arm64/iso-cd/debian-12.5.0-arm64-netinst.iso", + "net_device": "virtio-net", + "output_directory": "../dist", + "qemu_binary": "qemu-system-aarch64", + "qemuargs": [ + [ + "-m", + "500M" + ], + [ + "-machine", + "virt" + ], + [ + "-cpu", + "host" + ], + [ + "-smp", + "1" + ], + [ "-pflash", "/usr/share/AAVMF/AAVMF_CODE.fd" ], + [ "-monitor", "none" ], + [ "-enable-kvm" ], + [ "-boot", "strict=off" ] + ], + "shutdown_command": "sudo halt -p", + "ssh_password": "cloud", + "ssh_timeout": "120m", + "ssh_username": "cloud", + "type": "qemu", + "vm_name": "systemvmtemplate" + } + ], + "description": "CloudStack SystemVM template", + "provisioners": [ + { + "execute_command": "echo 'cloud' | sudo -u root -S bash {{.Path}}", + "scripts": [ + "scripts/apt_upgrade.sh", + "scripts/configure_grub.sh", + "scripts/configure_locale.sh", + "scripts/configure_networking.sh", + "scripts/configure_acpid.sh", + "scripts/install_systemvm_packages.sh", + "scripts/configure_conntrack.sh", + "scripts/authorized_keys.sh", + "scripts/configure_persistent_config.sh", + "scripts/configure_login.sh", + "../cloud_scripts_shar_archive.sh", + "scripts/configure_systemvm_services.sh", + "scripts/cleanup.sh", + "scripts/finalize.sh" + ], + "type": "shell" + } + ] +} diff --git a/tools/appliance/systemvmtemplate/template-base_x86_64-target_aarch64.json b/tools/appliance/systemvmtemplate/template-base_x86_64-target_aarch64.json new file mode 100644 index 00000000000..b49ed17104a --- /dev/null +++ b/tools/appliance/systemvmtemplate/template-base_x86_64-target_aarch64.json @@ -0,0 +1,91 @@ +{ + "_license": "Apache License 2.0", + "builders": [ + { + "boot_command": [ + "c", + "linux /install.a64/vmlinuz ", + "preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed_aarch64.cfg ", + "debian-installer=en_US.UTF-8 ", + "auto ", + "language=en locale=en_US.UTF-8 ", + "kbd-chooser/method=us ", + "keyboard-configuration/xkb-keymap=us ", + "netcfg/get_hostname=systemvm ", + "netcfg/get_domain=apache.org ", + "country=IN keymap=us ", + "fb=false ", + "debconf/frontend=noninteractive ", + "console-setup/ask_detect=false ", + "console-keymaps-at/keymap=us ", + "---", + "", + "initrd /install.a64/initrd.gz", + "", + "boot" + ], + "boot_wait": "60s", + "disk_interface": "virtio", + "cdrom_interface": "virtio-scsi", + "disk_size": "5000M", + "format": "qcow2", + "headless": true, + "http_directory": "http", + "iso_checksum": "sha512:14c2ca243ee7f6e447cc4466296d974ee36645c06d72043236c3fbea78f1948d3af88d65139105a475288f270e4b636e6885143d01bdf69462620d1825e470ae", + "iso_url": "https://cdimage.debian.org/mirror/cdimage/archive/12.5.0/arm64/iso-cd/debian-12.5.0-arm64-netinst.iso", + "net_device": "virtio-net", + "output_directory": "../dist", + "qemu_binary": "qemu-system-aarch64", + "qemuargs": [ + [ + "-m", + "500M" + ], + [ + "-machine", + "virt" + ], + [ + "-cpu", + "cortex-a72" + ], + [ + "-smp", + "1" + ], + [ "-bios", "/usr/share/qemu-efi-aarch64/QEMU_EFI.fd" ], + [ "-monitor", "none" ], + [ "-boot", "strict=off" ] + ], + "shutdown_command": "sudo halt -p", + "ssh_password": "cloud", + "ssh_timeout": "120m", + "ssh_username": "cloud", + "type": "qemu", + "vm_name": "systemvmtemplate" + } + ], + "description": "CloudStack SystemVM template", + "provisioners": [ + { + "execute_command": "echo 'cloud' | sudo -u root -S bash {{.Path}}", + "scripts": [ + "scripts/apt_upgrade.sh", + "scripts/configure_grub.sh", + "scripts/configure_locale.sh", + "scripts/configure_networking.sh", + "scripts/configure_acpid.sh", + "scripts/install_systemvm_packages.sh", + "scripts/configure_conntrack.sh", + "scripts/authorized_keys.sh", + "scripts/configure_persistent_config.sh", + "scripts/configure_login.sh", + "../cloud_scripts_shar_archive.sh", + "scripts/configure_systemvm_services.sh", + "scripts/cleanup.sh", + "scripts/finalize.sh" + ], + "type": "shell" + } + ] +} diff --git a/tools/appliance/systemvmtemplate/template.json b/tools/appliance/systemvmtemplate/template-base_x86_64-target_x86_64.json similarity index 99% rename from tools/appliance/systemvmtemplate/template.json rename to tools/appliance/systemvmtemplate/template-base_x86_64-target_x86_64.json index 2b0fe3a07ab..5dc2051d127 100644 --- a/tools/appliance/systemvmtemplate/template.json +++ b/tools/appliance/systemvmtemplate/template-base_x86_64-target_x86_64.json @@ -6,7 +6,7 @@ "boot_command": [ "", "install ", - "preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg ", + "preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed_x86_64.cfg ", "debian-installer=en_US.UTF-8 ", "auto ", "language=en locale=en_US.UTF-8 ", diff --git a/ui/public/locales/en.json b/ui/public/locales/en.json index 253f20294f5..8f2c9fa6d15 100644 --- a/ui/public/locales/en.json +++ b/ui/public/locales/en.json @@ -618,6 +618,7 @@ "label.datetime.filter.starting": "Starting {startDate}.", "label.datetime.filter.up.to": "Up to {endDate}.", "label.day": "Day", +"label.days": "Days", "label.day.of.month": "Day of month", "label.day.of.week": "Day of week", "label.db.usage.metrics": "DB/Usage server", @@ -806,6 +807,7 @@ "label.done": "Done", "label.down": "Down", "label.download": "Download", +"label.download.csv": "Download CSV", "label.download.kubeconfig.cluster": "Download kubeconfig for the cluster

The kubectl command-line tool uses kubeconfig files to find the information it needs to choose a cluster and communicate with the API server of a cluster.", "label.download.kubectl": "Download kubectl tool for cluster's Kubernetes version", "label.download.kubernetes.cluster.config": "Download Kubernetes cluster config", @@ -924,6 +926,7 @@ "label.fetch.instances": "Fetch Instances", "label.fetch.latest": "Fetch latest", "label.filename": "File Name", +"label.fetched": "Fetched", "label.files": "Alternate files to retrieve", "label.filter": "Filter", "label.filter.annotations.all": "All comments", @@ -1229,6 +1232,8 @@ "label.label": "Label", "label.last.updated": "Last update", "label.lastannotated": "Last annotation date", +"label.lastheartbeat": "Last heartbeat", +"label.lastsuccessfuljob": "Last successful job", "label.lastboottime": "Boot time of the management server machine", "label.lastname": "Last name", "label.lastname.lower": "lastname", @@ -1483,6 +1488,7 @@ "label.no.items": "No available Items", "label.no.matching.offering": "No matching offering found", "label.no.matching.network": "No matching Networks found", +"label.no.usage.records": "No usage records found", "label.noderootdisksize": "Node root disk size (in GB)", "label.nodiskcache": "No disk cache", "label.none": "None", @@ -1523,6 +1529,7 @@ "label.of": "of", "label.of.month": "of month", "label.offerha": "Offer HA", +"label.offeringid": "Offering ID", "label.offeringtype": "Compute offering type", "label.ok": "OK", "label.only.end.date.and.time": "Only end date and time", @@ -1700,6 +1707,8 @@ "label.publicnetwork": "Public Network", "label.publicport": "Public port", "label.purgeresources": "Purge Resources", +"label.purge.usage.records.success": "Successfuly purged usage records", +"label.purge.usage.records.error": "Failed while purging usage records", "label.purpose": "Purpose", "label.qostype": "QoS type", "label.quickview": "Quick view", @@ -1731,7 +1740,14 @@ "label.rados.secret": "RADOS secret", "label.rados.user": "RADOS user", "label.ram": "RAM", +"label.range.today": "Today", +"label.range.yesterday": "Yesterday", +"label.range.last.1week": "Last 1 week", +"label.range.last.2week": "Last 2 weeks", +"label.range.last.1month": "Last 1 month", +"label.range.last.3month": "Last 3 months", "label.raw.data": "Raw data", +"label.rawusage": "Raw usage (in hours)", "label.rbd": "RBD", "label.rbdid": "Cephx user", "label.rbdmonitor": "Ceph monitor", @@ -1975,6 +1991,7 @@ "label.sharedrouteripv6": "IPv6 address for the VR in this shared Network.", "label.sharewith": "Share with", "label.showing": "Showing", +"label.show.usage.records": "Show usage records", "label.shrinkok": "Shrink OK", "label.shutdown": "Shutdown", "label.shutdown.provider": "Shutdown provider", @@ -2283,8 +2300,22 @@ "label.upload.volume.from.url": "Upload volume from URL", "label.url": "URL", "label.usage.explanation": "Note: Only the usage server that owns the active usage job is shown here.", +"label.usage": "Usage", +"label.usage.records.downloading": "Downloading usage records", +"label.usage.records.fetch.child.domains": "Fetch usage records for child domains", +"label.usage.records.usagetype.required": "Usage type is required with resource ID", +"label.usage.records.generate": "Generate usage records", +"label.usage.records.generate.after": "Usage records will be created for the period after ", +"label.usage.records.generated": "A job has been created to generate usage records.", +"label.usage.records.generate.description": "If the scheduled usage job was not run or failed, this will generate records(only if there any records to be generated)", +"label.usage.records.purge": "Purge usage records", +"label.usage.records.purge.days": "Purge records older than", +"label.usage.records.purge.days.description": "Purge records older than the specified number of days.", +"label.usage.records.purge.alert": "Purging usage records will permanently delete the records from the database. Depending on the data being deleted, this can increase load on the database and may take a while. Are you sure you want to continue?", +"label.usageid": "Resource ID", "label.usageinterface": "Usage interface", "label.usagename": "Usage type", +"label.usagetype": "Usage type", "label.usageunit": "Unit", "label.usageislocal": "A Usage Server is installed locally", "label.usagetypedescription": "Usage description", diff --git a/ui/src/components/view/InfoCard.vue b/ui/src/components/view/InfoCard.vue index 7be369756e6..d4c0ffc77b6 100644 --- a/ui/src/components/view/InfoCard.vue +++ b/ui/src/components/view/InfoCard.vue @@ -448,7 +448,8 @@
{{ $t('label.volume') }}
- {{ resource.volumename || resource.volume || resource.volumeid }} + {{ resource.volumename || resource.volume || resource.volumeid }} + {{ resource.volumename || resource.volume || resource.volumeid }}
@@ -812,6 +813,7 @@ + + diff --git a/ui/src/views/tools/ManageInstances.vue b/ui/src/views/tools/ManageInstances.vue index b61c8a9efa5..160122d7903 100644 --- a/ui/src/views/tools/ManageInstances.vue +++ b/ui/src/views/tools/ManageInstances.vue @@ -19,19 +19,33 @@ - - - - - {{ $t('label.refresh') }} - + + + + + - + +