Description of problem:
When a user creates a VM template with a datavolume and then creates a VM from this template with the same name, the VM's DV fails to be created due to name collision.
The error message is the following:
Error creating DataVolume unique2-rootdisk: admission webhook "datavolume-validate.cdi.kubevirt.io" denied the request: Destination PVC already exists
Version-Release number of selected component (if applicable):
not reproducible on 4.3
Steps to Reproduce:
1. Create a VM Template from URL called 'x'
2. Create a VM using template 'x', name it 'x' as well
3. Start the VM
VM ends up in VM Error state
Should be able to boot
since it is not reproducible on 4.3, targeting 4.4
Can't reproduce on current master :-(
I created a template named "fedora-01" using a container "'kubevirt/fedora-cloud-container-disk-demo:latest'"
the devices part looks like:
- name: rootdisk
- bus: virtio
- name: nic0
Then I created a VM called "fedora-01" using that template, It runs.
Radim, what am I missing, to I need to do something with the datavolumes ?
with a container, there is no issue.
The issue was when I selected template from URL source, called the vm template 'x', and then created a VM from this VM template called 'x' as well.
However, I tried to reproduce it on current 4.4 environment and the issue is no longer present. The datavolume of the created VM is now called x-rootdisk-clone, which doesn't clash with the VM Template diks.
Moving to verified.