mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-05 12:46:18 +01:00
47 lines
1.2 KiB
Plaintext
47 lines
1.2 KiB
Plaintext
// Module included in the following assemblies:
|
|
//
|
|
// * virt/virtual_machines/virtual_disks/virt-configuring-shared-volumes-for-vms.adoc
|
|
|
|
:_mod-docs-content-type: PROCEDURE
|
|
[id="virt-configuring-disk-sharing-lun-cli_{context}"]
|
|
= Configuring disk sharing by using LUN and the command line
|
|
|
|
You can use the command line to configure disk sharing by using LUN.
|
|
|
|
.Procedure
|
|
|
|
. Edit or create the `VirtualMachine` manifest for your VM to set the required values, as shown in the following example:
|
|
+
|
|
[source,yaml]
|
|
----
|
|
apiVersion: kubevirt.io/v1
|
|
kind: VirtualMachine
|
|
metadata:
|
|
name: vm-0
|
|
spec:
|
|
template:
|
|
spec:
|
|
domain:
|
|
devices:
|
|
disks:
|
|
- disk:
|
|
bus: sata
|
|
name: rootdisk
|
|
- errorPolicy: report
|
|
lun: <1>
|
|
bus: scsi
|
|
reservation: true <2>
|
|
name: na-shared
|
|
serial: shared1234
|
|
volumes:
|
|
- dataVolume:
|
|
name: vm-0
|
|
name: rootdisk
|
|
- name: na-shared
|
|
persistentVolumeClaim:
|
|
claimName: pvc-na-share
|
|
----
|
|
<1> Identifies a LUN disk.
|
|
<2> Identifies that the persistent reservation is enabled.
|
|
|
|
. Save the `VirtualMachine` manifest file to apply your changes. |