Closed shyer closed 4 days ago
Thanks for the feedback. This is a bug in the documentation, we will fix it in the next version. For now we recommend to use storage: ContainerRegistry
we use rook ceph as storage, wish save image to ceph rbd block (stroageClass: ceph-block), then create VirtualMachineDisk from VirtualMachineImage store in ceph-block. we assume it use rbd clone
like openstack to skip copy image to host node (windows image is too large)
i create a VirtualMachineDisk from VirtualMachineImage(use storage: Kubernetes
),it allways in Pending
state.
apiVersion: virtualization.deckhouse.io/v1alpha2
kind: VirtualMachineDisk
metadata:
name: cirros-003-boot
namespace: vms
spec:
persistentVolumeClaim:
size: 200Mi
storageClassName: ceph-block
dataSource:
type: VirtualMachineImage
virtualMachineImage:
name: cirros-002
in code, seem like no logic for storage: Kubernetes
, so storage: Kubernetes
will not support in next version?
https://github.com/deckhouse/virtualization/blob/main/images/virtualization-artifact/pkg/controller/vmd_datavolume.go#L138
case ds != nil && ds.Type == virtv2.DataSourceTypeVirtualMachineImage:
vmiRef := ds.VirtualMachineImage
dvcrSourceImageName := r.dvcrSettings.RegistryImageForVMI(vmiRef.Name, vmd.Namespace)
dvBuilder.SetRegistryDataSource(dvcrSourceImageName, authSecretName, caBundleName)
case vmdutil.IsBlankPVC(vmd):
Kubernetes storage support for VMI will not be available yet, at least not in the next version, there are some issues that need to be resolved before it will be in the release.
I apologize for the long wait, this feature is planned for implementation. I will report here as soon as it is ready.
Preflight Checklist
Version
v1.56.9
Expected Behavior
can store VirtualMachineImage on Kubernetes use custom storageClassName
Actual Behavior
The VirtualMachineImage "cirros-image-002" is invalid:
Steps To Reproduce
cirros-image-002.yaml
kubectl apply -f cirros-image-002.yaml
Additional Information
virtualmachineimage crd missing
storage: Kubernetes
andpersistentVolumeClaim.storageClassName
https://github.com/deckhouse/virtualization/blob/main/crds/virtualmachineimage.yaml#L44https://deckhouse.io/modules/virtualization/stable/examples.html#
Logs
No response