Compare commits

...

4 commits

Author SHA1 Message Date
e2748f05a6
Merge branch 'f-36' 2026-08-13 15:46:22 +02:00
165b775881
f-36: doc: add conf for a new hypervisor
Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
2026-08-11 23:01:17 +02:00
5d157ec64d
f-36: qemu: fix pci.0 addr
All checks were successful
Pre Release Workflow / set-release-target (push) Successful in 1s
Pre Release Workflow / build (agent, amd64, linux) (push) Successful in 2m4s
Pre Release Workflow / build (metadata, amd64, linux) (push) Successful in 1m30s
Pre Release Workflow / upload-scripts (run-dnsmasq-in-netns.sh) (push) Successful in 6s
Pre Release Workflow / prerelease (push) Successful in 9s
Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
2026-08-10 22:14:33 +02:00
fbe6496e1e
f-36: disk: check disk with vdX is only one
Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
2026-08-10 22:13:48 +02:00
2 changed files with 26 additions and 5 deletions

View file

@ -1,3 +1,19 @@
# syonad
A simple but powerful orchestrator, designed to be easy to use and API-first.
## deployer
```
curl 'https://git.g3e.fr/syonad/two/raw/branch/main/scripts/deploy.sh' -O
bash deploy.sh
mv deploy.sh /opt/two/bin/
curl 'https://git.g3e.fr/syonad/two/raw/branch/main/systemd/agent.service' -o '/etc/systemd/system/agent.service'
curl 'https://git.g3e.fr/syonad/two/raw/branch/main/systemd/dnsmasq@.service' -o '/etc/systemd/system/dnsmasq@.service'
curl 'https://git.g3e.fr/syonad/two/raw/branch/main/systemd/metadata@.service' -o '/etc/systemd/system/metadata@.service'
systemctl daemon-reload
modprobe br_netfilter
echo br_netfilter > /etc/modules-load.d/br_netfilter.conf
```

View file

@ -53,14 +53,19 @@ func Start(cfg Config) error {
}
hasScsi := false
virtioBlk := 0
for _, d := range cfg.Disks {
if strings.HasPrefix(d.Dev, "sd") {
hasScsi = true
break
} else {
virtioBlk++
}
}
if virtioBlk > 1 {
return fmt.Errorf("qemu: %d disques virtio-blk (vd*) déclarés, un seul est supporté — utiliser des disques sd* pour les disques additionnels", virtioBlk)
}
if hasScsi {
args = append(args, "-device", "virtio-scsi-pci,id=scsi0")
args = append(args, "-device", "virtio-scsi-pci,id=scsi0,bus=pci.0,addr=0x1e")
}
sorted := make([]DiskConfig, len(cfg.Disks))
@ -87,14 +92,14 @@ func Start(cfg Config) error {
} else {
args = append(args,
"-drive", fmt.Sprintf("file=%s,if=none,id=%s", d.Path, d.Dev),
"-device", fmt.Sprintf("virtio-blk-pci,drive=%s,bootindex=%d", d.Dev, bootindex),
"-device", fmt.Sprintf("virtio-blk-pci,drive=%s,bus=pci.0,addr=0x1f,bootindex=%d", d.Dev, bootindex),
)
}
}
args = append(args,
"-netdev", fmt.Sprintf("tap,id=net0,ifname=tap%d,script=no,downscript=no", cfg.TapID),
"-device", fmt.Sprintf("virtio-net-pci,netdev=net0,mac=%s", cfg.Mac),
"-device", fmt.Sprintf("virtio-net-pci,netdev=net0,mac=%s,bus=pci.0,addr=0x03", cfg.Mac),
"-daemonize",
)