virt-install error while trying to create a new image
Dear Openstack community, I am trying to create a new image for Ironic. I followed the documentation but got an error with virt-install. Please note: The OS has been reinstalled The host is a physical machine BIOS has virtualization enabled I changed /etc/libvirt/qemu.conf group from root to kvm following some linux forum instructions about this error but the issue persists # virt-install --virt-type kvm --name centos --ram 1024 --disk /tmp/centos.qcow2,format=qcow2 --network network=default --graphics vnc,listen=0.0.0.0 --noautoconsole --os-type=linux --os-variant=centos7.0 --location=/root/CentOS-7-x86_64-NetInstall-1810.iso Starting install... Retrieving file .treeinfo... | 0 B 00:00:00 Retrieving file content... | 0 B 00:00:00 Retrieving file vmlinuz... | 6.3 MB 00:00:00 Retrieving file initrd.img... | 50 MB 00:00:00 ERROR unsupported configuration: CPU mode 'custom' for x86_64 kvm domain on x86_64 host is not supported by hypervisor Domain installation does not appear to have been successful. If it was, you can restart your domain by running: virsh --connect qemu:///system start centos otherwise, please restart your installation. Any thoughts? Thank you very much Manuel Sopena Ballesteros | Big data Engineer Garvan Institute of Medical Research The Kinghorn Cancer Centre, 370 Victoria Street, Darlinghurst, NSW 2010 T: + 61 (0)2 9355 5760 | F: +61 (0)2 9295 8507 | E: manuel.sb@garvan.org.au<mailto:manuel.sb@garvan.org.au> NOTICE Please consider the environment before printing this email. This message and any attachments are intended for the addressee named and may contain legally privileged/confidential/copyright information. If you are not the intended recipient, you should not read, use, disclose, copy or distribute this communication. If you have received this message in error please notify us at once by return email and then delete both messages. We accept no liability for the distribution of viruses or similar in electronic communications. This notice should not be removed.
On Tue, Feb 05, 2019 at 10:45:27PM +0000, Manuel Sopena Ballesteros wrote:
Dear Openstack community,
I am trying to create a new image for Ironic. I followed the documentation but got an error with virt-install.
[...]
Please note:
The OS has been reinstalled The host is a physical machine BIOS has virtualization enabled I changed /etc/libvirt/qemu.conf group from root to kvm following some linux forum instructions about this error but the issue persists
That's fine. Please also post your host kernel, QEMU and libvirt versions.
# virt-install --virt-type kvm --name centos --ram 1024 --disk /tmp/centos.qcow2,format=qcow2 --network network=default --graphics vnc,listen=0.0.0.0 --noautoconsole --os-type=linux --os-variant=centos7.0 --location=/root/CentOS-7-x86_64-NetInstall-1810.iso
Starting install...
Retrieving file .treeinfo... | 0 B 00:00:00 Retrieving file content... | 0 B 00:00:00 Retrieving file vmlinuz... | 6.3 MB 00:00:00 Retrieving file initrd.img... | 50 MB 00:00:00 ERROR unsupported configuration: CPU mode 'custom' for x86_64 kvm domain on x86_64 host is not supported by hypervisor Domain installation does not appear to have been successful.
That error means a low-level QEMU command (that queries for what vCPUs QEMU supports) has failed for "some reason". To debug this, we need /var/log/libvirt/libvirtd.log with log filters. (a) Remove this directory and its contents (this step is specific to this problem; it's not always required): $ rm /var/cache/libvirt/qemu/ (b) Set the following in your /etc/libvirt/libvirtd.conf: log_filters="1:libvirt 1:qemu 1:conf 1:security 3:event 3:json 3:file 3:object 1:util 1:cpu" log_outputs="1:file:/var/log/libvirt/libvirtd.log" (c) Restart libvirtd: `systemctl restart libvirtd` (d) Repeat the test; and post the /var/log/libvirt/libvirtd.log somewhere. [...] BTW, I would highly recommend the `virt-builder` approach to create disk images for various operating systems and importing it to libvirt. (1) Download a CentOS 7.6 template (with latest updates) 20G of disk: $ sudo dnf install libguestfs-tools-c $ virt-builder centos-7.6 --update -o centos-vm1.qcow2 \ --selinux-relabel --size 20G (2) Import the downloaded disk image into libvirt: $ virt-install \ --name centosvm1 --ram 2048 \ --disk path=centos.img,format=qcow2 \ --os-variant centos7.0 \ --import Note-1: Although the command is called `virt-install`, we aren't _installing_ anything in this case. Note-2: The '--os-variant' can be whatever the nearest possible variant that's available on your host. To find the list of variants for your current Fedora release, run: `osinfo-query os | grep centos`. (The `osinfo-query` tool comes with the 'libosinfo' package.) The `virt-builder` tool is also available in Debian and Ubuntu. [...] -- /kashyap
participants (2)
-
Kashyap Chamarthy
-
Manuel Sopena Ballesteros