mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-09-28 20:15:51 +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:
@@ -144,6 +144,9 @@ type BlockDrive struct {
|
||||
|
||||
// DevNo identifies the css bus id for virtio-blk-ccw
|
||||
DevNo string
|
||||
|
||||
// ShareRW enables multiple qemu instances to share the File
|
||||
ShareRW bool
|
||||
}
|
||||
|
||||
// VFIODeviceType indicates VFIO device type
|
||||
|
@@ -548,6 +548,7 @@ func genericBlockDevice(drive config.BlockDrive, nestedRun bool) (govmmQemu.Bloc
|
||||
Format: govmmQemu.BlockDeviceFormat(drive.Format),
|
||||
Interface: "none",
|
||||
DisableModern: nestedRun,
|
||||
ShareRW: drive.ShareRW,
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
@@ -131,6 +131,7 @@ func (q *qemuS390x) appendImage(devices []govmmQemu.Device, path string) ([]govm
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
drive.ShareRW = true
|
||||
devices, err = q.appendBlockDevice(devices, drive)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
Reference in New Issue
Block a user