[libvirt-users] Installing QEMU from source causing error

Hi, I am trying to run Qemu-4.0 installed from source code. When I run virt-manager to create a VM, I get the following error: ``` Unable to complete install: 'internal error: process exited while connecting to monitor: 2019-07-19T17:06:35.954242Z qemu-system-x86_64: -enable-kvm: unsupported machine type Use -machine help to list supported machines' Traceback (most recent call last): File "/usr/share/virt-manager/virtManager/asyncjob.py", line 89, in cb_wrapper callback(asyncjob, *args, **kwargs) File "/usr/share/virt-manager/virtManager/create.py", line 2553, in _do_async_install guest.start_install(meter=meter) File "/usr/share/virt-manager/virtinst/guest.py", line 498, in start_install doboot, transient) File "/usr/share/virt-manager/virtinst/guest.py", line 434, in _create_guest domain = self.conn.createXML(install_xml or final_xml, 0) File "/usr/lib/python2.7/dist-packages/libvirt.py", line 3603, in createXML if ret is None:raise libvirtError('virDomainCreateXML() failed', conn=self) libvirtError: internal error: process exited while connecting to monitor: 2019-07-19T17:06:35.954242Z qemu-system-x86_64: -enable-kvm: unsupported machine type Use -machine help to list supported machines ``` I configured the Qemu with following command: ``` ./../configure --prefix=/usr --enable-spice --target-list=x86_64-softmmu --enable-kvm --enable-debug --enable-libssh2 ``` Is it that I missed enabling any configuration while installing Qemu? What is the expected QEMU configuration to run with libvirt? - Probir

On Fri, Jul 19, 2019 at 12:16:25PM -0500, Probir Roy wrote:
Hi,
I am trying to run Qemu-4.0 installed from source code.
When I run virt-manager to create a VM, I get the following error:
``` Unable to complete install: 'internal error: process exited while connecting to monitor: 2019-07-19T17:06:35.954242Z qemu-system-x86_64: -enable-kvm: unsupported machine type Use -machine help to list supported machines'
You don't mention what your OS is ? Some OS vendors patch QEMU to have different machine types than upstream QEMU provides, and I guess that's what you've hit. If you look in your libvirt XML 'virsh dumpxml $GUESTNAME' you'll see a machine type listed - probably "pc-$SOMETHING" or "q35-$SOMETHING". If you simply delete the "-$SOMETHING" part to leave just "pc" or just "q35", then libvirt will expand the machine type into the latest one available with your self-built QEMU Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|

It is true that the machine contains 'pc-i440fx-4.0'. I am using Ubuntu18.04 and libvirt-4.0.0 This is probably a separate issue, but while updating the machine name neither "virsh define" or "virsh edit" updates the name to "pc". I was reading the FAQ of libvirt on updating the configuration at : https://wiki.libvirt.org/page/FAQ#What_is_the_.27virsh_edit.27_command_and_h... "... A common problem seen when people edit the on-disk XML is a VM that simply vanishes the next time libvirtd is restarted after the edit. The VM disappears from libvirt because the XML has become invalid, after which libvirt can't do anything with it. " Is it also true for virsh? I also tried creating a new VM by "virsh dumpxml" and editing the xml with new "name" and "pc" and removed the "uuid" field and then "virsh define". virsh creates a new domain with UUID, but with machine='pc-i440fx-4.0'. Is it possible the virsh is using some configuration that resetting to predefined machine name? On Fri, Jul 19, 2019 at 12:36 PM Daniel P. Berrangé <berrange@redhat.com> wrote:
On Fri, Jul 19, 2019 at 12:16:25PM -0500, Probir Roy wrote:
Hi,
I am trying to run Qemu-4.0 installed from source code.
When I run virt-manager to create a VM, I get the following error:
``` Unable to complete install: 'internal error: process exited while connecting to monitor: 2019-07-19T17:06:35.954242Z qemu-system-x86_64: -enable-kvm: unsupported machine type Use -machine help to list supported machines'
You don't mention what your OS is ? Some OS vendors patch QEMU to have different machine types than upstream QEMU provides, and I guess that's what you've hit.
If you look in your libvirt XML 'virsh dumpxml $GUESTNAME' you'll see a machine type listed - probably "pc-$SOMETHING" or "q35-$SOMETHING".
If you simply delete the "-$SOMETHING" part to leave just "pc" or just "q35", then libvirt will expand the machine type into the latest one available with your self-built QEMU
Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
-- Probir Roy College of William and Mary Phone: 7577531428 Web: www.probir.info

I also ran "virsh capabilities". It looks like the machine "pc-i440fx-4.0" is available there. Does it mean anything to this case? I am guessing "4.0" means Qemu version, which is the version I am trying to install from source. https://gist.github.com/proywm/433de1f410c5e7d68cff5833e03fb5dc On Sat, Jul 20, 2019 at 2:36 PM Probir Roy <proy@email.wm.edu> wrote:
It is true that the machine contains 'pc-i440fx-4.0'. I am using Ubuntu18.04 and libvirt-4.0.0
This is probably a separate issue, but while updating the machine name neither "virsh define" or "virsh edit" updates the name to "pc".
I was reading the FAQ of libvirt on updating the configuration at : https://wiki.libvirt.org/page/FAQ#What_is_the_.27virsh_edit.27_command_and_h...
"... A common problem seen when people edit the on-disk XML is a VM that simply vanishes the next time libvirtd is restarted after the edit. The VM disappears from libvirt because the XML has become invalid, after which libvirt can't do anything with it. "
Is it also true for virsh?
I also tried creating a new VM by "virsh dumpxml" and editing the xml with new "name" and "pc" and removed the "uuid" field and then "virsh define". virsh creates a new domain with UUID, but with machine='pc-i440fx-4.0'. Is it possible the virsh is using some configuration that resetting to predefined machine name?
On Fri, Jul 19, 2019 at 12:36 PM Daniel P. Berrangé <berrange@redhat.com> wrote:
On Fri, Jul 19, 2019 at 12:16:25PM -0500, Probir Roy wrote:
Hi,
I am trying to run Qemu-4.0 installed from source code.
When I run virt-manager to create a VM, I get the following error:
``` Unable to complete install: 'internal error: process exited while connecting to monitor: 2019-07-19T17:06:35.954242Z qemu-system-x86_64: -enable-kvm: unsupported machine type Use -machine help to list supported machines'
You don't mention what your OS is ? Some OS vendors patch QEMU to have different machine types than upstream QEMU provides, and I guess that's what you've hit.
If you look in your libvirt XML 'virsh dumpxml $GUESTNAME' you'll see a machine type listed - probably "pc-$SOMETHING" or "q35-$SOMETHING".
If you simply delete the "-$SOMETHING" part to leave just "pc" or just "q35", then libvirt will expand the machine type into the latest one available with your self-built QEMU
Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
-- Probir Roy College of William and Mary Phone: 7577531428 Web: www.probir.info
-- Probir Roy College of William and Mary Phone: 7577531428 Web: www.probir.info

On Sat, 2019-07-20 at 20:45 -0500, Probir Roy wrote:
I also ran "virsh capabilities". It looks like the machine "pc-i440fx-4.0" is available there. Does it mean anything to this case? I am guessing "4.0" means Qemu version, which is the version I am trying to install from source.
https://gist.github.com/proywm/433de1f410c5e7d68cff5833e03fb5dc
It's true that the pc-i440fx-4.0 machine type exists, but it's in the /usr/bin/kvm-spice binary while... [...]
I am trying to run Qemu-4.0 installed from source code.
When I run virt-manager to create a VM, I get the following error:
``` Unable to complete install: 'internal error: process exited while connecting to monitor: 2019-07-19T17:06:35.954242Z qemu-system-x86_64: -enable-kvm: unsupported machine type Use -machine help to list supported machines'
... from the error message it looks like you're using the /usr/bin/qemu-system-x86_64 binary instead, which does *not* contain that machine type. Since the newest machine type for that binary is versioned with 3.0, are you sure you've compiled and installed QEMU 4.0? -- Andrea Bolognani / Red Hat / Virtualization
participants (3)
-
Andrea Bolognani
-
Daniel P. Berrangé
-
Probir Roy