Skip to content
Merged
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
10 changes: 9 additions & 1 deletion src/libguestfish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,16 @@ coreos_gf_run() {
return
fi
coreos_gf_launch "$@"

# set-smp has a limit of 255 vcpus, anything over that will error
# See: https://github.com/libguestfs/libguestfs/blob/5011bea96da06878864149767650bcc41f425fb9/lib/handle.c#L916
local ncpus
ncpus=$(kola ncpu)
if [ "$ncpus" -gt 255 ]; then
ncpus=255
fi
# Allow mksquashfs to parallelize
coreos_gf set-smp "$(kola ncpu)"
coreos_gf set-smp "$ncpus"
coreos_gf run
GUESTFISH_RUNNING=1
}
Expand Down
Loading