SUSE Support

Here When You Need Us

On s390x: ioctl(KVM_CREATE_VM) failed: 22 Invalid argument

This document (7020138) is provided subject to the disclaimer at the end of this document.

Environment

SUSE Linux Enterprise Server 12 Service Pack 2 (SLES 12 SP2)

Situation

Deploying a new Virtual Machine via Virtual Machine Manager on s390x fails.
The following error is shown in the /var/log/libvirt/qemu/ logs:

<date> <time>: starting up libvirt version: 2.0.0, qemu version: 2.6.1 (SUSE Linux Enterprise 12), hostname: host.foo.com
LC_ALL=C PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin QEMU_AUDIO_DRV=none /usr/bin/qemu-system-s390x
-name guest=sles12sp2,debug-threads=on ....
....
char device redirected to /dev/pts/3 (label charconsole0)
ioctl(KVM_CREATE_VM) failed: 22 Invalid argument
Host kernel setup problem detected. Please verify:
- for kernels supporting the switch_amode or user_mode parameters, whether
  user space is running in primary address space
- for kernels supporting the vm.allocate_pgste sysctl, whether it is enabled
failed to initialize KVM: Invalid argument
<date> <time>: shutting down

Resolution

The  qemu update,  qemu-2.6.2-41.9.1 released March 2017 includes the patch to resolve the problem.
Please install the recommended update.

Cause

To allow KVM to run on s390x, the sysctl value "vm.allocate_pgste =" needs to be '1': vm.allocate_pgste = 1.
The /etc/sysctl.d/50-allow-kvm-on-s390x includes the correct value but the file was missing it's .conf ending so it wasn't used.

Additional Information


Disclaimer

This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:7020138
  • Creation Date: 31-May-2017
  • Modified Date:03-Mar-2020
    • SUSE Linux Enterprise Server

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com

tick icon

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

tick icon

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.

tick icon

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.