Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion pkg/unikontainers/hypervisors/cloud_hypervisor.go
Original file line number Diff line number Diff line change
Expand Up @@ -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), " ")...)
Expand All @@ -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 != "" {
Expand Down