Managing the cluster

A flexVDI platform can easily scale up by adding new Hosts. The flexVDI Manager will balance the resources allocated to Pools among all the available Hosts, and run Guests in any of them as needed. In the same way, when a Host fails or is removed from the cluster, the flexVDI Manager will accomodate Guests to the resources that remain automatically, also restarting the Guests that may have failed with the Host.

Adding a new Host to the cluster

Adding a new Host to a flexVDI cluster is as easy as following these two simple steps:

  1. Install the flexVDI distribution in the new Host. Follow the Getting Started guide until you perform the Basic host configuration (do not install a new Manager, there is only one Manager instance per cluster). Be careful to create the same virtual bridges as in the other Hosts, so that they map to the same subnets.
  2. Register the Host with your flexVDI Manager instance. Remember that this is done with flexVDI Config. In the main menu, go to "Manager" and select "Register". This time, flexVDI Config will ask you the Manager IP address first, and then the Manager password. After the Host is registered, the SSH keys will be updated in all the Hosts.

Once this is done, you will see the new Host appear in flexVDI Dashboard, and you can start using it right away.

Replacing a failed Host

If you are adding a Host that substitutes another failed one, the best way is to use the same domain name and IP address. In this way, the Manager will replace the previous Host. You can also remove the old Host with the Dashboard and then add the new one.

Removing a Host from the cluster

Removing a host from the flexVDI cluster can be done with the Dashboard. The only requirement is that no Guest is running in the Host, and that it is disabled. Then, just right-click on the desired Host and select the "Remove" option.

Migrating the cluster to a new set of IP addresses

This is a non-trivial operation. There is a constant flow of communication between different components of the platform, and a change in the IP address of one, some or all of them must be correctly coordinated. Here we present two scenarios: changing the IP address of just the flexVDI Manager, or changing the address of both the Manager and the Hosts (e.g. to move them to a different subnetwork).

Changing the IP address of the flexVDI Manager instance

This change does not require to stop the currently running guests, but we recommend you disable the access to the platform to new users until you finish this procedure.

  1. Stop the flexvdi-agent service in every host:

    $ systemctl stop flexvdi-agent # In every host

    This is needed so they do not try to restart the flexVDI Manager instance once its address is changed and the communication is lost.

  2. Log into your flexVDI Manager instance (with ssh) and edit the file /etc/sysconfig/network-scripts/ifcfg-eth0. Modify it to your needs, changing the IPADDR field, and possibly the NETMASK and GATEWAY fields too.
  3. Restart the network service:

    $ service network restart

    You will lose communication with the manager once the new IP address is made effective. You may ssh into it again to check that the change has been successfully done.

  4. Fix the flexVDI Manager IP address in the files /etc/flexvdi/flexvdi-agent-watchdog and /etc/flexvdi/flexvdi-gateway.conf in every host. Also, in every other flexVDI Gateway instance you have. You will have to restart the flexvdi-gateway service where needed.
  5. Finally, restart the flexvdi-agent service in every host:

    $ systemctl start flexvdi-agent # In every host

Changing the IP address of the flexVDI hosts

Changing the IP address of the flexVDI hosts is a bit more delicate process. In particular, if you have configured the OCFS2 cluster and mounted one or more OCFS2 Volumes, you will have to unmount them and stop the cluster in order to change the hosts' IP addresses. This means that you must first stop all the Guests that are using any of these Volumes. In fact, we recommend that you stop all the Guests and disable the access to the platform before continuing.

  1. Stop the flexvdi-agent service in every host.
  2. If you also want to change the IP address of the flexVDI Manager, this is the moment. Just do not restart the flexvdi-agents yet.
  3. In the flexVDI Dashboard, you should see all the hosts in an unreachable state. Disable all of them.
  4. Also with the Dashboard, change the IP address of every host to its new value, and enable them again.
  5. If you have configured the OCFS2 cluster:
    1. In every host, stop the o2cb service:

      $ systemctl stop o2cb

      Your flexVDI Manager instance will be stopped if its images are being stored in an OCFS2 Volume.

    2. Edit the file /etc/ocfs2/cluster.conf and replace all the IP addresses with their new values. You can edit this file once and then copy it to the other hosts.
  6. Using flexvdi-config, change the IP address of every host. When asked to, restart the network service. If you are logged in with ssh, you will lose connection when the new IP address is made effective.
  7. In every host, check the /etc/hosts file to see if it needs to be updated with the new IP addresses. If you have a DNS service, you may need to change it too.
  8. If you have reconfigured the OCFS2 cluster, restart it again in every host:

    $ systemctl start o2cb
  9. Restart the flexvdi-agent service in every host.
  10. If the flexVDI Manager instance was stopped during the process (e.g. if its images were stored in an OCFS2 Volume), wait until one of the agents restarts it.
  11. Check that the platform is correctly configured again. You may need to fix the IP address of your Media Storages if any of them was being served from one of the hosts.