doomedraven / Tools

Combination of different utilities, have fun!
MIT License
202 stars 96 forks source link

Apparent error in cape2.sh script - libvirt installer #120

Closed davewj100 closed 2 years ago

davewj100 commented 2 years ago

I think this line: https://github.com/doomedraven/Tools/blob/db55fd1f897651f6a98edf12ab1d71ab728eda48/Sandbox/cape2.sh#L964

should actually read: sudo -u ${USER} poetry run extra/poetry_libvirt_installer.sh

So poetry run <script_path> instead of poetry install run <script_path>

The way it is now, libvirt does not install properly. Manually running these commands post-install makes it work: cd /opt/CAPEv2 sudo -u cape poetry run extra/poetry_libvirt_installer.sh (Assuming the cape user is "cape".)

Also on my lubuntu 20.04 system, in order to get the libvirt.pc file to be available, I also had to install the package libvirt-dev before running the install. As per: https://stackoverflow.com/questions/45473463/pip-install-libvirt-python-fails-in-virtualenv sudo apt install libvirt-dev

I also had an issue with the kvm-qemu.sh script not working.

In total, what I ended up doing was:

sudo apt install virt-manager libvirt-dev
<run cape2.sh>
cd /opt/CAPEv2
sudo -u cape poetry run extra/poetry_libvirt_installer.sh
sudo usermod -aG kvm cape
sudo usermod -aG libvirt cape

Then everything was OK.

Thanks

doomedraven commented 2 years ago

Hello, you are right. thank you, fixed here https://github.com/doomedraven/Tools/commit/d7740ef490c8854001c3830f3d256fa859f6dc44

doomedraven commented 2 years ago

about libvirt-dev i will need to investigate a bit more once i have some spare time

doomedraven commented 2 years ago

about libvirt-dev installing it from apt just breaks stuff as it depends on libvirt0 taht is just libvirt, but that breaks symlinks and other stuff. i have it working without need of install libvirt-dev. did you use kvm-qemu.sh libvirt?