Skip to content

Commit a2fc137

Browse files
author
Audrey Spaulding
committed
new files added and to assembly
1 parent d532931 commit a2fc137

9 files changed

+141
-15
lines changed
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * virt/virtual_machines/virtual_disks/virt-configuring-shared-volumes-for-vms.adoc
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="virt-configuring-disk-sharing-lun-cli_{context}"]
7+
= Configuring disk sharing by using LUN and the command line
8+
9+
You can use the command line to configure disk sharing by using LUN.
10+
11+
.Procedure
12+
13+
. Edit or create the `VirtualMachine` manifest for your VM to set the required values, as shown in the following example:
14+
+
15+
[source,yaml]
16+
----
17+
apiVersion: kubevirt.io/v1
18+
kind: VirtualMachine
19+
metadata:
20+
name: vm-0
21+
spec:
22+
template:
23+
spec:
24+
domain:
25+
devices:
26+
disks:
27+
- disk:
28+
bus: sata
29+
name: rootdisk
30+
- errorPolicy: report
31+
lun: <1>
32+
bus: scsi
33+
reservation: true <2>
34+
name: na-shared
35+
serial: shared1234
36+
volumes:
37+
- dataVolume:
38+
name: vm-0
39+
name: rootdisk
40+
- name: na-shared
41+
persistentVolumeClaim:
42+
claimName: pvc-na-share
43+
----
44+
<1> Identifies a LUN disk.
45+
<2> Identifies that the persistent reservation is enabled.
46+
47+
. Save the `VirtualMachine` manifest file to apply your changes.
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * virt/virtual_machines/virtual_disks/virt-configuring-shared-volumes-for-vms.adoc
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="virt-configuring-disk-sharing-lun-web_{context}"]
7+
= Configuring disk sharing by using LUN and the web console
8+
9+
You can use the {product-title} web console to configure disk sharing by using LUN.
10+
11+
.Prerequisites
12+
13+
* The cluster administrator must enable the `persistentreservation` feature gate setting.
14+
15+
.Procedure
16+
17+
. Click *Virtualization* -> *VirtualMachines* in the web console.
18+
19+
. Select a VM to open the *VirtualMachine details* page.
20+
21+
. Expand *Storage*.
22+
23+
. On the *Disks* tab, click *Add disk*.
24+
25+
. Specify the *Name*, *Source*, *Size*, *Interface*, and *Storage Class*.
26+
27+
. Select *LUN* as the *Type*.
28+
29+
. Select *Shared access (RWX)* as the *Access Mode*.
30+
31+
. Select *Block* as the *Volume Mode*.
32+
33+
. Expand *Advanced Settings*, and select both checkboxes.
34+
35+
. Click *Save*.

modules/virt-configuring-disk-sharing-lun.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ You reserve a LUN through the SCSI persistent reserve options to protect data on
1414

1515
.Prerequisites
1616

17+
* You must have cluster administrator privileges to configure the feature gate option.
18+
1719
* The volume access mode must be `ReadWriteMany` (RWX) if the VMs that are sharing disks are running on different nodes.
1820
+
1921
If the VMs that are sharing disks are running on the same node, `ReadWriteOnce` (RWO) volume access mode is sufficient.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * * virt/virtual_machines/virtual_disks/virt-configuring-shared-volumes-for-vms.adoc
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="virt-enabling-persistentreservation-feature-gate-cli_{context}"]
7+
= Enabling the PersistentReservation feature gate by using the command line
8+
9+
You enable the `persistentReservation` feature gate by using the command line. Enabling the feature gate requires cluster administrator privileges.
10+
11+
.Procedure
12+
13+
. Enable the `persistentReservation` feature gate by running the following command:
14+
+
15+
[source,terminal,subs="attributes+"]
16+
----
17+
$ oc patch hyperconverged kubevirt-hyperconverged -n {CNVNamespace} \
18+
--type json -p '[{"op":"replace","path":"/spec/featureGates/persistentReservation", "value": true}]'
19+
----
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * * virt/virtual_machines/virtual_disks/virt-configuring-shared-volumes-for-vms.adoc
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="virt-enabling-persistentreservation-feature-gate-web_{context}"]
7+
= Enabling the PersistentReservation feature gate by using the web console
8+
9+
You must enable the PersistentReservation feature gate to allow a LUN-backed block mode virtual machine (VM) disk to be shared among multiple virtual machines. Enabling the feature gate requires cluster administrator privileges.
10+
11+
.Procedure
12+
13+
. Click *Virtualization* -> *Overview* in the web console.
14+
15+
. Click the *Settings* tab.
16+
17+
. Select *Cluster*.
18+
19+
. Expand *SCSI persistent reservation* and set *Enable persistent reservation* to on.

modules/virt-enabling-persistentreservation-feature-gate.adoc

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,16 @@
22
//
33
// * * virt/virtual_machines/virtual_disks/virt-configuring-shared-volumes-for-vms.adoc
44

5-
:_content-type: PROCEDURE
5+
:_mod-docs-content-type: PROCEDURE
66
[id="virt-enabling-persistentreservation-feature-gate_{context}"]
77
= Enabling the PersistentReservation feature gate
88

99
You can enable the SCSI `persistentReservation` feature gate and allow a LUN-backed block mode virtual machine (VM) disk to be shared among multiple virtual machines.
1010

11-
The `persistentReservation` feature gate is disabled by default.
11+
The `persistentReservation` feature gate is disabled by default. You can enable the `persistentReservation` feature gate by using the web console or the command line.
1212

1313
.Prerequisites
1414

1515
* Cluster administrator privileges are required.
1616
* The volume access mode `ReadWriteMany` (RWX) is required if the VMs that are sharing disks are running on different nodes. If the VMs that are sharing disks are running on the same node, the `ReadWriteOnce` (RWO) volume access mode is sufficient.
1717
* The storage provider must support a Container Storage Interface (CSI) driver that uses the SCSI protocol.
18-
19-
.Procedure
20-
21-
. Enable the `persistentReservation` feature gate by running the following command:
22-
+
23-
[source,terminal,subs="attributes+"]
24-
----
25-
$ oc patch hyperconverged kubevirt-hyperconverged -n {CNVNamespace} \
26-
--type json -p '[{"op":"replace","path":"/spec/featureGates/persistentReservation", "value": true}]'
27-
----

virt/getting_started/virt-web-console-overview.adoc

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ The *Overview* page displays resources, metrics, migration progress, and cluster
9797
|The *Settings* tab contains the *Cluster* tab, *User* tab, and *Preview features* tab.
9898
9999
|*Settings* -> xref:../../virt/getting_started/virt-web-console-overview.adoc#overview-settings-cluster_virt-web-console-overview[*Cluster* tab]
100-
|{VirtProductName} version, update status, live migration, templates project, preview features, and load balancer service settings.
100+
|{VirtProductName} version, update status, live migration, templates project, load balancer service, guest management, resource management, and SCSI persistent reservation settings.
101101
102102
|*Settings* -> xref:../../virt/getting_started/virt-web-console-overview.adoc#overview-settings-user_virt-web-console-overview[*User* tab]
103103
|Public SSH keys, user permissions, and welcome information settings.
@@ -226,7 +226,7 @@ The *Settings* tab displays cluster-wide settings.
226226
|Description
227227
228228
|xref:../../virt/getting_started/virt-web-console-overview.adoc#overview-settings-cluster_virt-web-console-overview[*Cluster* tab]
229-
|{VirtProductName} version and update status, live migration, templates project, and load balancer service settings.
229+
|{VirtProductName} version, update status, live migration, templates project, load balancer service, guest management, resource management, and SCSI persistent reservation settings.
230230
231231
|xref:../../virt/getting_started/virt-web-console-overview.adoc#overview-settings-user_virt-web-console-overview[*User* tab]
232232
|Public SSH key management, user permissions, and welcome information settings.
@@ -286,6 +286,9 @@ The cluster must have a load balancer configured.
286286
|Expand this section to select a project for Red Hat templates. The default project is `openshift`.
287287
288288
To store Red Hat templates in multiple projects, xref:../../virt/getting_started/virt-web-console-overview.adoc#templates-page_virt-web-console-overview[clone the template] and then select a project for the cloned template.
289+
290+
|*SCSI persistent reservation* section
291+
|Expand this section to enable persistent reservation for cluster-aware applications.
289292
|====
290293
=====
291294

@@ -398,7 +401,7 @@ include::snippets/technology-preview.adoc[]
398401
|Project in which bootable volumes are stored. The default is `openshift-virtualization-os-images`.
399402
400403
|*Add volume* button
401-
|Click to upload a new volume or to use an existing persistent volume claim.
404+
|Click to upload a volume or to use an existing persistent volume claim, volume snapshot, or data source.
402405
403406
|*Filter* field
404407
|Filter boot sources by operating system or resource.

virt/virtual_machines/virt-edit-vms.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ You can update a virtual machine (VM) configuration by using the {product-title}
1010

1111
You can also edit a VM by using the command line.
1212

13+
To edit a VM to configure disk sharing by using virtual disks or LUN, see xref:../../virt/virtual_machines/virtual_disks/virt-configuring-shared-volumes-for-vms.adoc#virt-configuring-shared-volumes-for-vms[Configuring shared volumes for virtual machines].
14+
1315
include::modules/virt-editing-vm-cli.adoc[leveloffset=+1]
1416

1517
include::modules/virt-add-disk-to-vm.adoc[leveloffset=+1]

virt/virtual_machines/virtual_disks/virt-configuring-shared-volumes-for-vms.adoc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
= Configuring shared volumes for virtual machines
44
include::_attributes/common-attributes.adoc[]
55
:context: virt-configuring-shared-volumes-for-vms
6+
67
toc::[]
78

89
You can configure shared disks to allow multiple virtual machines (VMs) to share the same underlying storage. A shared disk's volume must be block mode.
@@ -16,8 +17,16 @@ include::modules/virt-configuring-vm-disk-sharing.adoc[leveloffset=+1]
1617

1718
include::modules/virt-configuring-disk-sharing-lun.adoc[leveloffset=+1]
1819

20+
include::modules/virt-configuring-disk-sharing-lun-web.adoc[leveloffset=+2]
21+
22+
include::modules/virt-configuring-disk-sharing-lun-cli.adoc[leveloffset=+2]
23+
1924
include::modules/virt-enabling-persistentreservation-feature-gate.adoc[leveloffset=+1]
2025

26+
include::modules/virt-enabling-persistentreservation-feature-gate-web.adoc[leveloffset=+2]
27+
28+
include::modules/virt-enabling-persistentreservation-feature-gate-cli.adoc[leveloffset=+2]
29+
2130
[role="_additional-resources"]
2231
.Additional resources
2332
* link:https://www.qemu.org/docs/master/interop/pr-helper.html[Persistent reservation helper protocol]

0 commit comments

Comments
 (0)