xe-guest-utilities on openSUSE
-
Hello,
I tried to install xe-guest-utilities on an openSUSE Leap 15.1. Here I will post a little patch and the procedure I followed if anyone want to replicate until openSUSE will be officially supported.
As root on the openSUSE VM:- mount the guest-tools.iso image in /mnt
- cp -r /mnt/Linux /root/
- cd in /root/Linux/ and apply this simple patch:
--- /mnt/Linux/xe-linux-distribution 2019-11-08 15:46:14.000000000 +0100 +++ xe-linux-distribution 2020-03-02 11:15:42.495364783 +0100 @@ -232,6 +232,7 @@ -e 's/^VERSION_ID="\([0-9]*\)\.\?\([0-9]*\)\?"$/major=\1;minor=\2;/gp' \ -e 's/^PRETTY_NAME="SUSE L\(inux\|INUX\) Enterprise \([a-zA-Z0-9_]*\) \([0-9]*\)\( SP[0-9]*\)\?"/_major=\3;_pretty_name=\0;/gp' \ -e 's/^SUSE L\(inux\|INUX\) Enterprise \([a-zA-Z0-9_]*\) \([0-9]*\) (.*)/_major=\3;_pretty_name="\0";/gp;' \ + -e 's/^PRETTY_NAME="openSUSE \([a-zA-Z0-9_]*\) \([0-9]*\)\.\([0-9]*\)"/_major=\2;_minor=\3;_pretty_name=\0;/gp' \ -e 's/^VERSION = \([0-9]*\)$/major=\1;/gp;' \ -e 's/^PATCHLEVEL = \([0-9]*\)$/minor=\1;/gp;' \ "${suse_release}")
- /sbin/insserv is required for the rpm install script so execute
zypper install insserv-compat
- run the install script
./install.sh
- now for some reason I ignore the script xe-linux-distribution inside the rpm is an older version than the one in the /root/Linux directory, for example it miss support for Sangoma Linux (FreePBX), this is just for the dev team, for our purpose we would anyway copy our patched version over the installed one:
cp xe-linux-distribution /usr/sbin/xe-linux-distribution
- enable the service and start it
systemctl enable xe-linux-distribution systemctl start xe-linux-distribution systemctl status xe-linux-distribution
on XO web console you should see the VM with version and the geko icon. So far the patch trick the system into belieaving that openSUSE is a sles distribution and so it assign the blu geko icon. In the future maybe openSUSE can be supported and the patch would be something like this:
--- /mnt/Linux/xe-linux-distribution 2019-11-08 15:46:14.000000000 +0100 +++ xe-linux-distribution.ng 2020-03-02 11:14:56.863364783 +0100 @@ -230,8 +230,9 @@ eval $(sed -n \ -e 's/^VERSION_ID="\([0-9]*\)\.\?\([0-9]*\)\?"$/major=\1;minor=\2;/gp' \ - -e 's/^PRETTY_NAME="SUSE L\(inux\|INUX\) Enterprise \([a-zA-Z0-9_]*\) \([0-9]*\)\( SP[0-9]*\)\?"/_major=\3;_pretty_name=\0;/gp' \ - -e 's/^SUSE L\(inux\|INUX\) Enterprise \([a-zA-Z0-9_]*\) \([0-9]*\) (.*)/_major=\3;_pretty_name="\0";/gp;' \ + -e 's/^PRETTY_NAME="SUSE L\(inux\|INUX\) Enterprise \([a-zA-Z0-9_]*\) \([0-9]*\)\( SP[0-9]*\)\?"/distro=sles;_major=\3;_pretty_name=\0;/gp' \ + -e 's/^SUSE L\(inux\|INUX\) Enterprise \([a-zA-Z0-9_]*\) \([0-9]*\) (.*)/distro=sles;_major=\3;_pretty_name="\0";/gp;' \ + -e 's/^PRETTY_NAME="openSUSE \([a-zA-Z0-9_]*\) \([0-9]*\)\.\([0-9]*\)"/distro=opensuse;_major=\2;_minor=\3;_pretty_name=\0;/gp' \ -e 's/^VERSION = \([0-9]*\)$/major=\1;/gp;' \ -e 's/^PATCHLEVEL = \([0-9]*\)$/minor=\1;/gp;' \ "${suse_release}") @@ -248,7 +249,7 @@ minor=0 fi - write_to_output "sles" "${major}" "${minor}" "${_pretty_name##*=}" + write_to_output "${distro}" "${major}" "${minor}" "${_pretty_name##*=}" } identify_lsb()
The above patch and procedure works for openSUSE Leap but not for Tumbleweed (the rolling version). I could write a patch for Tumbleweed but first would be better to find out why it does not boot after installation (get stuck on some disk procedure but systemd wasn't verbose enough and I didn't spent much time on it).
enjoy your openSUSE VM
-
@nackstein thanks a lot for the feedback
I think it might be great to push that upstream. @stormi what do you think?
-
How is the versioning of openSUSE regarding SLES? Installation scripts may take the version into account and act accordingly.
-
@stormi openSUSE Leap follow SLES versioning and is compiled from sources of SLES. openSUSE Tumbleweed is a rolling release similar to arch but with rpm. So Leap is like CentOS while Tumbleweed is a little different that Fedora since it's rolling. Tumbleweed is used as the testbed for the next SLES major release.
The os-release of Tumbleweed is like this one:
NAME="openSUSE Tumbleweed" # VERSION="20200228" ID="opensuse-tumbleweed" ID_LIKE="opensuse suse" VERSION_ID="20200228" PRETTY_NAME="openSUSE Tumbleweed" ANSI_COLOR="0;32" CPE_NAME="cpe:/o:opensuse:tumbleweed:20200228" BUG_REPORT_URL="https://bugs.opensuse.org" HOME_URL="https://www.opensuse.org/" LOGO="distributor-logo"
EDIT: there is one exception, the first leap used the versioning 42.x after that comes 15.x
so the history of openSUSE is something like this:
openSUSE 13.x
openSUSE Leap 42.x
openSUSE Leap 15.x -
I went to a talk from SUSE at FOSDEM and can tell that openSUSE Leap is not exactly the "CentOS" of SLES. They share core packages but other packages are more recent in Leap usually when SLES follows a conservative update route (patching preferred over software updates).
-
@stormi do you remember of what year you attended this talk? about in 2017 something changed about compatibility between openSUSE Leap and SLE. I do not have a SLE to compare version of rpm by rpm...
Anyway, I found this interesting page about all os-release differences:
https://en.opensuse.org/SDB:SUSE_and_openSUSE_Products_Version_Outputs -