9.19.3.2.2. Configuring disk sharing by using LUN and the CLI
You can use the command line to configure disk sharing by using LUN.
Procedure
Edit or create the
VirtualMachinemanifest for your VM to set the required values, as shown in the following example:apiVersion: kubevirt.io/v1 kind: VirtualMachine metadata: name: vm-0 spec: template: spec: domain: devices: disks: - disk: bus: sata name: rootdisk - errorPolicy: report lun: bus: scsi reservation: true name: na-shared serial: shared1234 volumes: - dataVolume: name: vm-0 name: rootdisk - name: na-shared persistentVolumeClaim: claimName: pvc-na-share-
spec.template.spec.domain.devices.disks.errorPolicydefines how the hypervisor should behave when an IO error occurs. -
spec.template.spec.domain.devices.disks.lundefines a volume exposed as a LUN device. -
spec.template.spec.domain.devices.disks.lun.reservationdefines whether the persistent reservation is enabled.
-
-
Save the
VirtualMachinemanifest file to apply your changes.