Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't connect to virt-manager #5

Open
SuperPrower opened this issue Oct 25, 2018 · 6 comments
Open

Can't connect to virt-manager #5

SuperPrower opened this issue Oct 25, 2018 · 6 comments

Comments

@SuperPrower
Copy link

Hi! I use Arch Linux, I have built virt-bootstrap from AUR and I have virt-manager installed from official repository, however, in OS container creation, I still get message about needing to install virt-bootstrap to enable OS container creation.

What can I possibly do wrong? Thanks in advance.

@crobinso
Copy link
Member

Latest virt-manager release from last week is python3 only, maybe you don't have a python3 install of virt-bootstrap?

@SuperPrower
Copy link
Author

I see, thanks. I'll try to build/get dependencies and virt-bootstrap myself rather than use AUR package. I'll report later on results.

@rst0git
Copy link
Collaborator

rst0git commented Oct 26, 2018

Hi @SuperPrower you can install virt-bootstrap on Arch as follows.
First you will need to install the following dependencies:

sudo pip install passlib
yaourt -S libguestfs python-libguestfs skopeo libvirt

Unfortunately, the AUR package for libvirt-sandbox is out of date, so it might be better to build it from source:

# Dependencies for libvirt-sandbox
yaourt -S libvirt-glib libselinux cpio gobject-introspection intltool dhclient xz-static-git
git clone git://libvirt.org/libvirt-sandbox.git
cd libvirt-sandbox/
./configure --prefix=/usr
make && sudo make install

Then you should be able to install virt-bootstrap with:

git clone https://github.com/virt-manager/virt-bootstrap
cd virt-bootstrap/
sudo python setup.py install

Please let me know if there are any issues. I will try to update the AUR packages for libvirt-sandbox and virt-bootstrap.

@SuperPrower
Copy link
Author

SuperPrower commented Oct 28, 2018

There are some problems with latest git version of libvirt-sandbox.
First, there is no 'configure' in repository - I first had to run autoreconf -i
Then, I had to rename AUTHORS.in to AUTHORS as autoreconf required it.

I'm really confused about first steps since README in libvirt-sandbox repository since it says I just need to run ./configure, and refers to INSTALL file, but both are missing. (I guess I should report it to their bugzilla, not here, but I don't know if that's known problem or is it intentional - maybe they are changing toolkit or something)

Let me check with latest packaged version.

Also, do I really have to install xz-static-git? It's in conflict with xz, which I believe is essential to Arch Linux, and I was able to install virt-bootstrap from AUR without it.

@rst0git
Copy link
Collaborator

rst0git commented Oct 28, 2018

Hi @SuperPrower you are right! Neither the HACKING file, nor the README file in the libvirt-sandbox repository explains that you need to run ./autogen.sh before ./configure.

Thank you for pointing it out! Would you be interested in sending a patch to extend the build instructions?

The building process is similar to the one used for libvirt, which is described in README-hacking.

Also, do I really have to install xz-static-git? It's in conflict with xz, which I believe is essential to Arch Linux, and I was able to install virt-bootstrap from AUR without it.

I created xz-static-git after you opened this issue. It is essentially the same package as xz with the only exception that it installs static libraries (i.e. /lib/liblzma.a). They are required by libvirt-sandbox to enable lzma support. Currently, the AUR package configures libvirt-sandbox using the flag --without-lzma.

@SuperPrower
Copy link
Author

SuperPrower commented Oct 28, 2018

Currently, the AUR package configures libvirt-sandbox using the flag --without-lzma.

Thing is, I can't get it working. Even if I try --with-lzma=no, it just says that it needs LZMA static libraries, like it ignores this option or something. I tried copying flags from AUR PKGBUILD, but it doesn't seem to change anything. I tried the same thing with 0.8.0 packed build, same problem. It only worked with version 0.6.0. Again, don't know if that's a problem or something intentional.

Also, I would like to note that when I try to make libvirt-sandbox, I get error that <rpc/rpc.h> is missing. I solved this by adding CPPFLAGS="-I/usr/include/tirpc" to ./configure options

Also, I get error about undefined references to xdr_u_int and similar xdr_ stuff. I find a solution for it is adding -ltirpc to both the EXT2LIBS and the LDFLAGS in configure.

Then, python-libguestfs. It doesn't work on it's own. Trying to import it results in undefined symbol: PyString_FromStringAndSize, which is, according to google, occurs when you try to use python2 code in python3.

So I made a little research and found a mailing list thread in redhead, suggesting that reason is libguestfs. Seeing that AUR package required python2, I went and built it from sources. (version 1.38.6)...

...for which I needed to build supermin first, which required me to export OCAMLPARAM="safe-string=0,_" variable before make so that it wouldn't report error about string and bytes or something.

So, back to building libguestfs. Important thing during the configuration was those two lines:

checking for PyCapsule_New in -lc... yes
checking for PyString_AsString in -lc... no

According to mailing lists, this is correct report for python3.

So I went and ignored warnings about not using make install and did it. Finally, import guestfs reported no error.

I went back and ran sudo python3 setup.py install. Finally, I am able to create OS container in virt-manager. All that's left is to figure out where do I get that source URI.

I just hope that this train of thoughts may be helpful in... something. Stuff seems to be working for RHEL-based distros, so this is really just a problem about bunch of outdated AUR packages (supermin is said to require prelink which doesn't seem to exist anymore, bunch of packages depend on python2, and stuff). I really am not sure if I have enough experience or personal time to do something about it - I'll try to submit patch/update or two, but can't and don't want to promise anything, I'm not even sure about how do I find proper dependencies for package (I have, like, 1600 packages, do I create container to see what dependencies application needs or what?), or how or where to submit changes to PKGBUILD.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants