mirror of
https://github.com/morgan9e/systemd
synced 2026-04-14 08:25:20 +09:00
26 lines
535 B
Python
Executable File
26 lines
535 B
Python
Executable File
#!/usr/bin/python3
|
|
# SPDX-License-Identifier: LGPL-2.1-or-later
|
|
|
|
import json
|
|
import sys
|
|
|
|
|
|
config = json.load(sys.stdin)
|
|
|
|
config["QemuArgs"] += ["-device", "virtio-scsi-pci,id=scsi0"]
|
|
|
|
for i in range(5):
|
|
id = f"drivemdadmbasic{i}"
|
|
config["Drives"] += [
|
|
{
|
|
"Id": id,
|
|
"Size": "64M",
|
|
"Options": "cache=unsafe",
|
|
}
|
|
]
|
|
config["QemuArgs"] += [
|
|
"-device", f"scsi-hd,drive={id},vendor=systemd,product=foobar,serial=deadbeefmdadm{i}",
|
|
]
|
|
|
|
json.dump(config, sys.stdout)
|