Install SCVMM 2022 agent on AlmaLinux 9 VM - redhat

I am trying to install SCVMM 2022 agent on AlmaLinux 9.
I discovered that the agent script is trying to use init.d while in AlmaLinux, there is no compatibility with init.d anymore but only systemd.
I updated the install script to copy the agent exec in /etc/systemd/system.
Now, I have a new error "Unable to find service control mechanism".
I understand that the script is unable to register the agent daemon in systemd.
How can I do to get the agent registered.
Have anyone ever have that issue with RedHat9 or any other forks in SCVMM 2022?

I'm just working on this (literally) right now, and while I can't get you a complete answer, I can tell you I've done the following and gotten it to at least install so I can create the template. Here's my notes up to this point, after creating the VM and copying the scvmm agent:
Install initscripts to create /etc/{init.d,rc.d,etc} folders
sudo yum install initscripts -y
https://centos.pkgs.org/9-stream/centos-baseos-x86_64/initscripts-10.11.1-1.el9.x86_64.rpm.html
Run install script for scvmm
sudo ./install scvmmguestagent.1.0.0.544.x64.tar
https://learn.microsoft.com/en-us/system-center/vmm/vm-linux?view=sc-vmm-2022
Shut down VM in VMware
Clone to template
I noticed that they don't offer RHEL 9 in their Guest OS Profile, so it may only be half supported. I'm also using VMware, you may have better luck if you're using Hyper-V

Related

How does one change Postgres' service name when installing on Centos

I am installing Postgres on CentOS 7 boxes, and that part itself is fine. The issue that someone brought up is that they would like for my install script to try and not depend on the service name being postgresql-10, and instead just use postgres or postgresql. Either one would be fine. Well I noticed that there is a flag --servicename that can be used, but I am unsure where to use it in the process. I have tried a few times but it doesn't seem to work.
Note that this is how I am installing postgres
yum -y install $LINK
yum -y install postgresql10
yum -y install postgresql10-server
/usr/pgsql-10/bin/postgresql-10-setup initdb
systemctl enable postgresql-10
systemctl start postgresql-10
the $LINK up there is just the path to pull from the Postgres website. Again, the ideal situation would be for me to specify the service name such that I can standardize that and limit script changes when Postgres versions change.
Note that I found out about the --servicename flag in this, link but I am not completely sure how to apply that to the installation above. It does appear that the link is more for installing on windows, but I would assume we could do the same thing in a Linux installation. Any suggestions here would be welcome.
The link that you found is about EnterpriseDB's installer for Windows, and the service mentioned is a Windows service. That won't help you on CentOS.
The name of the systemd service file is hard-wired into the RPM, but there is nothing that prevents you from creating your own service file in /etc/systemd/system and using that one instead. Then you can choose whatever name you prefer. You can just copy the service file from the RPM as a starting point.
Renaming the file or creating one in /usr/systemd/system is not a good idea, because that will mess with RPMs.
postgresql-10 is a good name for the service, however. If you choose postgres or something else that doesn't contain the version, what will you do once you want to install v11?
To answer your question: There is no way to configure the name of the service when installing it via RPM.

Running 'monit restart all' gives invalid action

error: invalid action action= restart monit
Server Info
Ubuntu 16.04.4 LTS
monit:
Installed: 1:5.16-2ubuntu0.1
This issue is for these monit commands
$ monit restart tomcat
$ monit stop tomcat
$ monit start tomcat
$ monit monitor tomcat
$ monit unmonitor tomcat
Reason:
Status changed to 'Confirmed' because the bug affects multiple users.
Changed in monit (Ubuntu):
status: New → Confirmed
for the time being, you need to revert the monit package to 1:5.16-2, try manually in a server with
sudo apt-get install monit=1:5.16-2
If your servers are automatically provisioned with some third party tool (chef, puppet, bash scripts, etc) then you would need to update them accordingly.
Source: https://bugs.launchpad.net/ubuntu/+source/monit/+bug/1786910
NOTE
In case you're facing this issue again even after downgrading Monit version, please blacklist it from unattended-upgrades service. It runs daily to fetch latest security updates for relative packages.
To blacklist monit, open "/etc/apt/apt.conf.d/50unattended-upgrades" and under "Unattended-Upgrade::Package-Blacklist" block, add "monit".
#TomDavies suggested a better solution than blacklisting, see the comments.
Do remember it to remove from blacklist once the issue is solved.
You would need to run the above command again to revert back to older patch.
This is an extension to answer given by Ninad.
If you are using Chef to automatically configure your servers, then the following code change will help you install the previous version of monit in all your servers running Ubuntu 16.04
if 'ubuntu' == node['platform'] && '16.04' == node['platform_version']
Chef::Log.info "******** Installing monit version '1:5.16-2' ********"
execute 'apt-get -y install monit=1:5.16-2 --allow-downgrades'
else
Chef::Log.info "******** Installing latest monit ********"
package 'monit'
end
Make sure to revert this once the bug is fixed.

Managing windows hosts with Ansible. "winrm or requests is not installed."

I'm currently setting up Ansible on CentOS7 and I need to use it to manage some Windows machines.
I was following these two guides (1 & 2) to get this set up.
When running the command ansible host_group -i hosts -m win_ping
I get back an error saying:
x.x.x.x | FAILED! => {"msg": "winrm or requests is not installed: No module named xmltodict"}
I checked my installed python modules and I have both winrm and requests
I'm not sure what I'm missing here. There was a post I found on the RedHat forums outlining the same problem https://access.redhat.com/solutions/335668
Thanks for your time
EDIT: I also have xmltodict installed.
You sure you have then install in the right version of python 2 vs python 3? Had similar issues before, installing with both pip and pip3 fixed it.

Need to Install Concourse(CI/CD) on windows system

I need to install Concourse(CI/CD) on my Local windows machine
Below process I followed :
Install Bosh on local system.
It was successfully install and while executing command at command prompt
then it show version all "bosh" -- "version 3.0.1-712bfd7-2018-03-13T23:26:43Z".
Try Download the concourse-lite deployment manifest file but it fails it shows below error.
Follow the below link to install Concourse :
https://concoursetutorial.com/ --- section For Windows:
I don't reccomend doing this at all because you'll be swimming so far out of the main stream that you'll find tons of issues and no one is going to care enough to want to fix them.
Even if you didn't find any issues, resources require a linux worker for anything to work so your going to need linux anyways.
I recommend running your db, web and linux worker on linux and then running windows workers as needed.

Deploying to EC2 with chef and knife

I'm trying to deploy an instance to ec2 with the knife command line tool for chef. Running
knife --version
gives Chef: 11.14.0.alpha.1
I've configured my knife.rb file appropriately
knife[:aws_access_key_id] = 'ABSDGYRB7KXSFHGSF'
knife[:aws_secret_access_key] = 'SDHGsdbstsdsdgdfhdfAGSDGC5IOfqsdgdfhAS'
knife[:flavor] = 't1.micro'
knife[:aws_ssh_key_id] = 'myawskey'
knife[:identity_file] = "/Users/place/pem/myawskey.pem"
However when I run
knife ec2 server list
I get
FATAL: Cannot find sub command for: 'ec2 server list'
The ec2 commands were moved to plugins in Chef 0.10
You can install the plugin with `(sudo) gem install knife-ec2
But I've installed the package several times, each time with the same result.
Successfully installed knife-ec2-0.8.0
Parsing documentation for knife-ec2-0.8.0
Done installing documentation for knife-ec2 after 0 seconds
1 gem installed
What could be causing this, and what can I do to fix it?
I feel like it might have something to do with the alpha version of chef I'm running, but that's the version the chef developer kit installed so I'd like to imagine it would be stable. Any suggestions are appreciated. Thanks.
Following this turned out to fix the problem.
First step:
sudo xcode-select --switch /Library/Developer/CommandLineTools/
followed by:
sudo chef gem install knife-ec2