I was using a new system with Ubuntu 20.04.
Obviously for Xen it needs a few packages installed - a bit more than in the 
past even since since Xen is demoted to Universe for it's low adoption by the 
community (KVM IMHO beats it in all cases).


Step #1 - prep packages:
$ sudo apt install xen-hypervisor xen-utils libvirt-daemon-driver-xen 
libvirt-clients libvirt-daemon-system

Please do note that e.g. the further dependencies that you were missing
like "qemu-system-x86-xen" are pulled in via dependencies automatically.
As xen-utils-4.11 depends on it.


Step #2 - since xen needs to boot into it's special Dom0 reboot:
$ sudo reboot

After reboot check if things work so far:
$ sudo xl list
[sudo] password for ubuntu: 
Name                                        ID   Mem VCPUs      State   Time(s)
Domain-0                                     0 15921     4     r-----      29.0


-- I assume you are here atm, xen working but libvirt can't connect --


# Step 3 - libvirt

Check libvirt is connected to Xen:

$ virsh --connect xen:/// list --all
 Id   Name       State
--------------------------
 0    Domain-0   running

If running in a Dom0 the xen connection is the default, but for the sake
of showing the connection URL I added it to the command.

Also capabilities probing by libvirt went well
$ virsh capabilities | grep xen
    <os_type>xen</os_type>
      <emulator>/usr/lib/xen-4.11/bin/qemu-system-i386</emulator>
      <machine>xenpv</machine>
      <domain type='xen'/>
    <os_type>xen</os_type>
      <emulator>/usr/lib/xen-4.11/bin/qemu-system-i386</emulator>
      <machine>xenpv</machine>
      <domain type='xen'/>
      <emulator>/usr/lib/xen-4.11/bin/qemu-system-i386</emulator>
      <loader>/usr/lib/xen-4.11/boot/hvmloader</loader>
      <machine>xenfv</machine>
      <domain type='xen'/>
    <os_type>xenpvh</os_type>
      <emulator>/usr/lib/xen-4.11/bin/qemu-system-i386</emulator>
      <machine>xenpvh</machine>
      <domain type='xen'/>
      <emulator>/usr/lib/xen-4.11/bin/qemu-system-i386</emulator>
      <loader>/usr/lib/xen-4.11/boot/hvmloader</loader>
      <machine>xenfv</machine>
      <domain type='xen'/>
    <os_type>xenpvh</os_type>
      <emulator>/usr/lib/xen-4.11/bin/qemu-system-i386</emulator>
      <machine>xenpvh</machine>
      <domain type='xen'/>


Step #4 - virt-manager

So libvirt is able to talk&work with Xen it seems, your error report was from 
virt-manager.
Therefore let me install that.

$ sudo apt install virt-manager
$ virt-manager

This gets me into virt-manager also auto-connecting with Xen.

(screenshot attached)

Step #5 - install something from virt-manager

$ wget https://releases.ubuntu.com/20.04/ubuntu-20.04-live-server-amd64.iso
$ sudo mv ubuntu-20.04-live-server-amd64.iso /var/lib/libvirt/images/

Then in virt-manager
- New
- From local ISO
- select ISO
- forward
- forward(keep defaults)
- forward (get me storage)

- Finish will get you into trouble because the defaults are bad, but not into 
the connection issues you had.
The error is more like "/usr/lib/xen-4.11/bin/qemu-system-i386 not found"


>From here either modify the wrong defaults in the guest config for the 
>Emulator from /usr/lib/xen-4.11/bin/qemu-system-i386 to the correct 
>/usr/bin/qemu-system-i386 or symlink the former to the latter.

$ sudo ln -s /usr/bin/qemu-system-i386 /usr/lib/xen-4.11/bin/qemu-
system-i386

- press Finish and install will begin


You see it works fine (ignoring the small hickup on the binary path) and
I can't recreate your issue. It would be great if you could consider
trying the very same steps on a clean system to check when/where your
troubles begin.

** Attachment added: "Xen-1-initially.png"
   
https://bugs.launchpad.net/ubuntu/+source/xen/+bug/1889064/+attachment/5396891/+files/Xen-1-initially.png

** Changed in: libvirt (Ubuntu)
       Status: New => Incomplete

** Changed in: xen (Ubuntu)
       Status: New => Incomplete

** Changed in: libvirt (Ubuntu)
   Importance: Undecided => Low

** Changed in: xen (Ubuntu)
   Importance: Undecided => Low

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1889064

Title:
   virt-manager unable to connect to xen domain

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1889064/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to