Fedora Account System
Red Hat Associate
Red Hat Customer
Created attachment 1579245 [details] URL VM create with vm wizard Description of problem: When user creates a VM using the VM Wizard, the VM is created with disk that has ReadWriteOnce accessMode. Migrating such VM fails on with error: {"response":{},"json":{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"admission webhook \"migration-create-validator.kubevirt.io\" denied the request: Cannot migrate VMI, Reason: DisksNotLiveMigratable, Message: cannot migrate VMI with non-shared PVCs","code":400}} oc describe vmi <example_vmi> Status: Conditions: Last Probe Time: <nil> Last Transition Time: <nil> Message: cannot migrate VMI with non-shared PVCs Reason: DisksNotLiveMigratable Status: False Type: LiveMigratable Last Probe Time: <nil> Last Transition Time: 2019-06-11T06:46:28Z Status: True Type: Ready Interfaces: Ip Address: 10.129.0.63 Mac: 02:ba:01:00:00:05 Name: nic0 Migration Method: BlockMigration Node Name: working-58vkh-worker-0-cpwrd Phase: Running VM Wizard should create the VM with ReadWriteMany disks. Version-Release number of selected component (if applicable): kubevirt-web-ui:v2.0.0-14.7 How reproducible: 100% Steps to Reproduce: 1. Create a VM using VM Wizard with URL provision source 2. Start the VM 3. Migrate the VM Actual results: Error, DisksNotLiveMigratable Expected results: Should be migratable Additional info: Creating the VM with only changed accessMode in the dataVolumeTemplate to ReadWriteMany makes Migration work.
It's worth adding that I have used NFS Storage. Also note that the same issue may go to V2V Imported VMs, as such VMs also have disks with ReadWriteOnce accessMode.
I think when access mode is RWO, it's not livemigratable is as expected. Live migration is only permitted when the volume access mode is set to ReadWriteMany. So here the problem should be "why creating VM using VM Wizard, the disk access mode is not RWX". Please correct me if I misunderstood something.
Hello Qixuan, yes that is what I meant. VM Wizard should create VMs with disks that have RWM access Mode.
Hi Radim, Create a VM using VM Wizard with URL provision source, it will use local storage. Our local PV is RWO, and DataVolume is also RWO.
https://github.com/kubevirt/web-ui-components/pull/495/
backport https://github.com/kubevirt/web-ui-components/pull/496
The problem with this bug is that we can either create the disks as RWO (as we do today) and than the VMs created using the wizard will not be migratable, or, we can create the disks as RWM but than we will not be able to start those VMs on local storage. @Moran/Steve: how should we handle this?
(In reply to Tomas Jelinek from comment #8) > The problem with this bug is that we can either create the disks as RWO (as > we do today) and than the VMs created using the wizard will not be > migratable, or, we can create the disks as RWM but than we will not be able > to start those VMs on local storage. > > @Moran/Steve: how should we handle this? We need to be able to detect/react to the storage, but in the default case for RHHI.Next the storage would be OCS. We do however have a customer using local storage as well though.
Verified that VM wizard crates DataVolumeTemplate with ReadWriteMany accessMode. Verified that when user selects storage class with RWM PVs available, the PVC binds correctly and VM can boot as expected. HCO v2.0.0-33 kubevirt-web-ui-container-v2.0.0-14.8
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHEA-2019:1850