@borzel only who do nothing can't do wrong. keep up with the good work and make treasure of your mistakes!
Best posts made by nackstein
-
RE: [WARNING] XCP-ng Center shows wrong CITRIX updates for XCP-ng Servers - DO NOT APPLY - Fix released
-
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