Bug 1334562 - libxl: virt-install default <graphics> gets no listen= address, virt-viewer fails
Summary: libxl: virt-install default <graphics> gets no listen= address, virt-viewer f...
Keywords:
Status: NEW
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libvirt
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Libvirt Maintainers
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-05-10 02:47 UTC by Konrad Rzeszutek Wilk
Modified: 2018-07-18 14:53 UTC (History)
13 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)
xenstore-ls view (8.98 KB, text/plain)
2016-05-10 02:47 UTC, Konrad Rzeszutek Wilk
no flags Details
virt-install -debug .blah blah 2>stderr.txt output (7.09 KB, text/plain)
2016-05-10 17:01 UTC, Konrad Rzeszutek Wilk
no flags Details

Description Konrad Rzeszutek Wilk 2016-05-10 02:47:13 UTC
Created attachment 1155506 [details]
xenstore-ls view

Description of problem:

I try to install an Xen guest under Fedora 24:

root@tst032 F19-64]# virt-install    -n F24-64 --memory 1024 --location http://192.168.102.1:/tftpboot/lab/tst031/f24  --disk /var/lib/libvirt/images/f24-i686.img --network bridge=switch,mac=00:0f:4b:01:00:87

Starting install...
Retrieving file vmlinuz...                                                                                   | 6.0 MB  00:00:00     
Retrieving file initrd.img...                                                                                |  54 MB  00:00:00     
Creating domain...                                                                                           |    0 B  00:00:02     
Gtk-Message: Failed to load module "pk-gtk-module"
Gtk-Message: Failed to load module "canberra-gtk-module"
Gtk-Message: Failed to load module "pk-gtk-module"
Gtk-Message: Failed to load module "canberra-gtk-module"
Domain installation still in progress. You can reconnect to 
the console to complete the installation process.


and I get that message from 'virt-viewer':
Failed to connect. Display can only be attached through libvirt with --attach


I've no idea what it means. I thought it meant you could
use an console:

[root@tst032 F19-64]# virsh
Welcome to virsh, the virtualization interactive terminal.

Type:  'help' for help with commands
       'quit' to quit

virsh # list
 Id    Name                           State
----------------------------------------------------
 0     Domain-0                       running
 6     F24-64                         running

virsh # console 6
Connected to domain F24-64
Escape character is ^]
error: operation failed: PTY device is not yet assigned


But that fails?

xl console 6
does not work either
And
vncviewer :1 gets nothing.

Version-Release number of selected component (if applicable):
virt-install-1.3.2-3.fc24.noarch


How reproducible:


Steps to Reproduce:
1. Install Fedora 24
2. Install Xen (dnf install xen)
3. Reboot in Xen
4. (in the meantime) - uncompress the F24 ISO to an web-location
5. Setup a bridge (optional).
6. virt-install    -n F24-64 --memory 1024 --location http://192.168.102.1:/tftpboot/lab/tst031/f24  --disk /var/lib/libvirt/images/f24-i686.img --network bridge=switch,mac=00:0f:4b:01:00:87

Actual results:

Error message.

Expected results:

A screen with anaconda running.

Additional info:

This used to work in the past..

Comment 1 Cole Robinson 2016-05-10 15:42:10 UTC
Thanks for the report. virt-install --debug will probably tell us what the culprit is. My guess is that the XML we get back from xen does not have a graphical listen= address in it or something, which confuses virt-viewer

Comment 2 Konrad Rzeszutek Wilk 2016-05-10 17:01:03 UTC
Created attachment 1155796 [details]
virt-install -debug .blah blah 2>stderr.txt output

Here is the output.

Comment 3 Konrad Rzeszutek Wilk 2016-05-10 17:02:39 UTC
Specifically I did:
virt-install --debug   -n F24-64 --memory 1024 --location http://192.168.102.1:/tftpboot/lab/tst031/f24  --disk /var/lib/libvirt/images/f24-i686.img --network bridge=switch,mac=00:0f:4b:01:00:87 2>stderr.txt

Comment 4 Cole Robinson 2016-05-10 18:07:04 UTC
So the issue here is that the XML we get back from the libxl driver looks like

    <graphics type='vnc' port='5900' autoport='yes' keymap='en-us'/>

Which doesn't tell us what the listen= address is. virt-viewer doesn't know what address to connect to. The XML virtinst sent in was:

    <graphics type="vnc" port="-1" keymap="en-us"/>

For the qemu driver, no request for a listen address means 'please fill in the default' which can be changed in /etc/libvirt/qemu.conf. Does libxl have something similar? If not virtinst needs to be changed, or libxl could just default to listen=127.0.0.1 which is the qemu.conf default

Comment 5 Cole Robinson 2016-05-19 13:39:53 UTC
fwiw virt-manager seems to work fine in this case since the spice and vnc clients default to listen=127.0.0.1 as well, but virt-viewer is complaining nowadays. regardless I think libxl should explicitly report 127.0.0.1 in this case

Comment 6 Jim Fehlig 2016-05-20 04:11:04 UTC
(In reply to Cole Robinson from comment #5)
> regardless I think libxl should explicitly report 127.0.0.1 in
> this case

Agreed. I've added this to my todo list for the libxl driver.

Comment 7 Konrad Rzeszutek Wilk 2016-05-23 17:31:06 UTC
So this is very odd.

I updated libvirt to libvirt-1.3.3.1-2.fc24.x86_64
and it looks to launch the guest (still get the error).

If I look in XenStore I see:

[root@tst032 ~]# xenstore-ls /local/domain/6/device/vfb
0 = ""
 backend = "/local/domain/0/backend/vfb/6/0"
 backend-id = "0"
 state = "3"
 page-ref = "1107844"
 event-channel = "9"
 protocol = "x86_64-abi"
 feature-update = "1"
[root@tst032 ~]# 

Which is good. However qemu:
root      3057     1  0 12:04 ?        00:00:00 /usr/bin/qemu-system-i386 -xen-domid 6 -chardev socket,id=libxl-cmd,path=/var/run/xen/qmp-libxl-6,server,nowait -no-shutdown -mon chardev=libxl-cmd,mode=control -chardev socket,id=libxenstat-cmd,path=/var/run/xen/qmp-libxenstat-6,server,nowait -mon chardev=libxenstat-cmd,mode=control -nodefaults -xen-attach -name F24-64_2 -vnc 127.0.0.1:0 -display none -k en-us -machine xenpv -m 2048

Has 'display' none! Let me try with an HVM guest.

Comment 8 Cole Robinson 2017-05-03 20:47:06 UTC
Still seems relevant with libvirt 3.2.0, here's example XML I get from libvirt after the following virt-install command line:

# virt-install --connect xen:/// --name vnc-test --ram 64 --nodisks --pxe --hvm --graphics vnc --noautoconsole

...

# virsh --connect xen:/// dumpxml vnc-test
...
    <graphics type='vnc' port='5900' autoport='yes' keymap='en-us'>
      <listen type='address'/>
    </graphics>
    <video>
      <model type='cirrus' vram='8192' heads='1' primary='yes'/>
    </video>
...

Comment 9 Jim Fehlig 2017-05-17 21:41:25 UTC
Patch sent upstream to add the listen address to the <graphics> config

https://www.redhat.com/archives/libvir-list/2017-May/msg00616.html

Comment 10 Jim Fehlig 2017-05-19 22:41:06 UTC
V2 posted on libvirt dev list for review

https://www.redhat.com/archives/libvir-list/2017-May/msg00760.html


Note You need to log in before you can comment on or make changes to this bug.