diff --git a/README.md b/README.md index 0467392..24a67ed 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,3 @@ # 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 -``` +A simple but powerful orchestrator, designed to be easy to use and API-first. \ No newline at end of file diff --git a/internal/qemu/start_linux.go b/internal/qemu/start_linux.go index 181bb1d..a7869a2 100644 --- a/internal/qemu/start_linux.go +++ b/internal/qemu/start_linux.go @@ -53,19 +53,14 @@ func Start(cfg Config) error { } hasScsi := false - virtioBlk := 0 for _, d := range cfg.Disks { if strings.HasPrefix(d.Dev, "sd") { hasScsi = true - } else { - virtioBlk++ + break } } - 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,bus=pci.0,addr=0x1e") + args = append(args, "-device", "virtio-scsi-pci,id=scsi0") } sorted := make([]DiskConfig, len(cfg.Disks)) @@ -92,14 +87,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,bus=pci.0,addr=0x1f,bootindex=%d", d.Dev, bootindex), + "-device", fmt.Sprintf("virtio-blk-pci,drive=%s,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,bus=pci.0,addr=0x03", cfg.Mac), + "-device", fmt.Sprintf("virtio-net-pci,netdev=net0,mac=%s", cfg.Mac), "-daemonize", )