Problems with hosts

Q: "Error opening a connection to https://portal.flexvdi.com/portal/.Please check your network parameters or contact flexVDI support." when updating flexVDI manager, downloading new licenses, or any other action involving flexVDI portal.

A: This is caused by the certificate of one CA included in Red Hat/CentOS, which is expired.

Just update ca-certificates to ca-certificates-2020.2.41-70.0.el7_8.noarch.rpm with the following command:

# yum update -y ca-certificates

And you will be able to connect again.

Q: "kvm_init_vcpu failed: Cannot allocate memory" is shown in /var/log/flexvdi-agent.log when a guest fails to start.

A: This is caused by a bug appeared in libvirt-4.5.0-23.el7_7.1 as described here: https://bugzilla.redhat.com/show_bug.cgi?id=1010885 and as far as we know it only happens on some multi cpu machines.


To work around the bug, log as root in your flexVDI hosts, and:

  1. Edit /etc/libvirt/qemu.conf Behind the line that starts with "#cgroup_controllers", add this line:

    cgroup_controllers = [ "cpu", "devices", "memory", "blkio", "cpuacct" ]
  2. Then restart libvirtd service with.

    # systemctl restart libvirtd
Q: When registering a flexVDI Host with flexVDI Manager, I get the error  "This Host is already registered with a flexVDI Manager"

A: In order to avoid the accidental registration of a Host with two different Managers,registering a Host that had been previously registered requires the execution of a short manual procedure.

  1. Stop flexVDI Agent

    # service flexvdi-agent stop
  2. Unregister the host: remove the file that stores the registration key.

    # rm /etc/flexvdi/flexvdi-agent-key
  3. Then you can run flexvdi-config and register the Host with the flexVDI Manager.
  4. Finally, start flexvdi-agent again, so that it loads the new configuration

    # service flexvdi-agent start
Q: Connecting to host with ssh is slow (10 seconds). Creating new guests takes 10 seconds too. flexVDI-Client  fails to connect to stopped guests with a timeout.

A: This delays are caused because name resolution is not properly working in the host, even for its own hostname. If everything is right, ssh `hostname`  should return immediately.

  • Add the hostname to /etc/hosts like in:

    127.0.0.1 localhost.localdomain localhost
    127.0.0.1 my_own_host_name
  • Also check that /etc/resolv.conf points to the right DNS servers, and that they are up.
Q: When starting a new guest, I get the error "Invalid argument" when opening the disk images.

A: flexVDI sets qemu cache mode to "none", which implies the use of the O_DIRECT flag. This requires that the disk operations are aligned with the memory buffers, and qemu works with 512 bytes blocks. So, if you are using volumes with a block size of 4K, I/O calls like pread() will return EINVAL error.

To solve this problem, format disks with a 512 bytes block size. If it were not possible, please contact support to provide a specialized version of flexVDI Agent.

Q: cgroup errors in flexVDI Agent log

A: After rebooting a host, messages like these may appear in flexVDI agent log:

Exception initializing stats for domain XXXXXXX
Requested operation is not valid: cgroup CPUACCT controller is not mounted

The most probable cause is that libvirtd started before cgconfig due to a race condition. To fix this restart libvirtd:

# service libvirtd restart

This does not affect the guests running on the Host.

Q: In a Media Storage I created with flexvdi-config, some files are not visible

A: This usually means the Samba daemon has no read permission for these files. Check that the owner and permission bits are correctly set, and also the SELinux context if you have SELinux enabled (it is on by default). The SELinux tag of files and directories shared by a Samba daemon must be samba_share_t. You can see it with the -Z flag of the ls command. If some of your files do not have this tag, you can quickly fix them with the command:

# restorecon -r /path/to/cifs/share
Q: Removing an OCFS2 kmod RPM package fails at the PREUN scriptlet

A: There is a bug in the PREUN scriptlet in the OCFS2 kmod packages up to kmod-ocfs2-flexvdi-k957-1.5.0-1.el7. Trying to remove one of these packages will fail with an error like:

...
error: %preun(kmod-ocfs2-flexvdi-k957-1.5.0-1.el7.x86_64) scriptlet failed, exit status 1
Error in PREUN scriptlet in rpm package kmod-ocfs2-flexvdi-k693-1.5.0-1.el7.x86_64
...

In order to fix this problem and remove the package, run the following commands:

# rpm -ql kmod-ocfs2-flexvdi-k957-1.5.0-1.el7.x86_64 | grep '\.ko$' > /tmp/modules.txt
# yum remove --setopt=tsflags=noscripts kmod-ocfs2-flexvdi-k957-1.5.0-1.el7.x86_64
# cat /tmp/modules.txt | /usr/sbin/weak-modules --remove-modules
# rm /tmp/modules.txt
Q: When running "yum update" I get: https://repo.flexvdi.com/releases/3.1/x86_64/repodata/repomd.xml: [Errno 14] curl#58 - "SSL peer rejected your certificate as expired."

A: Your support contract has expired, or you have not update the information in your server.

  • If you have already bought a new subscription, run flexvdi-config in the server you want to update, and then go to Subscription -> Update, and select your new subscription.
  • If you want to buy a new subscription, contact us at info@flexvdi.com
  • If you need to extend your evaluation period, contact us support@flexvdi.com
Q: OCFS2 volume is not mounted, and it was working until the last reboot.

If flexvdi-agent.log shows lines like:

[01/Jan/2021:01:02:03] [WARN] vol_mon: Cannot mount primary disk /dev/sdc 

And dmesg shows:

[471392.669767] o2net: Connected to node labnode01 (num 0) at 10.200.100.8:7777
[471398.669537] o2net: No longer connected to node labnode01 (num 0) at 10.200.100.8:7777
[471408.747936]  sdc: sdc1

Probably the problem is that a new kernel has been installed, but a OCFS2 kernel for the current kernel version has not been installed.

Check if ocfs2 kernel module is running with:

[root@flexdev02 ~]# lsmod | grep ocfs2
ocfs2                1058079  1
jbd2                  107478  1 ocfs2
ocfs2_dlmfs            23358  1
ocfs2_stack_o2cb       13279  1
ocfs2_dlm             165899  1 ocfs2_stack_o2cb
ocfs2_nodemanager     223720  12 ocfs2,ocfs2_stack_o2cb,ocfs2_dlmfs,ocfs2_dlm
ocfs2_stackglue        17171  3 ocfs2,ocfs2_stack_o2cb,ocfs2_dlmfs

You should see a line starting with ocfs2. If you don't, you are missing the ocfs2 kernel module required to mount ocfs2 filesystems. Information about installing it is available at Updating flexVDI software