linux – virt-install crashes, no apparent error in the logs, and the virsh list shows its execution after the ctrl c output, no domifaddr if

I was thrown into a management box that virtually the person before me was using virtually, so trying to upgrade. As a test, make a virtual installation of this:

virt-install --virt-type = kvm --name kosmos-icc --ram 1000 --os-variant = centos7.0 --cdrom = / var / lib / libvirt / boot / CentOS-7-x86_64-Minimal- 1810.iso --network = bridge = virbr0, model = virtio --graphics vnc - disk path = / var / lib / libvirt / images / centos7.qcow2, size = 8, bus = virtio, format = qcow2 --boot userserial = on

It works with this:

WARNING Charts requested but DISPLAY is not set. Do not run virt-viewer.
WARNING No console to launch for the guest, default --wait -1

Start the installation ...
Allocation of & centos7.qcow2 & # 39; | 8.0 GB 00:00:00
The installation of the domain is still in progress. Waiting for the end of the installation.

Then I block, I can press ctrl-c and get my prompt, make a list virsh shows that it is running, but do a virsh domifaddr kosmos-icc shows nothing (the other that is generic and which was installed with the mistletoe) shows the IP address (which I can ssh in) of the machine.

So, I do not know why it does not finish or if it is silent and if I miss a switch. I assumed virbr0 was the way to go with the network. So we must continue to learn virsh / virt and see if I can via a command line install a virtual machine and then replicate the process on an untested machine.

The installation logs in /root/.cache/virt-manager do not show any real errors … in fact, they indicate:

[Wed, 19 Jun 2019 11:28:38 virt-install 351]    DEBUG (guest: 441) XML retrieved from the libvirt object:

... the xml ...


[Wed, 19 Jun 2019 11:28:38 virt-install 351] DEBUG (virt-install: 744) State of the domain after installation: 1

This state after installation is the last line before the log shows the interruption of my ctrl-c keyboard.

Virtualization kvm – the choice of virt-install graphics determines whether the installed guest will start or not after installation

Please let me know if I am doing something wrong or it is a bug.

Host operating system: Debian 9.6 Stretch amd64

Package:

ii libvirt-daemon 3.0.0-4 + deb9u3 amd64 virtualization daemon
ii libvirt-daemon-system 3.0.0-4 + deb9u3 Libvirt amd64 demon configuration files
ii libvirt-glib-1.0-0: amd64 1.0.0-1 amd64 libvirt, mapping library GLib and GObject
ii libvirt0 3.0.0-4 + deb9u3 amd64 library for interfacing with different virtualization systems
ii python-libvirt 3.0.0-2 amd64 libvirt Python bindings
ii qemu-kvm 1: 2.8 + dfsg-6 + deb9u5 amd64 QEMU Full Virtualization on x86 Hardware
ii virt-viewer 5.0-1 amd64 Displaying the graphical console of a virtual machine
ii virtinst 1: 1.4.0-5 all programs to create and clone virtual machines

Also verified on:
Host OS: Ubuntu 18.04.1 LTS amd64

packages:

ii libvirt-clients 4.0.0-1ubuntu8.5 amd64 Programs for the library libvirt
ii libvirt-daemon 4.0.0-1ubuntu8.5 amd64 virtualization daemon
ii libvirt-daemon-driver-storage-rbd 4.0.0-1ubuntu8.5 virtualization daemon RBD storage driver
ii libvirt-daemon-system 4.0.0-1ubuntu8.5 libvirt amd64 demon configuration files
ii libvirt-glib-1.0-0: amd64 1.0.0-1 amd64 libvirt, mapping library GLib and GObject
ii libvirt0: amd64 library 4.0.0-1ubuntu8.5 amd64 for interfacing with different virtualization systems
ii ovmf 0 ~ 20180205.c0d9813c-2 all UEFI firmware for 64-bit x86 virtual machines
ii python-libvirt 4.0.0-1 amd64 libvirt Python bindings
ii qemu-kvm 1: 2.11 + dfsg-1ubuntu7.8 amd64 QEMU Full Virtualization on x86 Hardware
ii virt-viewer 6.0-2 amd64 Viewing the graphical console of a virtual machine
ii virtinst 1: 1.5.1-0ubuntu1.1 all programs to create and clone virtual machines

Guest OS: Ubuntu 18.04.1 LTS amd64

Guest OS: Debian 9.6 amd64

If I install one of the linux guests with an office environment with the help of the command:

virt-install --virt-type = kvm 
--name ubuntu1804 --ram 4096 --vcpus 4 
--os-variant = ubuntu16.04 --hvm 
--cdrom /tmp/ubuntu-18.04.1-desktop-amd64.iso 
--network bridge = br0, model = virtio 
--graphics vnc 
- disk path = / tmp / ubuntu1804.qcow2, size = 32

The installation will succeed, but at the first restart after installation, the guest hangs during startup.

If the graphics are changed spice, the guest operating system starts without problems.

virt-install --virt-type = kvm 
--name ubuntu1804 --ram 4096 --vcpus 4 
--os-variant = ubuntu16.04 --hvm 
--cdrom /tmp/ubuntu-18.04.1-desktop-amd64.iso 
--network bridge = br0, model = virtio 
--graphics spice 
- disk path = / tmp / ubuntu1804.qcow2, size = 32

This has also been tested with a Debian 9.6 guest. If I install the operating system with –graphics vnc and I choose to install a "desktop environment", the first reboot after installation will be blocked when "booting to from the hard disk ". If I choose not to install a "desktop environment", the reboot after the installation starts correctly. If I add add –graphics spice, the guest operating system will boot properly after installation with the desktop environment (instead of –graphics vnc, which will cause the hangup ).

I guess this is not the expected behavior, but I am unable to understand why the choice of the graphical display configuration affects the ability of the guest to start.

18.04 – virt-install with the Ubuntu 18 server fails with "ERROR Could not find the hvm kernel for the Ubuntu tree".

Hello everyone here (Greenhorn here),

I have a server with the Ubuntu 18.04.1 server that runs naked. I'm trying to run a VM using virt-install. It works with 14.04 and 16.04, but I experience a complete failure when trying to use 18.04 or 18.10. My installation is fully updated. I'm trying to run a version of the Alpha software, hence the need for a virtual machine, and it turns out that it requires version 18 (that's what I am told).

ziggidy @ zeus: ~ / ISOs $ lsb_release -a
No LSB module is available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.1 LTS
Released: 18.04
Code name: Bionic
ziggidy @ zeus: ~ / ISOs $

Here is the syntax I use to run virtual machines. I have two virtual machines running under 14.04 with zero problems for a few months, so they are good. I'm not sure of the error, but I ran wget to get the ISO version 18 a few times straight from Ubuntu, without knowing if it's the ISO that is causing the problem or not.

Problem with 18.04

ziggidy @ zeus: ~ / ISOs $ sudo virt-install 
> --name Hermes 
> --description "Bedrock Minecraft VM" 
> --os-type = Linux 
> --os-variant = ubuntu18.04 
> --ram = 2048 
> --vcpus = 2 
> - disk path = / home / ziggidy / VMs / Drive2 / Hermes.img, bus = virtio, size = 50 
> --network bridge: br0 
> --graphics none 
> --location /home/ziggidy/ISOs/ubuntu-18.04.1-live-server-amd64.iso 
> --extra-args console = ttyS0

Start the installation ...
Recovering the .treeinfo file ... | 0 B 00:00:00
Recovering the contents of the file ... | 0 B 00:00:00
Retrieving file information ... | 70B 00:00:00
ERROR Can not find the HVM kernel for the Ubuntu tree.
The installation of the domain does not seem to have succeeded.
If that was the case, you can restart your domain by running:
virsh --connect qemu: /// start the Hermes system
otherwise, please restart your installation.
ziggidy @ zeus: ~ / ISOs $

Same error of trying the server 18.10

ziggidy @ zeus: ~ / ISOs $ sudo virt-install 
> --name Hermes 
> --description "Bedrock Minecraft VM" 
> --os-type = Linux 
> --os-variant = ubuntu18.10 
> --ram = 2048 
> --vcpus = 2 
> - disk path = / home / ziggidy / VMs / Drive2 / Hermes.img, bus = virtio, size = 50 
> --network bridge: br0 
> --graphics none 
> --location /home/ziggidy/ISOs/ubuntu-18.10-live-server-amd64.iso 
> --extra-args console = ttyS0

Start the installation ...
Recovering the .treeinfo file ... | 0 B 00:00:00
Recovering the contents of the file ... | 0 B 00:00:00
Retrieving file information ... | 68B 00:00:00
ERROR Can not find the HVM kernel for the Ubuntu tree.
The installation of the domain does not seem to have succeeded.
If that was the case, you can restart your domain by running:
virsh --connect qemu: /// start the Hermes system
otherwise, please restart your installation.
ziggidy @ zeus: ~ / ISOs $

Good with zero problems with 16.04

ziggidy @ zeus: ~ / ISOs $ sudo virt-install 
> --name Hermes 
> --description "Bedrock Minecraft VM" 
> --os-type = Linux 
> --os-variant = ubuntu16.04 
> --ram = 2048 
> --vcpus = 2 
> - disk path = / home / ziggidy / VMs / Drive2 / Hermes.img, bus = virtio, size = 50 
> --network bridge: br0 
> --graphics none 
> --location /home/ziggidy/ISOs/ubuntu-16.04.5-server-amd64.iso 
> --extra-args console = ttyS0

Start the installation ...
Recovering the .treeinfo file ... | 0 B 00:00:00
Recovering the contents of the file ... | 0 B 00:00:00
Retrieving file information ... | 67 B 00:00:00
Recovering the vmlinuz file ... | 6.8 MB 00:00:00
Retrieving the initrd.gz file ... | 14 Mo 00:00:00
^ The installation of CDomain is interrupted.
Installation canceled at the request of the user
ziggidy @ zeus: ~ / ISOs $