Bug 1719134 - VM Wizard creates VM with ReadWriteOnce disks instead of ReadWriteMany
Summary: VM Wizard creates VM with ReadWriteOnce disks instead of ReadWriteMany
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Container Native Virtualization (CNV)
Classification: Red Hat
Component: User Experience
Version: 2.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 2.0
Assignee: Rastislav Wagner
QA Contact: Radim Hrazdil
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-06-11 06:59 UTC by Radim Hrazdil
Modified: 2019-07-24 20:16 UTC (History)
7 users (show)

Fixed In Version: v2.0.0-14.8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-07-24 20:16:06 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
URL VM create with vm wizard (2.00 KB, text/plain)
2019-06-11 06:59 UTC, Radim Hrazdil
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2019:1850 0 None None None 2019-07-24 20:16:13 UTC

Description Radim Hrazdil 2019-06-11 06:59:55 UTC
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.

Comment 1 Radim Hrazdil 2019-06-11 07:24:43 UTC
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.

Comment 2 Qixuan Wang 2019-06-11 09:58:46 UTC
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.

Comment 3 Radim Hrazdil 2019-06-11 10:17:56 UTC
Hello Qixuan, yes that is what I meant. VM Wizard should create VMs with disks that have RWM access Mode.

Comment 4 Qixuan Wang 2019-06-11 10:37:59 UTC
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.

Comment 7 Rastislav Wagner 2019-06-11 11:41:03 UTC
backport https://github.com/kubevirt/web-ui-components/pull/496

Comment 8 Tomas Jelinek 2019-06-17 11:23:12 UTC
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?

Comment 9 Stephen Gordon 2019-06-17 11:49:39 UTC
(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.

Comment 11 Radim Hrazdil 2019-06-25 09:53:37 UTC
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

Comment 13 errata-xmlrpc 2019-07-24 20:16:06 UTC
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


Note You need to log in before you can comment on or make changes to this bug.