mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-28 16:27:50 +00:00
s390x: Share image between qemu instances
This commit enables the `share-rw` flag for the image file in s390x. This enables multiple instances of qemu to share the same image. Fixes: #2049 Signed-off-by: Jan Schintag <jan.schintag@de.ibm.com>
This commit is contained in:
parent
7965baab62
commit
7fa0a72f2e
@ -144,6 +144,9 @@ type BlockDrive struct {
|
|||||||
|
|
||||||
// DevNo identifies the css bus id for virtio-blk-ccw
|
// DevNo identifies the css bus id for virtio-blk-ccw
|
||||||
DevNo string
|
DevNo string
|
||||||
|
|
||||||
|
// ShareRW enables multiple qemu instances to share the File
|
||||||
|
ShareRW bool
|
||||||
}
|
}
|
||||||
|
|
||||||
// VFIODeviceType indicates VFIO device type
|
// VFIODeviceType indicates VFIO device type
|
||||||
|
@ -548,6 +548,7 @@ func genericBlockDevice(drive config.BlockDrive, nestedRun bool) (govmmQemu.Bloc
|
|||||||
Format: govmmQemu.BlockDeviceFormat(drive.Format),
|
Format: govmmQemu.BlockDeviceFormat(drive.Format),
|
||||||
Interface: "none",
|
Interface: "none",
|
||||||
DisableModern: nestedRun,
|
DisableModern: nestedRun,
|
||||||
|
ShareRW: drive.ShareRW,
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -131,6 +131,7 @@ func (q *qemuS390x) appendImage(devices []govmmQemu.Device, path string) ([]govm
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
drive.ShareRW = true
|
||||||
devices, err = q.appendBlockDevice(devices, drive)
|
devices, err = q.appendBlockDevice(devices, drive)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
Loading…
Reference in New Issue
Block a user