Hi, what you are describing has been in CDI for a while now. Let me rephrase this a little bit so I am sure I understand what you are trying to do.
1. You create a DV in namespace1, let's call this DV source. This creates a matching PVC in that namespace. You import/upload a disk into that DV.
2. Now you want to have a copy of that DV in namespace2, let's call this DV workload.
3. You want to clone source from namespace1 to workload in namespace2?
If so you can use the following yaml in namespace2:
apiVersion: cdi.kubevirt.io/v1alpha1
kind: DataVolume
metadata:
name: workload
namespace: namespace2
spec:
source:
pvc:
namespace: namespace1
name: source
pvc:
storageClassName: <your storage class> #you can omit if your storage class is the default
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
The user running this will need to have appropriate permissions in both namespaces for this to work, for details see [0]. Unfortunately this uses the slow cloning (copy byte by byte) method as AFAIK you cannot snapshot across namespaces. We are working with the storage sig to try and get namespace transfer for objects into kubernetes, so we can do a snapshot clone in namespace1 and then transfer it to namespace2 which should all be fast operations. So for now we are stuck with the copy byte by byte method.
Alexander
--
You received this message because you are subscribed to the Google Groups "kubevirt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kubevirt-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kubevirt-dev/088f345f-211b-435b-80e0-eb11d4daab4f%40googlegroups.com.