[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Porting Xen in raspberry pi4B



Hi Stefano,

Thanks!

I used xen-guest-image-minimal(simple console based image) as a guest with fbcon & fbdev enabled in kernel configurations but still the same error can't open the display.
below are the outcome of "xenstore-ls":

root@raspberrypi4-64:~/guest1# xenstore-ls
tool = ""
 xenstored = ""
local = ""
 domain = ""
  0 = ""
   control = ""
    feature-poweroff = "1"
    feature-reboot = "1"
   domid = "0"
   name = "Domain-0"
   device-model = ""
    0 = ""
     backends = ""
      console = ""
      vkbd = ""
      vfb = ""
      qnic = ""
     state = "running"
    1 = ""
     backends = ""
      console = ""
      vkbd = ""
      vfb = ""
      qnic = ""
     state = "running"
   backend = ""
    vbd = ""
     1 = ""
      51712 = ""
       frontend = "/local/domain/1/device/vbd/51712"
       params = "/home/root/guest2/xen-guest-image-minimal-raspberrypi4-64.ext3"
       script = "/etc/xen/scripts/block"
       frontend-id = "1"
       _online_ = "1"
       removable = "0"
       bootable = "1"
       state = "4"
       dev = "xvda"
       type = "phy"
       mode = "w"
       device-type = "disk"
       discard-enable = "1"
       feature-max-indirect-segments = "256"
       multi-queue-max-queues = "4"
       max-ring-page-order = "4"
       node = "/dev/loop0"
       physical-device = "7:0"
       physical-device-path = "/dev/loop0"
       hotplug-status = "connected"
       feature-flush-cache = "1"
       discard-granularity = "4096"
       discard-alignment = "0"
       discard-secure = "0"
       feature-discard = "1"
       feature-barrier = "1"
       feature-persistent = "1"
       sectors = "1794048"
       info = "0"
       sector-size = "512"
       physical-sector-size = "512"
    vfb = ""
     1 = ""
      0 = ""
       frontend = "/local/domain/1/device/vfb/0"
       frontend-id = "1"
       _online_ = "1"
       state = "4"
       vnc = "1"
       vnclisten = "127.0.0.1"
       vncdisplay = "0"
       vncunused = "1"
       sdl = "0"
       opengl = "0"
       feature-resize = "1"
       hotplug-status = "connected"
       request-update = "1"
    vkbd = ""
     1 = ""
      0 = ""
       frontend = "/local/domain/1/device/vkbd/0"
       frontend-id = "1"
       _online_ = "1"
       state = "4"
       feature-abs-pointer = "1"
       feature-raw-pointer = "1"
       hotplug-status = "connected"
    console = ""
     1 = ""
      0 = ""
       frontend = "/local/domain/1/console"
       frontend-id = "1"
       _online_ = "1"
       state = "1"
       protocol = "vt100"
    vif = ""
     1 = ""
      0 = ""
       frontend = "/local/domain/1/device/vif/0"
       frontend-id = "1"
       _online_ = "1"
       state = "4"
       script = "/etc/xen/scripts/vif-bridge"
       mac = "e4:5f:01:cd:7b:dd"
       bridge = "xenbr0"
       handle = "0"
       type = "vif"
       hotplug-status = "connected"
       feature-sg = "1"
       feature-gso-tcpv4 = "1"
       feature-gso-tcpv6 = "1"
       feature-ipv6-csum-offload = "1"
       feature-rx-copy = "1"
       feature-xdp-headroom = "1"
       feature-rx-flip = "0"
       feature-multicast-control = "1"
       feature-dynamic-multicast-control = "1"
       feature-split-event-channels = "1"
       multi-queue-max-queues = "4"
       feature-ctrl-ring = "1"
  1 = ""
   vm = "/vm/d81ec5a9-5bf9-4f2b-89e8-0f60d6da948f"
   name = "guest2"
   cpu = ""
    0 = ""
     availability = "online"
    1 = ""
     availability = "online"
   memory = ""
    static-max = "2097152"
    target = "2097152"
    videoram = "0"
   device = ""
    suspend = ""
     event-channel = ""
    vbd = ""
     51712 = ""
      backend = "/local/domain/0/backend/vbd/1/51712"
      backend-id = "0"
      state = "4"
      virtual-device = "51712"
      device-type = "disk"
      multi-queue-num-queues = "2"
      queue-0 = ""
       ring-ref = "8"
       event-channel = "4"
      queue-1 = ""
       ring-ref = "9"
       event-channel = "5"
      protocol = "arm-abi"
      feature-persistent = "1"
    vfb = ""
     0 = ""
      backend = "/local/domain/0/backend/vfb/1/0"
      backend-id = "0"
      state = "4"
      page-ref = "275022"
      event-channel = "3"
      protocol = "arm-abi"
      feature-update = "1"
    vkbd = ""
     0 = ""
      backend = "/local/domain/0/backend/vkbd/1/0"
      backend-id = "0"
      state = "4"
      request-abs-pointer = "1"
      page-ref = "275322"
      page-gref = "1284"
      event-channel = "10"
    vif = ""
     0 = ""
      backend = "/local/domain/0/backend/vif/1/0"
      backend-id = "0"
      state = "4"
      handle = "0"
      mac = "e4:5f:01:cd:7b:dd"
      mtu = "1500"
      xdp-headroom = "0"
      multi-queue-num-queues = "2"
      queue-0 = ""
       tx-ring-ref = "1280"
       rx-ring-ref = "1281"
       event-channel-tx = "6"
       event-channel-rx = "7"
      queue-1 = ""
       tx-ring-ref = "1282"
       rx-ring-ref = "1283"
       event-channel-tx = "8"
       event-channel-rx = "9"
      request-rx-copy = "1"
      feature-rx-notify = "1"
      feature-sg = "1"
      feature-gso-tcpv4 = "1"
      feature-gso-tcpv6 = "1"
      feature-ipv6-csum-offload = "1"
   control = ""
    shutdown = ""
    feature-poweroff = "1"
    feature-reboot = "1"
    feature-suspend = ""
    sysrq = ""
    platform-feature-multiprocessor-suspend = "1"
    platform-feature-xs_reset_watches = "1"
   data = "">   drivers = ""
   feature = ""
   attr = ""
   error = ""
   domid = "1"
   store = ""
    port = "1"
    ring-ref = "233473"
   console = ""
    backend = "/local/domain/0/backend/console/1/0"
    backend-id = "0"
    limit = "1048576"
    type = "xenconsoled"
    output = "pty"
    tty = "/dev/pts/1"
    port = "2"
    ring-ref = "233472"
    vnc-listen = "127.0.0.1"
    vnc-port = "5900"
   image = ""
    device-model-pid = "788"
vm = ""
 d81ec5a9-5bf9-4f2b-89e8-0f60d6da948f = ""
  name = "guest2"
  uuid = "d81ec5a9-5bf9-4f2b-89e8-0f60d6da948f"
  start_time = "1520600274.27"
libxl = ""
 1 = ""
  device = ""
   vbd = ""
    51712 = ""
     frontend = "/local/domain/1/device/vbd/51712"
     backend = "/local/domain/0/backend/vbd/1/51712"
     params = "/home/root/guest2/xen-guest-image-minimal-raspberrypi4-64.ext3"
     script = "/etc/xen/scripts/block"
     frontend-id = "1"
     _online_ = "1"
     removable = "0"
     bootable = "1"
     state = "1"
     dev = "xvda"
     type = "phy"
     mode = "w"
     device-type = "disk"
     discard-enable = "1"
   vfb = ""
    0 = ""
     frontend = "/local/domain/1/device/vfb/0"
     backend = "/local/domain/0/backend/vfb/1/0"
     frontend-id = "1"
     _online_ = "1"
     state = "1"
     vnc = "1"
     vnclisten = "127.0.0.1"
     vncdisplay = "0"
     vncunused = "1"
     sdl = "0"
     opengl = "0"
   vkbd = ""
    0 = ""
     frontend = "/local/domain/1/device/vkbd/0"
     backend = "/local/domain/0/backend/vkbd/1/0"
     frontend-id = "1"
     _online_ = "1"
     state = "1"
   console = ""
    0 = ""
     frontend = "/local/domain/1/console"
     backend = "/local/domain/0/backend/console/1/0"
     frontend-id = "1"
     _online_ = "1"
     state = "1"
     protocol = "vt100"
   vif = ""
    0 = ""
     frontend = "/local/domain/1/device/vif/0"
     backend = "/local/domain/0/backend/vif/1/0"
     frontend-id = "1"
     _online_ = "1"
     state = "1"
     script = "/etc/xen/scripts/vif-bridge"
     mac = "e4:5f:01:cd:7b:dd"
     bridge = "xenbr0"
     handle = "0"
     type = "vif"
     hotplug-status = ""
  type = "pvh"
  dm-version = "qemu_xen"
root@raspberrypi4-64:~/guest1#


Any input as per above? Looking forward to hearing from you.

Regards,
Vipul Kumar

On Wed, Oct 26, 2022 at 5:21 AM Stefano Stabellini <sstabellini@xxxxxxxxxx> wrote:
Hi Vipul,

If you look at the QEMU logs, it says:

VNC server running on 127.0.0.1:5900

That is the VNC server you need to connect to. So in theory:

  vncviewer 127.0.0.1:5900

should work correctly.


If you have:

  vfb = ["type=vnc"]

in your xl config file and you have "fbdev" in your Linux guest, it
should work.

If you connect to the VNC server but you get a black screen, it might be
a guest configuration issue. I would try with a simpler guest, text only
(no X11, no Wayland) and enable the fbdev console (fbcon). See
Documentation/fb/fbcon.rst in Linux. You should be able to see a
graphical console over VNC.

If that works, then you know that the fbdev kernel driver (xen-fbfront)
works correctly.

If it doesn't work, the output of "xenstore-ls" would be interesting.

Cheers,

Stefano


On Wed, 19 Oct 2022, Vipul Suneja wrote:
> Hi Stefano,
>
> Thanks for the response!
>
> I am following the same link you shared from the beginning. Tried the command "vncviewer localhost:0" in DOM0 but same issue "Can't open
> display", below are the logs:
>
> root@raspberrypi4-64:~# vncviewer localhost:0
>
> TigerVNC Viewer 64-bit v1.11.0
> Built on: 2020-09-08 12:16
> Copyright (C) 1999-2020 TigerVNC Team and many others (see README.rst)
> See https://www.tigervnc.org for information on TigerVNC.
> Can't open display:
>
> Below are the netstat logs, i couldn't see anything running at port 5900 or 5901:
>
> root@raspberrypi4-64:~# netstat -tuwx
> Active Internet connections (w/o servers)
> Proto Recv-Q Send-Q Local Address           Foreign Address         State      
> tcp        0    164 192.168.1.39:ssh        192.168.1.38:37472      ESTABLISHED
> Active UNIX domain sockets (w/o servers)
> Proto RefCnt Flags       Type       State         I-Node Path
> unix  8      [ ]         DGRAM      CONNECTED      10565 /dev/log
> unix  3      [ ]         STREAM     CONNECTED      10891 /var/run/xenstored/socket
> unix  3      [ ]         STREAM     CONNECTED      13791
> unix  3      [ ]         STREAM     CONNECTED      10843 /var/run/xenstored/socket
> unix  3      [ ]         STREAM     CONNECTED      10573 /var/run/xenstored/socket
> unix  2      [ ]         DGRAM      CONNECTED      14510
> unix  3      [ ]         STREAM     CONNECTED      13249
> unix  2      [ ]         DGRAM      CONNECTED      13887
> unix  2      [ ]         DGRAM      CONNECTED      10599
> unix  3      [ ]         STREAM     CONNECTED      14005
> unix  3      [ ]         STREAM     CONNECTED      13258
> unix  3      [ ]         STREAM     CONNECTED      13248
> unix  3      [ ]         STREAM     CONNECTED      14003
> unix  3      [ ]         STREAM     CONNECTED      10572 /var/run/xenstored/socket
> unix  3      [ ]         STREAM     CONNECTED      10786 /var/run/xenstored/socket
> unix  3      [ ]         DGRAM      CONNECTED      13186
> unix  3      [ ]         STREAM     CONNECTED      10864 /var/run/xenstored/socket
> unix  3      [ ]         STREAM     CONNECTED      10812 /var/run/xenstored/socket
> unix  2      [ ]         DGRAM      CONNECTED      14083
> unix  3      [ ]         STREAM     CONNECTED      10813 /var/run/xenstored/socket
> unix  3      [ ]         STREAM     CONNECTED      14068
> unix  3      [ ]         STREAM     CONNECTED      13256
> unix  3      [ ]         STREAM     CONNECTED      10571 /var/run/xenstored/socket
> unix  3      [ ]         STREAM     CONNECTED      10842
> unix  3      [ ]         STREAM     CONNECTED      13985
> unix  3      [ ]         DGRAM      CONNECTED      13185
> unix  2      [ ]         STREAM     CONNECTED      13884
> unix  2      [ ]         DGRAM      CONNECTED      14528
> unix  2      [ ]         DGRAM      CONNECTED      13785
> unix  3      [ ]         STREAM     CONNECTED      14034
>
> Attaching xen log files of /var/log/xen.
> I didn't get the role of QEMU here because as mentioned earlier, I am porting in raspberrypi 4B.
>
> Regards,
> Vipul Kumar
>
> On Wed, Oct 19, 2022 at 12:43 AM Stefano Stabellini <sstabellini@xxxxxxxxxx> wrote:
>       It usually works the way it is described in the guide:
>
>       https://www.virtuatopia.com/index.php?title=Configuring_a_VNC_based_Graphical_Console_for_a_Xen_Paravirtualized_domainU_Guest
>
>       You don't need to install any VNC-related server software because it is
>       already provided by Xen (to be precise it is provided by QEMU working
>       together with Xen.)
>
>       You only need the vnc client in dom0 so that you can connect, but you
>       could also run the vnc client outside from another host. So basically
>       the following should work when executed in Dom0 after creating DomU:
>
>         vncviewer localhost:0
>
>       Can you attach the Xen and QEMU logs (/var/log/xen/*)? And also use
>       netstat -taunp to check if there is anything running at port 5900 or
>       5901?
>
>       Cheers,
>
>       Stefano
>
>
>       On Tue, 18 Oct 2022, Vipul Suneja wrote:
>       > Hi Stefano,
>       >
>       > Thanks for the response!
>       >
>       > I could install tigerVNC, x11vnc & libvncserver in Dom0 xen-image-minimal but only manage to install libvncserver(couldn't
>       install tigervnc
>       > & x11vnc because of x11
>       > support missing, it's wayland) in DOMU custom graphical image. I tried running vncviewer with IP address & port in dom0 to
>       access the domu
>       > graphical image display as per below commands.
>       >  
>       >  vncviewer 192.168.1.42:5901
>       >  
>       >  But it showing can't open display, below are the logs:
>       >  
>       > root@raspberrypi4-64:~/guest1# vncviewer 192.168.1.42:5901
>       >
>       > TigerVNC Viewer 64-bit v1.11.0
>       > Built on: 2020-09-08 12:16
>       > Copyright (C) 1999-2020 TigerVNC Team and many others (see README.rst)
>       > See https://www.tigervnc.org for information on TigerVNC.
>       > Can't open display:
>       > root@raspberrypi4-64:~/guest1#
>       >
>       > I am not exactly sure what the issue is but I thought only libvncserver in DOMU could work to get access but it did not
>       work. 
>       > If TigerVNC is the issue here then is there any other VNC source which could be installed for both x11 & wayland supported
>       images?
>       >
>       > Regards,
>       > Vipul Kumar
>       >
>       > On Tue, Oct 18, 2022 at 2:40 AM Stefano Stabellini <sstabellini@xxxxxxxxxx> wrote:
>       >       VNC is typically easier to setup, because SDL needs extra libraries at
>       >       build time and runtime. If QEMU is built without SDL support it won't
>       >       start when you ask for SDL.
>       >
>       >       VNC should work with both x11 and wayland in your domU. It doesn't work
>       >       at the x11 level, it exposes a special fbdev device in your domU that
>       >       should work with:
>       >       - a graphical console in Linux domU
>       >       - x11
>       >       - wayland (but I haven't tested this so I am not 100% sure about it)
>       >
>       >       When you say "it doesn't work", what do you mean? Do you get a black
>       >       window?
>       >
>       >       You need CONFIG_XEN_FBDEV_FRONTEND in Linux domU
>       >       (drivers/video/fbdev/xen-fbfront.c). I would try to get a graphical text
>       >       console up and running in your domU before attempting x11/wayland.
>       >
>       >       Cheers,
>       >
>       >       Stefano
>       >
>       >       On Mon, 17 Oct 2022, Vipul Suneja wrote:
>       >       > Hi,
>       >       > Thanks!
>       >       >
>       >       > I have ported xen minimal image as DOM0 & custom wayland GUI based image as DOMU in raspberry pi4B. I am trying to
>       make GUI
>       >       display up
>       >       > for guest machine. I tried using sdl, included below line in guest.conf file
>       >       > vfb= [ 'sdl=1' ]
>       >       >
>       >       > But it is throwing below error:
>       >       >
>       >       > root@raspberrypi4-64:~/guest1# xl create -c guest1.cfg
>       >       > Parsing config from guest1.cfg
>       >       > libxl: error: libxl_qmp.c:1400:qmp_ev_fd_callback: Domain 3:error on QMP socket: Connection reset by peer
>       >       > libxl: error: libxl_qmp.c:1439:qmp_ev_fd_callback: Domain 3:Error happened with the QMP connection to QEMU
>       >       > libxl: error: libxl_dm.c:3351:device_model_postconfig_done: Domain 3:Post DM startup configs failed, rc=-26
>       >       > libxl: error: libxl_create.c:1867:domcreate_devmodel_started: Domain 3:device model did not start: -26
>       >       > libxl: error: libxl_aoutils.c:646:libxl__kill_xs_path: Device Model already exited
>       >       > libxl: error: libxl_domain.c:1183:libxl__destroy_domid: Domain 3:Non-existant domain
>       >       > libxl: error: libxl_domain.c:1137:domain_destroy_callback: Domain 3:Unable to destroy guest
>       >       > libxl: error: libxl_domain.c:1064:domain_destroy_cb: Domain 3:Destruction of domain failed
>       >       >
>       >       > Another way is VNC, i could install tigervnc in DOM0 but same i couldn't in guest machine because it doesn't support
>       >       x11(supports wayland
>       >       > only). I am completely blocked here, Need your support to enable the display up.
>       >       > Any alternative of VNC which could work in both x11 & wayland supported images?
>       >       >
>       >       > Any input on VNC, SDL or any other way to proceed on this? Looking forward to hearing from you.
>       >       >
>       >       > Regards,
>       >       > Vipul Kumar
>       >
>       >
>       >
>
>
>

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.