oz icon indicating copy to clipboard operation
oz copied to clipboard

kvm_put_msrs: Assertion `ret == cpu->kvm_msr_buf->nmsrs' failed.

Open willzgli opened this issue 6 years ago • 0 comments

I can start a vm with virsh-install in my environment , but when I use oz-install ,error happens .The error log as follow. I attached the ks and tdl file at last.

Hope someone will help me.

[root@test oz]# oz-install -u -p -d 4 -a centos7.ks centos7.tdl DEBUG:oz.Guest.RHEL7Guest:libvirt bridge name is virbr0 DEBUG:oz.Guest.RHEL7Guest:Libvirt type is kvm DEBUG:oz.Guest.RHEL7Guest:Name: centos_74_x86_64, UUID: b31f70c7-d63a-424e-88ba-87168e943c1d DEBUG:oz.Guest.RHEL7Guest:MAC: 52:54:00:ff:89:8b, distro: CentOS-7 DEBUG:oz.Guest.RHEL7Guest:update: 4, arch: x86_64, diskimage: /var/lib/libvirt/images/centos_74_x86_64.dsk DEBUG:oz.Guest.RHEL7Guest:nicmodel: virtio, clockoffset: utc DEBUG:oz.Guest.RHEL7Guest:mousetype: ps2, disk_bus: virtio, disk_dev: vda DEBUG:oz.Guest.RHEL7Guest:icicletmp: /var/lib/oz/icicletmp/centos_74_x86_64, listen_port: 41225 DEBUG:oz.Guest.RHEL7Guest:Original ISO path: /var/lib/oz/isos/CentOS-74x86_64-iso.iso DEBUG:oz.Guest.RHEL7Guest:Modified ISO cache: /var/lib/oz/isos/CentOS-74x86_64-iso-oz.iso DEBUG:oz.Guest.RHEL7Guest:Output ISO path: /var/lib/libvirt/images/centos_74_x86_64-iso-oz.iso DEBUG:oz.Guest.RHEL7Guest:ISO content path: /var/lib/oz/isocontent/centos_74_x86_64-iso INFO:oz.Guest.RHEL7Guest:Cleaning up guest named centos_74_x86_64 INFO:oz.Guest.RHEL7Guest:Generating install media DEBUG:oz.Guest.RHEL7Guest:Attempting to get the lock for /var/lib/oz/isos/CentOS-74x86_64-iso.iso DEBUG:oz.Guest.RHEL7Guest:Got the lock for /var/lib/oz/isos/CentOS-74x86_64-iso.iso INFO:oz.Guest.RHEL7Guest:Fetching the original media INFO:oz.Guest.RHEL7Guest:Original install media available, using cached version INFO:oz.Guest.RHEL7Guest:Copying ISO contents for modification INFO:oz.Guest.RHEL7Guest:Setting up guestfs handle for centos_74_x86_64 libguestfs: trace: set_verbose true libguestfs: trace: set_verbose = 0 libguestfs: trace: set_backend "direct" libguestfs: trace: set_backend = 0 libguestfs: create: flags = 0, handle = 0xfade00, program = python libguestfs: trace: set_program "oz-install" libguestfs: trace: set_program = 0 DEBUG:oz.Guest.RHEL7Guest:Adding ISO image /var/lib/oz/isos/CentOS-74x86_64-iso.iso libguestfs: trace: add_drive "/var/lib/oz/isos/CentOS-74x86_64-iso.iso" "readonly:true" "format:raw" libguestfs: creating COW overlay to protect original drive content libguestfs: trace: get_tmpdir libguestfs: trace: get_tmpdir = "/tmp" libguestfs: trace: disk_create "/tmp/libguestfsh1x7NX/overlay1" "qcow2" -1 "backingfile:/var/lib/oz/isos/CentOS-74x86_64-iso.iso" "backingformat:raw" libguestfs: command: run: qemu-img libguestfs: command: run: \ create libguestfs: command: run: \ -f qcow2 libguestfs: command: run: \ -o backing_file=/var/lib/oz/isos/CentOS-74x86_64-iso.iso,backing_fmt=raw libguestfs: command: run: \ /tmp/libguestfsh1x7NX/overlay1 Formatting '/tmp/libguestfsh1x7NX/overlay1', fmt=qcow2 size=830472192 backing_file=/var/lib/oz/isos/CentOS-74x86_64-iso.iso backing_fmt=raw encryption=off cluster_size=65536 lazy_refcounts=off refcount_bits=16 libguestfs: trace: disk_create = 0 libguestfs: trace: add_drive = 0 DEBUG:oz.Guest.RHEL7Guest:Launching guestfs libguestfs: trace: launch libguestfs: trace: version libguestfs: trace: version = <struct guestfs_version = major: 1, minor: 36, release: 3, extra: rhel=7,release=6.el7_4.3,libvirt, > libguestfs: trace: get_backend libguestfs: trace: get_backend = "direct" libguestfs: launch: program=oz-install libguestfs: launch: version=1.36.3rhel=7,release=6.el7_4.3,libvirt libguestfs: launch: backend registered: unix libguestfs: launch: backend registered: uml libguestfs: launch: backend registered: libvirt libguestfs: launch: backend registered: direct libguestfs: launch: backend=direct libguestfs: launch: tmpdir=/tmp/libguestfsh1x7NX libguestfs: launch: umask=0022 libguestfs: launch: euid=0 libguestfs: trace: get_backend_setting "force_tcg" libguestfs: trace: get_backend_setting = NULL (error) libguestfs: trace: get_cachedir libguestfs: trace: get_cachedir = "/var/tmp" libguestfs: begin building supermin appliance libguestfs: run supermin libguestfs: command: run: /usr/bin/supermin5 libguestfs: command: run: \ --build libguestfs: command: run: \ --verbose libguestfs: command: run: \ --if-newer libguestfs: command: run: \ --lock /var/tmp/.guestfs-0/lock libguestfs: command: run: \ --copy-kernel libguestfs: command: run: \ -f ext2 libguestfs: command: run: \ --host-cpu x86_64 libguestfs: command: run: \ /usr/lib64/guestfs/supermin.d libguestfs: command: run: \ -o /var/tmp/.guestfs-0/appliance.d supermin: version: 5.1.16 supermin: rpm: detected RPM version 4.11 supermin: package handler: fedora/rpm supermin: acquiring lock on /var/tmp/.guestfs-0/lock supermin: if-newer: output does not need rebuilding libguestfs: finished building supermin appliance libguestfs: begin testing qemu features libguestfs: trace: get_cachedir libguestfs: trace: get_cachedir = "/var/tmp" libguestfs: checking for previously cached test results of /usr/libexec/qemu-kvm, in /var/tmp/.guestfs-0 libguestfs: loading previously cached test results libguestfs: qemu version 2.9 libguestfs: trace: get_sockdir libguestfs: trace: get_sockdir = "/tmp" libguestfs: finished testing qemu features libguestfs: trace: get_backend_setting "gdb" libguestfs: trace: get_backend_setting = NULL (error) [00066ms] /usr/libexec/qemu-kvm
-global virtio-blk-pci.scsi=off
-nodefconfig
-enable-fips
-nodefaults
-display none
-machine accel=kvm:tcg
-cpu host
-m 500
-no-reboot
-rtc driftfix=slew
-no-hpet
-global kvm-pit.lost_tick_policy=discard
-kernel /var/tmp/.guestfs-0/appliance.d/kernel
-initrd /var/tmp/.guestfs-0/appliance.d/initrd
-object rng-random,filename=/dev/urandom,id=rng0
-device virtio-rng-pci,rng=rng0
-device virtio-scsi-pci,id=scsi
-drive file=/tmp/libguestfsh1x7NX/overlay1,cache=unsafe,format=qcow2,id=hd0,if=none
-device scsi-hd,drive=hd0
-drive file=/var/tmp/.guestfs-0/appliance.d/root,snapshot=on,id=appliance,cache=unsafe,if=none,format=raw
-device scsi-hd,drive=appliance
-device virtio-serial-pci
-serial stdio
-device sga
-chardev socket,path=/tmp/libguestfswP41kB/guestfsd.sock,id=channel0
-device virtserialport,chardev=channel0,name=org.libguestfs.channel.0
-append 'panic=1 console=ttyS0 edd=off udevtimeout=6000 udev.event-timeout=6000 no_timer_check printk.time=1 cgroup_disable=memory usbcore.nousb cryptomgr.notests tsc=reliable 8250.nr_uarts=1 root=/dev/sdb selinux=0 guestfs_verbose=1 TERM=xterm' qemu-kvm: error: failed to set MSR 0x38d to 0x0 qemu-kvm: /builddir/build/BUILD/qemu-2.9.0/target/i386/kvm.c:1843: kvm_put_msrs: Assertion `ret == cpu->kvm_msr_buf->nmsrs' failed. libguestfs: child_cleanup: 0xfade00: child process died libguestfs: sending SIGTERM to process 6731 libguestfs: trace: launch = -1 (error) INFO:oz.Guest.RHEL7Guest:Cleaning up after install Traceback (most recent call last): File "/usr/bin/oz-install", line 159, in customize or generate_icicle) File "/usr/lib/python2.7/site-packages/oz/RedHat.py", line 679, in generate_install_media customize_or_icicle) File "/usr/lib/python2.7/site-packages/oz/Guest.py", line 1828, in _iso_generate_install_media self._copy_iso() File "/usr/lib/python2.7/site-packages/oz/Guest.py", line 1484, in _copy_iso gfs.launch() File "/usr/lib64/python2.7/site-packages/guestfs.py", line 5742, in launch r = libguestfsmod.launch(self._o) RuntimeError: guestfs_launch failed, see earlier error messages libguestfs: trace: close libguestfs: closing guestfs handle 0xfade00 (state 0) libguestfs: command: run: rm libguestfs: command: run: \ -rf /tmp/libguestfsh1x7NX libguestfs: command: run: rm libguestfs: command: run: \ -rf /tmp/libguestfswP41kB

Bellow are the centos7.ks and centos7.tdl

centos7.tdl

q

centos7.ks

install text

lang en_US.UTF-8 keyboard us

network --bootproto dhcp network --hostname=localhost.localdomain firewall --enabled --service=ssh firstboot --disable auth --enableshadow --passalgo=sha512 rootpw --iscrypted thereisnopasswordanditslocked selinux --disabled services --disabled="kdump" --enabled= "network,sshd,rsyslog,chronyd, docker" timezone --utc Asia/Shanghai

ignoredisk --only-use=vda bootloader --location=mbr --timeout=1 --boot-drive=vda --append="console=tty0" zerombr yes clearpart --all --initlabel part / --fstype xfs --size=10240 --grow

repo --name "os" --baseurl="http://10.127.2.8/centos/7/os/x86_64/" --cost=100 repo --name "updates" --baseurl="http://10.127.2.8/centos/7/updates/x86_64/" --cost=100 repo --name "extras" --baseurl="http://10.127.2.8/centos/7/extras/x86_64/" --cost=100 repo --name "epel" --baseurl="http://10.127.2.8/epel/7/x86_64/" --cost=100 repo --name "docker-ce" --baseurl="http://10.127.2.8/docker-ce/linux/centos/7/x86_64/stable/" --cost=100

reboot

%packages --nobase --excludedocs wget vim cloud-init cloud-utils dracut-modules-growroot %end

willzgli avatar Apr 16 '18 10:04 willzgli