From 059b4b23a379a5f96ad875e56c505c2913294354 Mon Sep 17 00:00:00 2001 From: Anirudh Date: Mon, 24 Aug 2026 18:57:15 +0530 Subject: [PATCH] fix(cloud-hypervisor): pass block devices in a single --disk flag --- pkg/unikontainers/hypervisors/cloud_hypervisor.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkg/unikontainers/hypervisors/cloud_hypervisor.go b/pkg/unikontainers/hypervisors/cloud_hypervisor.go index 606a3c02e..62bf9e08b 100644 --- a/pkg/unikontainers/hypervisors/cloud_hypervisor.go +++ b/pkg/unikontainers/hypervisors/cloud_hypervisor.go @@ -108,6 +108,7 @@ func (ch *CloudHypervisor) BuildExecCmd(args types.ExecArgs, ukernel types.Unike // Block device configuration blockArgs := ukernel.MonitorBlockCli() + var disks []string for _, blockArg := range blockArgs { if blockArg.ExactArgs != "" { exArgs = append(exArgs, strings.Split(strings.TrimSpace(blockArg.ExactArgs), " ")...) @@ -116,9 +117,13 @@ func (ch *CloudHypervisor) BuildExecCmd(args types.ExecArgs, ukernel types.Unike if blockArg.ID != "" { diskArg += fmt.Sprintf(",id=%s", blockArg.ID) } - exArgs = append(exArgs, "--disk", diskArg) + disks = append(disks, diskArg) } } + if len(disks) > 0 { + exArgs = append(exArgs, "--disk") + exArgs = append(exArgs, disks...) + } // Initrd configuration if args.InitrdPath != "" {