[pve-devel] [PATCH pve-manager 2/3] Fix #5708: Add CPU raw counters

2024-09-18 Thread Sascha Westermann via pve-devel
--- Begin Message --- Add a map containing raw values from /proc/stat and "uptime_ticks" which can be used in combination with cpuinfo.user_hz to calculate CPU usage from two samples. "uptime_ticks" is only defined at the top level, as /proc/stat is read once, so that core-specific raw values match

[pve-devel] [PATCH qemu-server 3/3] Fix #5708: Add CPU raw counters

2024-09-18 Thread Sascha Westermann via pve-devel
--- Begin Message --- Add a map containing raw values from /proc//stat (utime, stime and guest_time), "uptime_ticks" and "user_hz" (from cpuinfo) to calcuate physical CPU usage from two samples. In addition, virtual CPU statistics based on /proc//task//schedstat ( for virtual cores) are added - bas

[pve-devel] [PATCH pve-manager v2] d/control: change binary package architecture from `any` to `all`

2024-09-18 Thread Jing Luo via pve-devel
--- Begin Message --- There is no architecture dependent binary files in the final deb package. There is no shared libs either (says debhelper), so let's remove that too. Signed-off-by: Jing Luo Reviewed-by: Fabian Grünbichler --- Changes since v1: Change the $(DEB) in Makefile too, forgot to ad

Re: [pve-devel] [PATCH v3 storage] fix #5191: api, cli: implement moving a volume between storages

2024-09-18 Thread Filip Schauer
On 05/09/2024 14:12, Fiona Ebner wrote: @@ -483,15 +485,173 @@ __PACKAGE__->register_method ({ return $upid; }}); +sub volume_move { Should this even be a new top-level method? Or can/should we extend export/import instead, to not only cover guest images? Because with this top-l

[pve-devel] [PATCH v4 storage 4/6] storage: introduce decompress_archive_into_pipe helper

2024-09-18 Thread Filip Schauer
Signed-off-by: Filip Schauer --- src/PVE/Storage.pm | 64 +- 1 file changed, 40 insertions(+), 24 deletions(-) diff --git a/src/PVE/Storage.pm b/src/PVE/Storage.pm index 12f7b3f..e5f5326 100755 --- a/src/PVE/Storage.pm +++ b/src/PVE/Storage.pm @@ -1682

[pve-devel] [PATCH v4 storage 2/6] api: content: implement moving a volume between storages

2024-09-18 Thread Filip Schauer
Add the ability to move an iso, snippet or vztmpl between storages and nodes. Use curl to call the API method: ``` curl https://$APINODE:8006/api2/json/nodes/$SOURCENODE/storage/$SOURCESTORAGE/content/$SOURCEVOLUME \ --insecure --cookie "$( --- src/PVE/API2/Storage/Content.pm | 149 +++

[pve-devel] [PATCH v4 storage 3/6] api: content: support moving backups between path based storages

2024-09-18 Thread Filip Schauer
Signed-off-by: Filip Schauer --- src/PVE/API2/Storage/Content.pm | 41 ++-- src/PVE/Storage.pm | 10 +++- src/PVE/Storage/Plugin.pm | 42 ++--- 3 files changed, 87 insertions(+), 6 deletions(-) diff --git a/src/PVE/AP

[pve-devel] [PATCH v4 storage 5/6] support moving VMA backups to PBS

2024-09-18 Thread Filip Schauer
Extend the move API to support moving VMA backups to a Proxmox Backup Server. Signed-off-by: Filip Schauer --- debian/control | 1 + src/PVE/API2/Storage/Content.pm | 86 ++--- src/PVE/Storage/PBSPlugin.pm| 65 + 3 files c

[pve-devel] [PATCH v4 storage 6/6] pvesm: add a move-volume command

2024-09-18 Thread Filip Schauer
The method can be called from the PVE shell with `pvesm move-volume`: ``` pvesm move-volume [--target-node ] [--delete] ``` For example to move a VMA backup to a Proxmox Backup Server: ``` pvesm move-volume \ local:backup/vzdump-qemu-100-2024_06_25-13_08_56.vma.zst pbs ``` Or move a cont

[pve-devel] [PATCH v4 storage 1/6] plugin: allow volume import of iso, snippets and vztmpl

2024-09-18 Thread Filip Schauer
Signed-off-by: Filip Schauer --- src/PVE/Storage/Plugin.pm | 67 +-- 1 file changed, 43 insertions(+), 24 deletions(-) diff --git a/src/PVE/Storage/Plugin.pm b/src/PVE/Storage/Plugin.pm index 8cc693c..57536c6 100644 --- a/src/PVE/Storage/Plugin.pm +++ b/src/PV

[pve-devel] [PATCH v4 storage 0/6] support moving volumes between storages

2024-09-18 Thread Filip Schauer
Add the ability to move a backup, ISO, container template or snippet between storages and nodes via an API method. Moving a VMA backup to a Proxmox Backup Server requires the proxmox-vma-to-pbs package to be installed. Currently only VMA backups can be moved to a Proxmox Backup Server and moving ba