jeanvetorello opened a new issue, #11697:
URL: https://github.com/apache/cloudstack/issues/11697

   ### problem
   
   Actual behavior 
   
   2025-09-22 19:24:58,440 DEBUG [kvm.storage.KVMStorageProcessor] 
(AgentRequest-Handler-5:[]) (logid:03909a05) Attempting to backup RBD snapshot 
cloudstack/07....
   2025-09-22 19:24:58,441 DEBUG [kvm.storage.KVMStorageProcessor] 
(AgentRequest-Handler-5:[]) (logid:03909a05) Attempting to create 
/snapshots/2/505 recursively for snapshot storage
   2025-09-22 19:24:58,449 DEBUG [kvm.storage.KVMStorageProcessor] 
(AgentRequest-Handler-5:[]) (logid:03909a05) Backing up RBD snapshot 
cloudstack/07a70846-dd72-4d7e-8b38-96eccd2458ef@bbda9153-f224-47c3-95ac-f368d849da20
 to **/snapshots/2/505/bbda9153-f224-47c3-95ac-f368d849da20**
   
   The KVM agent writes to local paths:
   
   /snapshots/<accountId>/<volumeId>/<uuid>
   /template/tmpl/<accountId>/<templateId>
   
   
   These directories exist only locally on the host, not on the shared NFS.
   
   As a result, SSVM cannot find the file and the job fails with:
   
   cp: -r not specified; omitting directory 
'/mnt/SecStorage/.../snapshots/.../<uuid>'
   java.lang.NullPointerException: Cannot read field "format" because "newInfo" 
is null
   
   Logs
   
   From KVM Agent (/var/log/cloudstack/agent/agent.log):
   
   Backing up RBD snapshot cloudstack/<vol>@<snap> to /snapshots/2/505/<uuid>
   Executing command [qemu-img convert -O qcow2 -U rbd:cloudstack/... 
/snapshots/2/505/<uuid>].
   
   
   From SSVM (/var/log/cloud.log):
   
   cp .../snapshots/.../<uuid> .../template/.../<uuid>.raw
   cp: -r not specified; omitting directory 
'/mnt/SecStorage/.../snapshots/.../<uuid>'
   java.lang.NullPointerException: Cannot read field "format" because "newInfo" 
is null
   
   Workaround
   
   Mount the NFS secondary storage explicitly on the KVM host at /snapshots and 
/template:
   
   192.168.1.80:/cloudstack/template   /template   nfs   defaults,_netdev   0 0
   192.168.1.80:/cloudstack/snapshots  /snapshots  nfs   defaults,_netdev   0 0
   
   
   After this mount, qemu-img convert outputs go directly to the NFS and 
templates work correctly.
   
   ### versions
   
   Environment
   
   CloudStack version: 4.21.0.0
   
   Hypervisor: KVM (Ubuntu 22.04)
   
   Primary storage: Ceph RBD (poolType=RBD)
   
   Secondary storage: NFS (nfs://192.168.1.80/cloudstack)
   
   Agents: qemu-utils, ceph-common, nbdkit installed
   
   
   
   ### The steps to reproduce the bug
   
   Steps to reproduce
   
   Deploy CloudStack with:
   
   KVM host using Ceph RBD as primary storage
   
   NFS secondary storage
   
   Create a VM and take a snapshot of the ROOT volume.
   
   Try to create a template from this snapshot.
   ...
   
   
   ### What to do about it?
   
   _No response_


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@cloudstack.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to