Why virt-sysprep is failing with error "inspect_os: fork: : Cannot allocate memory"

Solution Verified - Updated -


  • virt-sysprep execution is failing with the error below.
ocaml_exn: 'inspect_os' raised 'Unix.Unix_error' exception
guestfsd: error: fork: : Cannot allocate memory
libguestfs: trace: inspect_os = NULL (error)
virt-sysprep: error: libguestfs error: inspect_os: fork: : Cannot allocate
libguestfs: trace: close
libguestfs: closing guestfs handle 0x564e10bd30b0 (state 2)


  • Red Hat Enterprise Linux 8.1.
  • Red Hat Enterprise Linux 8.2.

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content