Help installing oVirt on single machine, without cockpit

I'm trying to install both the oVirt engine (so I have the API), and hypervisor on the same machine. I'm hoping I don't need cockpit, and I can write some custom scripts to manage oVirt through the API. I tried a couple ways, and both were blocked: # on CentOS 9 stream, installing oVirt engine: On a fresh CentOS install, tried following the directions [here](https://www.ovirt.org/documentation/installing_ovirt_as_a_standalone_manager...). They failed at step 3.2, when adding the modules (missing groups or modules). Tried skipping it, but step 3.3.2 failed when running `dnf install ovirt-engine`, package couldn't be found. The closest package I see is `ovirt-hosted-engine-setup-2.5.4-1.el9.noarch`. Is that what I want? # On oVirt node, installing engine: Couldn't get the networking working, even though I added it during the install process. Also tried wired connection, and no luck. Blocked early on, but read this was SUPER minimal anyway, so maybe this wasn't the right path. I'm just trying to have a working API, along side the hypervisor to run vm's, both on the same machine. I'm down to go a third way too, if anyone has any ideas. Thanks!

Hi, The link you attached is for installing the engine on a stand alone machine. In case you want to have the engine and the host on the same machine you should install hosted-engine: https://www.ovirt.org/documentation/installing_ovirt_as_a_self-hosted_engine... Regards, Asaf On Wed, Dec 8, 2021 at 8:57 AM <Cameronsplaze222@gmail.com> wrote:
I'm trying to install both the oVirt engine (so I have the API), and hypervisor on the same machine. I'm hoping I don't need cockpit, and I can write some custom scripts to manage oVirt through the API. I tried a couple ways, and both were blocked:
# on CentOS 9 stream, installing oVirt engine: On a fresh CentOS install, tried following the directions [here]( https://www.ovirt.org/documentation/installing_ovirt_as_a_standalone_manager...). They failed at step 3.2, when adding the modules (missing groups or modules). Tried skipping it, but step 3.3.2 failed when running `dnf install ovirt-engine`, package couldn't be found. The closest package I see is `ovirt-hosted-engine-setup-2.5.4-1.el9.noarch`. Is that what I want?
# On oVirt node, installing engine: Couldn't get the networking working, even though I added it during the install process. Also tried wired connection, and no luck. Blocked early on, but read this was SUPER minimal anyway, so maybe this wasn't the right path.
I'm just trying to have a working API, along side the hypervisor to run vm's, both on the same machine. I'm down to go a third way too, if anyone has any ideas. Thanks! _______________________________________________ Users mailing list -- users@ovirt.org To unsubscribe send an email to users-leave@ovirt.org Privacy Statement: https://www.ovirt.org/privacy-policy.html oVirt Code of Conduct: https://www.ovirt.org/community/about/community-guidelines/ List Archives: https://lists.ovirt.org/archives/list/users@ovirt.org/message/3L6EVRT4YBEJOI...

You mentioned "also tried wired connection". You should always use a wired connection. Using a wireless connection is likely to give you lots of problems.

HI, On Wed, December 8, 2021 1:16 am, Cameronsplaze222@gmail.com wrote:
I'm trying to install both the oVirt engine (so I have the API), and hypervisor on the same machine. I'm hoping I don't need cockpit, and I can write some custom scripts to manage oVirt through the API. I tried a couple ways, and both were blocked:
# on CentOS 9 stream, installing oVirt engine:
I presume you mean CentOS *8* stream??
On a fresh CentOS install, tried following the directions [here](https://www.ovirt.org/documentation/installing_ovirt_as_a_standalone_manager...). They failed at step 3.2, when adding the modules (missing groups or modules). Tried skipping it, but step 3.3.2 failed when running `dnf install ovirt-engine`, package couldn't be found. The closest package I see is `ovirt-hosted-engine-setup-2.5.4-1.el9.noarch`. Is that what I want?
These are the wrong instructions. This is how to set up the engine on its own machine; you need to set up the *host* with hosted-engine. Try looking at https://www.ovirt.org/documentation/installing_ovirt_as_a_self-hosted_engine... So following the correct instructions, you will eventually need to install the engine setup RPM and then run: hosted-engine --deploy That will set up the host with the hosted-engine VM. Then you'll need to get into that VM and set up the engine within the engine VM.
# On oVirt node, installing engine: Couldn't get the networking working, even though I added it during the install process. Also tried wired connection, and no luck. Blocked early on, but read this was SUPER minimal anyway, so maybe this wasn't the right path.
ALWAYS USE WIRED NETWORKING for services.
I'm just trying to have a working API, along side the hypervisor to run vm's, both on the same machine. I'm down to go a third way too, if anyone has any ideas. Thanks!
I'm not sure what you're trying to do here. If you just want API support, you could just script virtsh (over ssh if necessary). I wouldn't install ovirt just to get API support for VMs; it's way overkill for that. In my mind, the role of ovirt is to provide web-based access (management and console) to VMs for a team of distributed users without requiring shell access to the host system. -derek -- Derek Atkins 617-623-3745 derek@ihtfp.com www.ihtfp.com Computer and Internet Security Consultant

Hi all, The self-hosted you all provided definitely put me on the right track, thanks for that!
I presume you mean CentOS *8* stream??
I'm using the x86_64 CentOS 9 stream available here https://www.centos.org/centos-stream/. Is only 8 supported? That explains the next problem I'm having really well. I can definitely switch if so. The problem is when running ` sudo yum install ovirt-hosted-engine-setup.noarch --nobest`, a bunch of "nothing provides ...": (Same with/without --nobest). ``` [victor@localhost Desktop]$ sudo yum install ovirt-hosted-engine-setup.noarch --nobest Last metadata expiration check: 0:11:00 ago on Wed 08 Dec 2021 07:51:48 AM AKST. Error: Problem: conflicting requests - nothing provides ovirt-host >= 4.5.0 needed by ovirt-hosted-engine-setup-2.5.4-1.el9.noarch - nothing provides ovirt-hosted-engine-ha >= 2.4 needed by ovirt-hosted-engine-setup-2.5.4-1.el9.noarch - nothing provides python3-otopi >= 1.9.0 needed by ovirt-hosted-engine-setup-2.5.4-1.el9.noarch - nothing provides python3-ovirt-engine-sdk4 >= 4.3.1 needed by ovirt-hosted-engine-setup-2.5.4-1.el9.noarch - nothing provides python3-ovirt-setup-lib >= 1.3.2 needed by ovirt-hosted-engine-setup-2.5.4-1.el9.noarch - nothing provides vdsm-python >= 4.50 needed by ovirt-hosted-engine-setup-2.5.4-1.el9.noarch (try to add '--skip-broken' to skip uninstallable packages) ``` Also at 5.1, it says it can't find the module 'virt'. Is there a repo I'm missing maybe? I still have the release44.rpm from the standalone engine page added.
I'm not sure what you're trying to do here. If you just want API support, you could just script virtsh (over ssh if necessary). I wouldn't install ovirt just to get API support for VMs
Kinda, to be honest this is a passion project of mine that I've always wanted to take a stab at writing. I originally started with Xen, but heard that oVirt is able to develop faster, and has passed them. I need both the API, and hypervisor to run VM's, on the same machine. I'm planning on writing my own GUI manager for it. SUPER long term, I'll have a single .iso people can install to get oVirt + this gui on their single machine. With that, I think the self-hosted engine route is right for me? Since it runs the nodes, and API?

Should have replied to the main thread before, my b. Switching to centos 8 stream did the trick! I had to add the release44.rpm again, but after the ovirt-hosted-engine-setupp.noarch install, I was able to run `hosted-engine --deploy`! Inside that hosted-engine command, the setup is failing at "Detecting host timezone. Please provide FQDN you would like to use...". I did the default "enter", and it says: Failed to execute stage 'Environment customization': Empty strings are not supported! But I'll poke at it again tonight/tomorrow, just wanted to update here. I haven't had a chance to poke at that at ALL yet. I'm more-so curious if I'm on the right path for a single-machine install, and wanted to update you all on the CentOS fix. Thanks!

On Wed, Dec 8, 2021 at 10:15 PM <cameronsplaze222@gmail.com> wrote:
Should have replied to the main thread before, my b.
Switching to centos 8 stream did the trick! I had to add the release44.rpm again, but after the ovirt-hosted-engine-setupp.noarch install, I was able to run `hosted-engine --deploy`!
Glad to hear that, thanks for the report!
Inside that hosted-engine command, the setup is failing at "Detecting host timezone. Please provide FQDN you would like to use...".
Is this an exact copy from the terminal? I suppose not. It's two lines, and the second has '...provide the FQDN'.
I did the default "enter",
You are right. This question should not have a default. I think this should fix, didn't try: https://gerrit.ovirt.org/c/ovirt-setup-lib/+/117977 .
and it says:
Failed to execute stage 'Environment customization': Empty strings are not supported!
Looks like another bug. This should fix, didn't test: https://gerrit.ovirt.org/c/ovirt-setup-lib/+/117978 I suppose most people do supply a name here, and the few that don't, just retry without reporting a bug...
But I'll poke at it again tonight/tomorrow, just wanted to update here. I haven't had a chance to poke at that at ALL yet. I'm more-so curious if I'm on the right path for a single-machine install, and wanted to update you all on the CentOS fix.
I'd like to clarify that a hosted-engine deployment isn't always the best approach for a single machine setup. You might want to check the list archives for previous discussions about this - we tend to have one once a year or so - perhaps this is worth a doc bug or a page on the web site. E.g.: https://www.mail-archive.com/users@ovirt.org/msg65276.html https://lists.ovirt.org/pipermail/users/2016-September/042512.html https://lists.ovirt.org/archives/list/users@ovirt.org/thread/6ECDFO55RCA6RBG... https://lists.ovirt.org/archives/list/users@ovirt.org/thread/OB5AWOMHJZVR5IN... https://lists.ovirt.org/archives/list/users@ovirt.org/thread/PQQSNOA7JLKKJ53... Best regards, -- Didi

Hi,
... You might want to check the list archives for previous discussions about this ...
Thanks for those links! I have an idea for a path forward, but I'm not sure it's supported. It looks like oVirt used to have a "all-in-one" option, but the hosted engine replaced that.
I'd like to clarify that a hosted-engine deployment isn't always the best approach for a single machine setup.
The other path I can see is installing the vanilla "engine-setup" to an oVirt node directly. That way the engine isn't inside a VM (I just hate how much cpu/ram you have to dedicate to the VM, and it's not even dynamic). Is it in a VM for security? I'll never need to move it for my use case, so I can live without the adaptability VM's come with. If installing the engine directly to the node IS supported, this was where I was hitting my problem: ```bash yum upgrade -y yum install https://resources.ovirt.org/pub/yum-repo/ovirt-release44.rpm yum upgrade -y yum install ovirt-engine # HERE, can't find it. I can still install ovirt-engine-appliance for the hosted-engine setup. ``` I was also hitting a problem at this step, with the machine not knowing the modules exist: https://www.ovirt.org/documentation/installing_ovirt_as_a_standalone_manager... (i.e `dnf module enable javapackages-tools` returns `missing groups or modules: javapackages-tools`) If installing the engine directly to a node ISN'T supported, what other routes for a single host setup are there? The only replacement for the all-in-one I can find, is the hosted-engine route.
I suppose most people do supply a name here, and the few that don't, just retry without reporting a bug
I saw a lot of people using input files anyways to automate the install, so I think I'll go that route too, if hosted-engine still ends up taking the least resources of the possible options. Thanks! Cameron

With this comment, I'm poking at getting the engine to run directly on the node. I figure worst case, I might try throwing it in a container if there's package conflicts. That'll at least give me the lighter-engine I'm looking for, along with not having to manage it's resources. Looks like the powertools repo isn't enabled by default on the node, so following this guide let me enable all the different modules for the engine: https://computingforgeeks.com/enable-powertools-repository-on-centos-rhel-li... The engine-setup command is apart of "rpm install ovirt-engine-setup-base", which CentOS 8 can find, but not the node. It's inside the ovirt-4.4 repo too, so I have no idea why the node can't find it. To get the engine setup running on CentOS, I also needed to install ovirt-engine-setup-plugin-ovirt-engine-common (this bug here: https://bugzilla.redhat.com/show_bug.cgi?id=1114978), and the node couldn't find this package either.

On Sat, Dec 11, 2021 at 1:06 AM <cameronsplaze222@gmail.com> wrote:
With this comment, I'm poking at getting the engine to run directly on the node. I figure worst case, I might try throwing it in a container if there's package conflicts.
Several years ago, someone did try running the engine in a container. I think it did work at some point, but eventually was neglected. You are most welcome to try - it can be an interesting project.
That'll at least give me the lighter-engine I'm looking for, along with not having to manage it's resources.
Looks like the powertools repo isn't enabled by default on the node, so following this guide let me enable all the different modules for the engine: https://computingforgeeks.com/enable-powertools-repository-on-centos-rhel-li...
The engine-setup command is apart of "rpm install ovirt-engine-setup-base", which CentOS 8 can find, but not the node. It's inside the ovirt-4.4 repo too, so I have no idea why the node can't find it. To get the engine setup running on CentOS, I also needed to install ovirt-engine-setup-plugin-ovirt-engine-common (this bug here: https://bugzilla.redhat.com/show_bug.cgi?id=1114978), and the node couldn't find this package either.
(See my other reply about repos being disabled in node). Best regards, -- Didi

On Fri, Dec 10, 2021 at 10:30 PM <cameronsplaze222@gmail.com> wrote:
Hi,
... You might want to check the list archives for previous discussions about this ...
Thanks for those links! I have an idea for a path forward, but I'm not sure it's supported. It looks like oVirt used to have a "all-in-one" option,
Indeed, until 3.6.
but the hosted engine replaced that.
hosted-engine was introduced at 3.3/3.4, so not an exact replacement, but yes.
I'd like to clarify that a hosted-engine deployment isn't always the best approach for a single machine setup.
The other path I can see is installing the vanilla "engine-setup" to an oVirt node directly.
This is exactly what all-in-one used to do, back then. At the time, this didn't work "out-of-the-box", so the all-in-one support (engine-setup plugin) was needed. Since it was removed, we got a few reports here and there about people doing this, and it mostly seems to work - but it seems no-one cares enough to document the issues if any, and especially to update this document per release. So YMMV.
That way the engine isn't inside a VM
Indeed
(I just hate how much cpu/ram you have to dedicate to the VM, and it's not even dynamic).
How much? if it's just for development/testing, you can try as little as 2GB. If it breaks, just try a bit more. In ovirt-system-tests we use 3171MB (~ 3GB) and it works.
Is it in a VM for security?
Main feature you get from having the engine in its own VM is that you can live-migrate this VM to another host, if/when you need to take down a host for maintenance.
I'll never need to move it for my use case, so I can live without the adaptability VM's come with.
Perhaps clarify your needs? Are you sure oVirt is the right solution? You can also use plain virsh/virt-manager.
If installing the engine directly to the node IS supported, this was where I was hitting my problem: ```bash yum upgrade -y yum install https://resources.ovirt.org/pub/yum-repo/ovirt-release44.rpm yum upgrade -y yum install ovirt-engine # HERE, can't find it. I can still install ovirt-engine-appliance for the hosted-engine setup.
ovirt-node, generally speaking, is an OST _image_. It's designed to allow upgrading to a later version by installing an update image and rebooting, also allowing rolling back to the previous version (image). If you want to try running the engine on a host, perhaps try plain el8, not node. If you want to try on node, please note that node disables/excludes all repos/packages by default, other than node update images. So you'll need to enable relevant repos.
``` I was also hitting a problem at this step, with the machine not knowing the modules exist: https://www.ovirt.org/documentation/installing_ovirt_as_a_standalone_manager... (i.e `dnf module enable javapackages-tools` returns `missing groups or modules: javapackages-tools`)
If installing the engine directly to a node ISN'T supported, what other routes for a single host setup are there? The only replacement for the all-in-one I can find, is the hosted-engine route.
Depends on needs. For studying/testing/development (other than specifically hosted-engine- related stuff), I think it might be best to create separate VMs on your host for separate uses - one for the engine, perhaps another for storage, one or more for hosts (so that you can test live-migration/ha), etc.
I suppose most people do supply a name here, and the few that don't, just retry without reporting a bug
I saw a lot of people using input files anyways to automate the install, so I think I'll go that route too, if hosted-engine still ends up taking the least resources of the possible options.
+1 for automation. Re "lease resources" - perhaps first explain your needs. Best regards, -- Didi

How much? if it's just for development/testing, you can try as little as 2GB
That's still a lot for what my use-case is. I'd like the hypervisor as a whole to take at most that much, if possible. This project is similar to QubesOS, so I don't need to worry about moving the engine around later or high availability, but I want this to run on 8gb laptops. # Engine install on node: For this route, I still can't get the node to find the "ovirt-engine-setup-base" package. Doing "yum repolist all" shows the ovirt-4.4 repos enabled, and I used the --enablerepo and --disablerepo flags, to make the node match exactly to what the CentOS 8 has enabled. CentOS still has no problems finding the package, and both OS's show the same thing inside /etc/centos-release, so I can't figure out why I can't install the engine directly to the node. # Engine inside container: I have the setup running inside the container finally! It's going to take me a bit to figure out the networking for the API, and how to setup the postgres database it needs. Since the container is CentOS, I can install that engine-setup package, and run it on the node this way (hopefully xD). Thanks! Cameron

I think my last reply got lost, but sorry if two appear here.
Perhaps clarify your needs? Are you sure oVirt is the right solution?
The project I'm working on is similar to "QubesOS", so I don't need to move the engine at all, but keeping this as light weight as possible is note-worthy. (I want to run this on 8GB laptops, if possible). Seems like moving the engine VM to a container is possible, so I'm optimistic. Once I get the node/engine figured out, I can start on the GUI, that'll make api calls against the engine. # With installing engine directly on a node Even with enabling/disabling the repos, so they match a CentOS 8 install, I still can't get the node to find "ovirt-engine-setup-base". I tried "yum repo list all" to verify ovirt-4.4 was enabled, and I used --enablerepo / --disablerepo flags, to match the CentOS repo's exactly. The weird thing is both OS's show the same thing in /etc/centos-release, so I'm not sure you could only block one of them from the repo, server side. I'm not sure what's going on here. # With the engine inside a container Finally got engine-setup to run inside a container! I need to figure out the networking next, along with how to best hook up a postgresql db to it. This part is going smoothly so far, I just wanted to update you all. Thanks! Cameron

On Thu, Dec 16, 2021 at 9:36 AM <cameronsplaze222@gmail.com> wrote:
I think my last reply got lost, but sorry if two appear here.
Perhaps clarify your needs? Are you sure oVirt is the right solution?
The project I'm working on is similar to "QubesOS", so I don't need to move the engine at all, but keeping this as light weight as possible is note-worthy. (I want to run this on 8GB laptops, if possible). Seems like moving the engine VM to a container is possible, so I'm optimistic. Once I get the node/engine figured out, I can start on the GUI, that'll make api calls against the engine.
# With installing engine directly on a node Even with enabling/disabling the repos, so they match a CentOS 8 install, I still can't get the node to find "ovirt-engine-setup-base". I tried "yum repo list all" to verify ovirt-4.4 was enabled, and I used --enablerepo / --disablerepo flags, to match the CentOS repo's exactly. The weird thing is both OS's show the same thing in /etc/centos-release
Indeed, we do not change this file. You can check /etc/os-release if you want.
, so I'm not sure you could only block one of them from the repo, server side. I'm not sure what's going on here.
Perhaps you didn't comment-out/remove the 'includepkgs' line(s)?
# With the engine inside a container Finally got engine-setup to run inside a container! I need to figure out the networking next, along with how to best hook up a postgresql db to it. This part is going smoothly so far, I just wanted to update you all.
Thanks for the update, sounds promising! Just in case you want to have a look at the very old project I mentioned, it's here: https://github.com/mgoldboi/oVirt-Dockerized Best regards, -- Didi

On Thu, Dec 16, 2021 at 9:05 AM Yedidyah Bar David <didi@redhat.com> wrote:
# With the engine inside a container Finally got engine-setup to run inside a container! I need to figure out the networking next, along with how to best hook up a postgresql db to it. This part is going smoothly so far, I just wanted to update you all.
Thanks for the update, sounds promising!
Just in case you want to have a look at the very old project I mentioned, it's here:
https://github.com/mgoldboi/oVirt-Dockerized
Best regards, -- Didi
One problem I see is that now the update of a host is driven by the engine through playbooks and is not manually doable from the host itself as some time ago. And to have a container going through making modifications to the host where it is running doesn't seem a good idea. Gianluca

Perhaps you didn't comment-out/remove the 'includepkgs' line(s)?
Yep that did it. Thanks! It can't find dependent packages now, but I'm guessing if I do the same for other repos, it'll find them.
Just in case you want to have a look at the very old project I mentioned, it's here
I didn't think the code was still around or public for some reason. Yes that's amazing!
One problem I see is that now the update of a host is driven by the engine through playbooks and is not manually doable from the host itself as some time ago. And to have a container going through making modifications to the host where it is running doesn't seem a good idea
For an hosted-engine setup, does the engine VM modify the host it's running on then? And you need the VM abstraction to update the host safely? If so, I'm guessing running the engine directly on the node isn't safe either then. Also, if the host/node itself gets updates though `dnf upgrade`, would it be possible to let dnf handle upgrades for it? and then rebuild/pull the latest container for engine updates? Or could the updates get out of sync of one another? Thanks! Cameron

On Fri, Dec 17, 2021 at 5:08 AM <cameronsplaze222@gmail.com> wrote:
One problem I see is that now the update of a host is driven by the engine through playbooks and is not manually doable from the host itself as some time ago. And to have a container going through making modifications to the host where it is running doesn't seem a good idea
For an hosted-engine setup, does the engine VM modify the host it's running on then? And you need the VM abstraction to update the host safely? If so, I'm guessing running the engine directly on the node isn't safe either then. Also, if the host/node itself gets updates though `dnf upgrade`, would it be possible to let dnf handle upgrades for it? and then rebuild/pull the latest container for engine updates? Or could the updates get out of sync of one another?
Thanks! Cameron
I think this thread (even if the title is not so clear about the discussions born inside) could be a good read regarding single host limitations in terms of updating the environment, after the initial deployment: https://lists.ovirt.org/archives/list/users@ovirt.org/thread/2E6IOFCH5MJSPZ6... We were at 4.4.2 time and I think the point now is the same. See in particular the last 9-10 comments, starting from Sandro one at "Sunday, 4 October 11:30 p.m." They were related to single host and update questions. Gianluca

I tried to reply and didn't noticed I wasn't logged in, so it started a new thread. Can finally update you all! So I have the engine installed to the node. For some reason, the node-engine looks for certs in a different spot than the CentOS-engine. Soft linking, so the cert is in both spots, lets the setup complete: ln -s /etc/pki/ovirt-engine/apache-ca.pem /etc/pki/vdsm/certs/cacert.pem ln -s /etc/pki/ovirt-engine/certs/apache.cer /etc/pki/vdsm/certs/vdsmcert.pem ln -s /etc/pki/ovirt-engine/keys/apache.key.nopass /etc/pki/vdsm/keys/vdsmkey.pem After that, I add the host to the engine through the python sdk / API. I'm still having a problem starting a VM. The host's status is "up" externally, but not active. I can't find how to activate it through the sdk, the docs have an example only through the GUI. If I hit the endpoint it shows: wget --user=admin@internal --password=fake --ca-certificate=/etc/pki/ovirt-engine/apache-ca.pem --output-document - "https://localhost.localdomain:443/ovirt-engine/api/hosts/some_random_id/acti..." then I get a "405 Method Not Allowed" back. If I list all the attributes for a host in python, none of them look like they can activate it: ```python host_service = connection.system_service().hosts_service() print( dir(host_service.list()[0]) ) # Prints a lot of attr's, but none activate related that I see. ``` The internal status of the node is non_operational, and detail says "network_unreachable". Is this expected when you first link a engine to a node? If so, is there a way to activate a node through the API? Or is this where the engine and host start to step on each-other, and thus why this configuration isn't supported?
participants (7)
-
Asaf Rachmani
-
Cameronsplaze222@gmail.com
-
cameronsplaze222@gmail.com
-
Derek Atkins
-
Gianluca Cecchi
-
mediocre.slacker@protonmail.com
-
Yedidyah Bar David