ubuntu guest on RHEL kvm *(x86_64) is failing - kvm

I have a x86_64 m/c and i successfully installed Sles12 and RHEL7 guests on this m/c. But while creating a ubuntu guest (64 bit), this is failing.
virt-install --name=ubuntu1 --virt-type=kvm --boot cdrom,hd --network=default,model=virtio --disk /dev/dm-13,size=300,format=raw,bus=virtio,cache=none,sparse=true --memory=8192 --vcpu=2 --location=/home/suse/ubuntu-16.04-server-amd64.iso --console pty,target_type=serial --graphics none --extra-args 'console=ttyS0,115200n8 serial'
Starting install...
Retrieving file info... | 134 B 00:00:00
Retrieving file version.info... |116 B 00:00:00
ERROR Couldn't find hvm kernel for Ubuntu tree.
lsmod|grep kvm
kvm_intel 162153 8
kvm 525259 1 kvm_intel
While running with debug, this is expecting i386 ?
[Wed, 28 Dec 2016 11:57:45 virt-install 17391] DEBUG (urlfetcher:1169) Regex didn't match, not a ALT Linux distro
[Wed, 28 Dec 2016 11:57:45 virt-install 17391] DEBUG (urlfetcher:196) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.VxW9Li/current/images/MANIFEST
[Wed, 28 Dec 2016 11:57:45 virt-install 17391] DEBUG (urlfetcher:101) Fetching URI: /var/lib/libvirt/boot/virtinstmnt.VxW9Li/install/netboot/version.info
[Wed, 28 Dec 2016 11:57:45 virt-install 17391] DEBUG (urlfetcher:112) Saved file to /var/lib/libvirt/boot/virtinst-version.info.C0NcW7
Retrieving file version.info... |116 B 00:00:00
[Wed, 28 Dec 2016 11:57:45 virt-install 17391] DEBUG (urlfetcher:446) Detected distro name=Ubuntu osvariant=linux
[Wed, 28 Dec 2016 11:57:45 virt-install 17391] DEBUG (urlfetcher:196) local hasFile: Couldn't find /var/lib/libvirt/boot/virtinstmnt.VxW9Li/install/netboot/ubuntu-installer/i386/linux
[Wed, 28 Dec 2016 11:57:45 virt-install 17391] DEBUG (urlfetcher:243) Cleaning up mount at /var/lib/libvirt/boot/virtinstmnt.VxW9Li
[Wed, 28 Dec 2016 11:57:45 virt-install 17391] DEBUG (cli:295) File "/usr/share/virt-manager/virt-install", line 1084, in <module>
sys.exit(main())
File "/usr/share/virt-manager/virt-install", line 1078, in main
start_install(guest, continue_inst, options)
Can someone pls suggest?

From debug, it can be see it is indeed looking for i386, which is "default arch".
Exact same problem has been tackled in askubuntu q/a and has been patched to detect architecture from ISO name correctly.
Virt-manager with the patch does not have official release, so one would need to run virt-manager from sources or tinker with existing installation by changing and compiling /usr/share/virt-manager/virtinst/urlfetcher.py file.

Related

Moodle 3.4 installation on Centos 7

Installing a test Moodle (3.4.1) using the instructions on Moodle site but only got blank page when accessing it. I put the moodle installation on /var/www/html/moodle. The install.php script returns with success.
I am using PHP 7.0 on the ius repository.
httpd error log has these entries:
[Thu Jan 18 10:45:24.626059 2018] [:error] [pid 29857] [client ::1:41946] PHP Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0
[Thu Jan 18 10:21:39.114019 2018] [:error] [pid 28769] [client ::1:41930] PHP Fatal error: Unknown: Failed opening required '/var/www/html/moodle/index.php' (include_path='.:/usr/share/pear:/usr/share/php') in Unknown on line 0
I have tried to chmod to 755 and still the same problem.
Am I missing some php libraries?
Thanks,
Alex
try to give all the rights
sudo chmod -R 777 /path/to/moodle
Probably I did something wrong during the first install. Redid a clean install and everything works fine.

dnf crashes with segmentation fault

Fedora 4.10.8-200.fc25.i686+PAE
dnf is crashing with 'segmentation fault (core dumped)'.
I have tried to run 'dnf clean all' without success.
When running 'dnf upgrade', this is logged in dnf.log:
Apr 30 20:17:21 INFO --- logging initialized ---
Apr 30 20:17:21 DDEBUG timer: config: 7 ms
Apr 30 20:17:21 DEBUG cachedir: /var/cache/dnf
Apr 30 20:17:21 DEBUG Loaded plugins: reposync, Query, noroot, needs-restarting, protected_packages, builddep, playground, config-manager, copr, download, system-upgrade, debuginfo-install, generate_completion_cache
Apr 30 20:17:21 DEBUG DNF version: 1.1.10
Apr 30 20:17:21 DDEBUG Command: dnf upgrade
Apr 30 20:17:21 DDEBUG Installroot: /
Apr 30 20:17:21 DDEBUG Releasever: 25
Apr 30 20:17:21 DDEBUG Base command: upgrade
Apr 30 20:17:21 DDEBUG Extra commands: []
Apr 30 20:17:51 DDEBUG repo: downloading from remote: updates, _Handle: metalnk: https://mirrors.fedoraproject.org/metalink?repo=updates-released-f25&arch=i386, mlist: None, urls [].
This is logged in 'messages':
Apr 30 20:17:51 emil2 audit: ANOM_ABEND auid=0 uid=0 gid=0 ses=10 pid=23817 comm="dnf" exe="/usr/libexec/system-python" sig=11
Apr 30 20:17:51 emil2 kernel: dnf[23817]: segfault at 24 ip b64a9c81 sp bfe10cc0 error 4 in libssl3.so[b6496000+49000]
Apr 30 20:17:51 emil2 abrt-hook-ccpp: Process 23817 (system-python) of user 0 killed by SIGSEGV - dumping core
Apr 30 20:17:52 emil2 abrt-server: Deleting problem directory ccpp-2017-04-30-20:17:51-23817 (dup of ccpp-2017-04-28-22:02:01-6627)
Apr 30 20:17:52 emil2 dbus-daemon[721]: [system] Activating service name='org.freedesktop.problems' requested by ':1.699' (uid=0 pid=23827 comm="/usr/bin/python3 /usr/bin/abrt-action-notify -d /v") (using servicehelper)
Apr 30 20:17:52 emil2 dbus-daemon[721]: [system] Successfully activated service 'org.freedesktop.problems'
What can I do to troubleshoot?
Got the same problem after upgrade
libdb-5.3.28-16 to libdb-5.3.28-24
libdb-utils-5.3.28-16 to libdb-utils-5.3.28-24
Rebuild the rpm db fixed it
% rm /var/lib/rpm/__db*
% rpm --rebuilddb

libcurl Invalid ELF header in new Arch Install

So I just installed Arch and most things are working fine, but when I try to use pacman or curl, I get the error:
pacman: error while loading shared libraries: /usr/lib/libcurl.so.4: invalid ELF header
Also, I can't seem to run anything pacman-related for now... not even a pacman --help
Not sure if useful, but ls -l /usr/lib | grep libcurl gives:
-rw-r--r-- 1 root root 594016 Jun 22 12:21 libcurl.a
lrwxrwxrwx 1 root root 16 Jun 22 12:21 libcurl.so -> libcurl.so.4.3.0
lrwxrwxrwx 1 root root 16 Jun 22 12:21 libcurl.so.4 -> libcurl.so.4.3.0
-rwxr-xr-x 1 root root 408324 Jun 22 12:21 libcurl.s0.4.3.0
Thanks in advance!
Update: running ./curl-config gives the error, "cannot execute binary file". This makes me wonder if maybe I have a 64 bit version, whilst I'm running Arch i686. What is the best way to handle this?
maybe I have a 64 bit version, whilst I'm running Arch i686
That would do it. Run file ./curl-config. If it says ELF 64-bit LSB executable,... reinstall curl from correct packages.

keyctl commands throw 'undefined symbol: dlopen' errors

I am running Centos 5.8 on a production server. I have an application that needs to use the keyctl command, but everytime the app calls (or I call) the command, I have some errors.
The first error was this:
root#server [~] keyctl show
segmentation fault
Then, I re-installed the keyutils binaries using yum. These are the keyutils packages I have on the server:
root#server [~]# rpm -qa | grep keyutils
keyutils-libs-1.2-1.el5
keyutils-libs-1.2-1.el5
keyutils-1.2-1.el5
keyutils-libs-devel-1.2-1.el5
And now, I have another different error:
root#server [~]# keyctl show
keyctl: symbol lookup error: /lib64/libkeyutils.so.1: undefined symbol: dlopen
I checked the libraries of keyctl, and libdl is not there.
root#server [~]# ldd /bin/keyctl
linux-vdso.so.1 => (0x00007fffcc5fd000)
libkeyutils.so.1 => /lib64/libkeyutils.so.1 (0x00000033df000000)
libc.so.6 => /lib64/libc.so.6 (0x0000003d7ae00000)
/lib64/ld-linux-x86-64.so.2 (0x0000003d7aa00000)
All libraries that uses are fine.
root#server [~]# ls -al /lib64/libkeyutils*
-rwxr-xr-x 1 root root 9472 Jan 6 2007 /lib64/libkeyutils-1.2.so*
lrwxrwxrwx 1 root root 18 Nov 21 07:56 /lib64/libkeyutils.so.1 -> libkeyutils.so.1.9*
-rwxr-xr-x 1 root root 34584 Jan 6 2007 /lib64/libkeyutils.so.1.9*
root#server [~]# ls -al /lib64/libdl*
-rwxr-xr-x 1 root root 23360 Aug 27 08:59 /lib64/libdl-2.5.so*
lrwxrwxrwx 1 root root 12 Nov 16 02:01 /lib64/libdl.so.2 -> libdl-2.5.so*
root#server [~]#
Have you ever seen this problem before? I tried run the same version on others distros and it works.
I would like to re-install this server, but I can't because it is a production server.
Is there a way I can add or link a shared library to a binary already linked to others .so libraries?
Look at: http://blog.solidshellsecurity.com/2013/02/08/sshd-spam-rootkit-lib64libkeyutils-so-1-9/
It appears that there is no such legitimate file as libkeyutils.so.1.9
It is a rootkit, the latest legitimate version of this library is libkeyutils.so.1.3 on CentOS 6.3 (final).
rm -f /lib64/libkeyutils.so.1.9
ldconfig
/etc/init.d/sshd restart
There's also a suspected (as of now) unpatched user escalation priviledge flaw in all CentOS and RedHat kernels: https://access.redhat.com/security/cve/CVE-2013-0871 and http://blog.configserver.com/index.php?itemid=716
You may also need to reinstall SSH:
https://serverfault.com/questions/476954/remove-shared-library-from-sshd
https://forums.cpanel.net/f185/sshd-rootkit-323962.html
LD_PRELOAD=/lib64/libdl-2.5.so keyctl show

APR based Apache Tomcat Native library was not found on the java.library.path?

When trying to run my app with eclipse/linux on tomcat
I got the following info message:
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/lib/jvm/java-6-sun-1.6.0.20/jre/lib/amd64/server:/usr/lib/jvm/java-6-sun-1.6.0.20/jre/lib/amd64:/usr/lib/jvm/java-6-sun-1.6.0.20/jre/../lib/amd64:/usr/lib64/xulrunner-addons:/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
How do I resolve this issue?
My case:
Seeing the same INFO message.
Centos 6.2 x86_64
Tomcat 6.0.24
This fixed the problem for me:
yum install tomcat-native
boom!
For Ubntu Users
1. Install compilers
#sudo apt-get install make
#sudo apt-get install gcc
2. Install openssl and development libraries
#sudo apt-get install openssl
#sudo apt-get install libssl-dev
3. Install the APR package (Downloaded from http://apr.apache.org/)
#tar -xzf apr-1.4.6.tar.gz
#cd apr-1.4.6/
#sudo ./configure
#sudo make
#sudo make install
You should see the compiled file as
/usr/local/apr/lib/libapr-1.a
4. Download, compile and install Tomcat Native sourse package
tomcat-native-1.1.27-src.tar.gz
Extract the archive into some folder
#tar -xzf tomcat-native-1.1.27-src.tar.gz
#cd tomcat-native-1.1.27-src/jni/native
#JAVA_HOME=/usr/lib/jvm/jdk1.7.0_21/
#sudo ./configure --with-apr=/usr/local/apr --with-java-home=$JAVA_HOME
#sudo make
#sudo make install
Now I have compiled Tomcat Native library in /usr/local/apr/libtcnative-1.so.0.1.27 and symbolic link file /usr/local/apr/#libtcnative-1.so pointed to the library
5. Create or edit the $CATALINA_HOME/bin/setenv.sh file with following lines :
export LD_LIBRARY_PATH='$LD_LIBRARY_PATH:/usr/local/apr/lib'
6. Restart tomcat and see the desired result:
Download the appropriate APR based tomcat native library for your operating system so that Apache tomcat server can take some advantage of the feature of your OS which is not included by default in tomcat. For windows it will be a .dll file.
I too got the warning while starting the server and you don't have to worry about this if you are testing or developing. This is meant to be on production purposes.
After putting the tcnative-1.dll file inside the bin folder of Apache Tomcat 7 following are the output in the stderr file,
Apr 07, 2015 1:14:12 PM org.apache.catalina.core.AprLifecycleListener init
INFO: Loaded APR based Apache Tomcat Native library 1.1.33 using APR version 1.5.1.
Apr 07, 2015 1:14:12 PM org.apache.catalina.core.AprLifecycleListener init
INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
Apr 07, 2015 1:14:14 PM org.apache.catalina.core.AprLifecycleListener initializeSSL
INFO: OpenSSL successfully initialized (OpenSSL 1.0.1m 19 Mar 2015)
Apr 07, 2015 1:14:14 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-apr-127.0.0.1"]
I resolve this (On Eclipse IDE) by delete my old server and create the same again. This error is because you don't proper terminate Tomcat server and close Eclipse.