Hello,
I posted this yesterday to the Xen-devel list, posting it additionally to the fedoraproject list too. My problem is Virt-manager is unable to connect to the hypervisor (explained below). However, xm list, xm info work fine.
So I followed the guide http://wiki.xen.org/wiki/Xen_4.2_Build_From_Source_On_RHEL_CentOS_Fedora and built/installed Xen from source, using grub2-mkconfig to rebuild grub and was able to reboot Dom0 with Xen successfully.
Then I installed packages for virt-manager. # yum install libvirt-daemon-xen python-virtinst libvirt-daemon-config-network libvirt-daemon-driver-network virt-manager virt-viewer Everything got installed except for one package. Got an error message "No package* libvirt-daemon-driver-network* available."
Now when I start virt-manager, it is unable to connect to Xen and fails with the following error. # virt-manager Unable to connect to libvirt.
unable to connect to 'localhost:8000': Connection refused
Verify that: - A Xen host kernel was booted - The Xen service has been started
Libvirt URI is: xen:///
Traceback (most recent call last): File "/usr/share/virt-manager/virtManager/connection.py", line 1027, in _open_thread self.vmm = self._try_open() File "/usr/share/virt-manager/virtManager/connection.py", line 1009, in _try_open flags) File "/usr/lib64/python2.7/site-packages/libvirt.py", line 102, in openAuth if ret is None:raise libvirtError('virConnectOpenAuth() failed') libvirtError: unable to connect to 'localhost:8000': Connection refused
# xm list and # xm info work fine. This means xend is running right ?
Did some searching, found an old thread http://old-list-archives.xenproject.org/xen-users/2010-06/msg00880.html Added *(xend-unix-server yes)* to xen configuration file xend-config.sxp and added *export VIRSH_DEFAULT_CONNECT_URI="xen:///"* to root's .bashrc. Still no luck.
This might help, # rpm -qa | grep libvirt libvirt-daemon-xen-0.9.11.9-1.fc17.x86_64 libvirt-daemon-0.9.11.9-1.fc17.x86_64 libvirt-0.9.11.9-1.fc17.x86_64 libvirt-python-0.9.11.9-1.fc17.x86_64 libvirt-daemon-config-network-0.9.11.9-1.fc17.x86_64 libvirt-daemon-config-nwfilter-0.9.11.9-1.fc17.x86_64 libvirt-client-0.9.11.9-1.fc17.x86_64
So in summary, Built and installed from source Xen 4.1.5, on Fedora 17. Can boot into Xen Dom0, xm works, xend running, But virt-manager unable to connect to Xen!
Please help. I have tried to give as much info as I could. Do let me know if you need more info.
On mar, 2013-06-18 at 18:05 -0500, ranjith krishnan wrote:
Hello,
Hi again Ranjith,
I posted this yesterday to the Xen-devel list, posting it additionally to the fedoraproject list too. My problem is Virt-manager is unable to connect to the hypervisor (explained below). However, xm list, xm info work fine.
Yes, I saw your other e-mail too, but I'm afraid I can't help much as I always have: - used xl only, when building Xen from sources, - used Fedora Xen packages only, when using libvirt stuff
:-(
So I followed the guide http://wiki.xen.org/wiki/Xen_4.2_Build_From_Source_On_RHEL_CentOS_Fedora and built/installed Xen from source, using grub2-mkconfig to rebuild grub and was able to reboot Dom0 with Xen successfully.
Ok.
Then I installed packages for virt-manager. # yum install libvirt-daemon-xen python-virtinst libvirt-daemon-config-network libvirt-daemon-driver-network virt-manager virt-viewer Everything got installed except for one package. Got an error message "No package libvirt-daemon-driver-network available."
On my Fedora 18, I get this:
$ yum search libvirt-daemon-driver-network ... ... ==================================================================================== libvirt-daemon-driver-network.x86_64 : Network driver plugin for the libvirtd daemon
$ rpm -qa | grep libvirt-daemon-driver-network libvirt-daemon-driver-network-1.0.6-3.fc18.x86_64
Anyway, I do not think this could be the cause of your issue.
Now when I start virt-manager, it is unable to connect to Xen and fails with the following error. # virt-manager Unable to connect to libvirt.
unable to connect to 'localhost:8000': Connection refused
Verify that:
- A Xen host kernel was booted
- The Xen service has been started
Libvirt URI is: xen:///
I see... Just shooting in the dark here, and forgive me if it's a stupid question, but is libvirtd running?
# xm list and # xm info work fine. This means xend is running right ?
Indeed. You can double check that with something like:
$ ps aux | grep xend
or:
# service xend status
Although, I'm not sure the latter will work, considering you're not using any Fedora RPM/SRPM...
So in summary, Built and installed from source Xen 4.1.5, on Fedora 17. Can boot into Xen Dom0, xm works, xend running, But virt-manager unable to connect to Xen!
As I said, I'm really short in ideas/experience, sorry. Something I would probably try is: - uninstalling your built version of Xen - installing Fedora 17's Xen packages - try libvirt with them
That would at least tell us more about where --if not what-- the issue could be.
Regards, Dario
Thanks for replying Dario,
Yes, I saw your other e-mail too, but I'm afraid I can't help much as I
always have:
- used xl only, when building Xen from sources,
- used Fedora Xen packages only, when using libvirt stuff
I just want to get couple of DomUs running, that is all. I'm not particular about which tool I use. Virt-manager seemed easier/quicker, hence I picked that.
I did some reading on configuring DomUs using xl/xm and cfg files. http://www.fclose.com/b/linux/2544/setting-up-lvm-backed-xen-domu/ http://www.fclose.com/w/Setting_Up_Xen_DomU_on_Fedora:_Unmodified_Fedora_on_...
So basically I create the cfg file, and do "xm/xl create xmf16install -c" This is one of my cfg files.
name="xmf16install" memory=2048 vcpus=1 disk=['phy:/dev/xenvg/xmf16lvm,xvda,w'] vif = [ 'bridge=br0' ] kernel = "/home/fedora16pxe/vmlinuz" ramdisk = "/home/fedora16pxe/initrd.img" onreboot = 'restart' oncrash = 'restart'
The CentOS/Fedora installers are being launched, but I think I am running into a problem when the installers ask for HTTP location from where to pickup the images for install. I got different kinds of errors each time (I tried multiple installations (F15,16, F17, CentOS5).
Some of the errors I got from the anaconda installers were (F12, CentOS5) '' loader received SIGSEGV! Backtrace:
[0x80488c4] [0xc18420] [0x818c9e3] [0x806305c] [0x806cbcb] [0x806cd06] [0x806d1b7] [0x806c5ee] [0x80623ec] [0x8062b29] install exited abnormally [1/1] sending termination signals...done sending kill signals...done disabling swap... unmounting filesystems... /proc done /dev/pts done /sys done /tmp/ramfs done you may safely reboot your system"
F(15) "Unable to read package metadata. This may be due to a missing │ │ repodata directory. Please ensure that your install tree has │ │ been correctly generated. │ │ │ │ Cannot retrieve repository metadata (repomd.xml) for repository: │ │ updates. Please verify its path and try again "
I am guessing there is a problem when it tries to connect to the internet to download packages. I have also attached my domU cfg file for reference in the email.
Could someone point out where am I going wrong ?
I just want to get couple of DomUs working and this is proving tougher than I thought. :( Is there something wrong with my cfg files. Or is something else the issue here ?
I see... Just shooting in the dark here, and forgive me if it's a stupid question, but is libvirtd running?
Yes, it is.
# service libvirtd status libvirtd.service - Virtualization daemon Loaded: loaded (/usr/lib/systemd/system/libvirtd.service; enabled) Active: active (running) since Thu, 20 Jun 2013 09:50:10 -0500 Main PID: 1248 (libvirtd) CGroup: name=systemd:/system/libvirtd.service
As I said, I'm really short in ideas/experience, sorry. Something I would probably try is:
- uninstalling your built version of Xen
- installing Fedora 17's Xen packages
- try libvirt with them
This was what I tried initially. Regular F17, then yum install Xen, and Virt-manager just worked out of the box for me, and I was able to create DomUs.
Sorry, I just seem to be running into multiple issues with this! Kindly help. Any pointers would be greatly appreciated.
If all else fails, I am willing to start with a fresh install of F18 as Dom0 and try to install Xen from source on that. Would this help ? I remember you telling me F18 with Xen 4.2 working well with the Virt-tools.
On gio, 2013-06-20 at 05:32 -0500, ranjith krishnan wrote:
Thanks for replying Dario,
Yes, I saw your other e-mail too, but I'm afraid I can't help much as I always have: - used xl only, when building Xen from sources, - used Fedora Xen packages only, when using libvirt stuff
I just want to get couple of DomUs running, that is all. I'm not particular about which tool I use.
Mmm... So you do not need any specific/unpackaged version of Xen, or you don't need to modify Xen's code or apply any specific patch to it? If no, why bothering with building from sources?
If you don't need anything particular, using what the distro provides is almost always waaay easier than building from scratch, and that is _especially_ true for Xen! :-O
Virt-manager seemed easier/quicker, hence I picked that.
Sure it is, but you seem to be adding unnecessary complications to the whole process, by trying building Xen yourself.
I did some reading on configuring DomUs using xl/xm and cfg files. http://www.fclose.com/b/linux/2544/setting-up-lvm-backed-xen-domu/
http://www.fclose.com/w/Setting_Up_Xen_DomU_on_Fedora:_Unmodified_Fedora_on_...
So basically I create the cfg file, and do "xm/xl create xmf16install -c" This is one of my cfg files.
name="xmf16install" memory=2048 vcpus=1 disk=['phy:/dev/xenvg/xmf16lvm,xvda,w'] vif = [ 'bridge=br0' ] kernel = "/home/fedora16pxe/vmlinuz" ramdisk = "/home/fedora16pxe/initrd.img" onreboot = 'restart' oncrash = 'restart'
I don't see anything bad here (although, I use different ways for installing guests, so I can't be sure).
The CentOS/Fedora installers are being launched, but I think I am running into a problem when the installers ask for HTTP location from where to pickup the images for install. I got different kinds of errors each time (I tried multiple installations (F15,16, F17, CentOS5).
I see but, as you said, the Xen side of the thing appears to be working (you see the installers!). There might be other issues, but I've no clue about them I'm afraid.
I am guessing there is a problem when it tries to connect to the internet to download packages.
Could be... Is the bridge working?
I just want to get couple of DomUs working and this is proving tougher than I thought. :(
Well, I'm not saying it's always piece of cake, but when you decide to build your own Xen instead of using what the distro gives you, you committed 'voluntary manslaughter' against simplicity yourself! :-P
As I said, I'm really short in ideas/experience, sorry. Something I would probably try is: - uninstalling your built version of Xen - installing Fedora 17's Xen packages - try libvirt with them
This was what I tried initially. Regular F17, then yum install Xen, and Virt-manager just worked out of the box for me, and I was able to create DomUs.
No, I'm sorry, but now I feel like I'm loosing you. Are you saying that you installed Xen and virt-* with yum and you add it all working fine? Well, if yes, why you abandoned that path?
Sorry, I just seem to be running into multiple issues with this! Kindly help. Any pointers would be greatly appreciated.
There's no need to be sorry, although I'm not sure I can see what is happening and provide useful directions. At least nothing different from _try_official_packages_, especially if you said that they were working.
If all else fails, I am willing to start with a fresh install of F18 as Dom0 and try to install Xen from source on that. Would this help ? I remember you telling me F18 with Xen 4.2 working well with the Virt-tools.
Again, and sorry for repeating myself, if you do this, _do_ install an F18 (actually, at this time, you may want to go for F19) and _do_ install both Xen, libvirt and the libvirt tools with *yum*. Don't build anything if you don't need it. :-)
I said, and I confirm here, that on Fedora 18 (and the same applies to F19 Beta, at least the few times I tired) I have virt-manager and virt-install working well, either with xend running (i.e., using the old toolstack and the xen libvirt driver) or without xend (i.e., using the new toolstack and the libxl libvirt driver), at least for basic create/start/pause/suspend/resume/reboot/shutdown workflow.
Regards, Dario
Mmm... So you do not need any specific/unpackaged version of Xen, or you
don't need to modify Xen's code or apply any specific patch to it? If no, why bothering with building from sources?
If you don't need anything particular, using what the distro provides is almost always waaay easier than building from scratch, and that is _especially_ true for Xen! :-O
I am a graduate student, and this is for my final project.
My intention is to make some code changes in Xen and try some things out, once I get DomUs working. That is why I am trying to install from source.
I am guessing there is a problem when it tries to connect to the
internet to download packages.
Could be... Is the bridge working?
brctl shows me this. Does this mean everything is OK with the bridge ? # brctl show bridge name bridge id STP enabled interfaces br0 8000.001ec936a1c5 no em1 vif3.0 virbr0 8000.525400f132d7 yes virbr0-nic
This was what I tried initially. Regular F17, then yum install Xen, and Virt-manager just worked out of the box for me, and I was able to create DomUs.
No, I'm sorry, but now I feel like I'm loosing you. Are you saying that you installed Xen and virt-* with yum and you add it all working fine? Well, if yes, why you abandoned that path?
Since I am new to Xen, I tried the official packages (yum install, virt-manager) just to get some familiarity and confidence working with the system. I thought once I have those working I can install from source and make changes.
Again, and sorry for repeating myself, if you do this, _do_ install an F18 (actually, at this time, you may want to go for F19) and _do_ install both Xen, libvirt and the libvirt tools with *yum*. Don't build anything if you don't need it. :-)
I said, and I confirm here, that on Fedora 18 (and the same applies to F19 Beta, at least the few times I tired) I have virt-manager and virt-install working well, either with xend running (i.e., using the old toolstack and the xen libvirt driver) or without xend (i.e., using the new toolstack and the libxl libvirt driver), at least for basic create/start/pause/suspend/resume/reboot/shutdown workflow.
Ok. I will try F18 next time. But I want to keep that as my last resort,
if nothing else works.
Right now, I thought I can download the iso file for fedora, save the image on to the hard disk and then use it to build the DomU with xl. If that doesnt work, I will look towards F18.