Since first release of “KVM-VDI” – an open source VDI solution, based on quemu-kvm and libvirt, users are frequently struggling to install it on the first run.

These are most common problems:

  • After importing sql from sql/vdi.sql, you cannot login with default user name and password.

sql/vsi.sql is not intended to be manually imported. You should delete all tables from your KVM-VDI database, and then visit your KVM-VDI dashboard URL. You should see installation process there.

  • Slow login to freshly installed dashboard. Also dashboard seems to look “broken”.

This happens mainly because of misconfiguration between dashboard server and hypervisors. You must create ssh keys for “VDI” user, configure sudo, copy and configure all needed executables on hypervisor side. There is a how-to in “Hypervisor installation” section in README file.

  • Dashboard installation throws “Incorrect datetime value: ‘0000-00-00 00:00:00’ for column ‘lastlogin’ at row 1”

Some mysql/mariadb configurations use “NO_ZERO_IN_DATE,NO_ZERO_DATE”  SQL mode. This should be disabled. Easiest way to determine what is your current SQL mode, is to run “SHOW VARIABLES LIKE ‘sql_mode'” in your mysql command-line. Anything else, than:

| Variable_name | Value |
| sql_mode         |              |
should be avoided. Try reconfiguring your mysql server by adding sql-mode=”” after [mysqld]. Also you can change this parameter in runtime by using SET GLOBAL sql_mode = ”; command. But this will last only till next mysql server restart.

  • If your dashboard installation failed, you will be not able to re-run installation again, even after reconfiguring your dashboard config.php file correctly.

This is intended. If first installation did create any tables in database, it will not overwrite them. Thus you need to delete all tables in your database, and then re-visit KVM-VDI dashboard URL.

  • “Copy disk from source” does not work. If ran manually (/usr/local/VDI/copy-file), an error is displayed: from requests.packages.urllib3.exceptions import InsecureRequestWarning
    ImportError: cannot import name InsecureRequestWarning

Debian 8 released never python-urllib3 in which they removed SSLv3 support. This causes the error above in python-requests module. To solve his issue you must upgrade python-requests package:

apt-get install python-pip
pip install requests==2.6.0

Tagged with:

9 Responses to KVM-VDI most common problems

  1. Edgars says:

    Hi, can someone help,
    I can’t add iso file to source installation
    What could be reasons?
    Maybe it can be done manually?
    image of dashboard:

  2. Edgars says:

    I have tried to check if $default_iso_path /var/lib/libvirt/images is ok(there is my iso), as well I tried to write this path manually in kvm-vdi/create_vm.php
    and kvm-vdi/inc/modules/KVM/New_VM.php

    iso file was showed in dashborad, but no changes unfortunately to database was made

  3. Hello, this most of the times is caused by KVM-VDI being unable to connect to hypervisor by ssh or mis-configured /etc/sudoers file.
    Please check your hypervisor auth logs, also you may want to enable debug logging in KVM-VDI and check web server error logs after.

  4. Edgars says:

    Thank you, your previous answer, it helped me a lot,
    I recheked my access to database,
    as well I checked sudoers for right permissions.
    I found one more mistake – I was not created /data

    Now I try to connect via html5 and spice, but I see only black screen in my browser and address( spice does not open anything
    What is proper wbsockify file (spice/html5/ru.js configuration (my dashboard address from network is, hypervisor address is and both are on the same ubuntu server) ) (is this only file to change?) in lines 213 and 220 and 229?
    There is not much about it in documentation or Internet
    I tried some logical choices, but no effect

    213 ‘host’: getURLParameter(‘host’) || ‘’,
    214. ‘port’: getURLParameter(‘port’) || 8000,
    215. ‘protocol’: getURLParameter(‘protocol’) || ‘wss’,
    216. ‘token’: getURLParameter(‘password’) || ”,
    217. ‘vmHost’: getURLParameter(‘vmhost’) || false,
    218. ‘vmPort’: getURLParameter(‘vmport’) || false,
    219. ‘useBus’: false,
    220. ‘busHost’: ‘’,
    221. ‘busPort’: 61613,
    222. ‘busSubscriptions’: [‘/topic/00000000-0000-0000-0000-000000000000’],
    223. ‘busUser’: ‘00000000-0000-0000-0000-000000000000’,
    224. ‘busPass’: ‘potato’,
    225. // Connection Control
    226. ‘connectionControl’: false,
    227. ‘heartbeatToken’: ‘heartbeat’,
    228. ‘heartbeatTimeout’: 4000,//miliseconds
    229. ‘busFileServerBaseUrl’: ‘’,

  5. Hello, you should not change anything in run.js file. Except – use ‘wss’ if you are using SSL enabled Websockify. If not, you should change it to ‘ws’.
    If your hypervisors IP is, then the address URL you are trying to access your console is incorrect. Perhaps you are trying to access html5 console directly and not via client portal (yoursite/client_index.php)?

  6. Edgars says:

    Your point was in place.
    Now I tried with different combinations of functions/config.php from mysite/client_index.php as well, but the best I could get ,and not always, is this mistake “failed to construct websockets”:

    websockets address in functions/config.php needs to be with 8000 run.js has it, or mysiteip with 5959 ?

    Anyway, thanks for your time!

  7. Since your dashboard address is, then you should use:
    I you start your websockify server on port 8000, then $websockets_port should be:

  8. Edgars says:

    Thank you! html5 works!
    Maybe you have some ideas, if connection from Thin client (Ubuntu 16.04 Desktop) is not working, I can connect to cliet which says 2 VM is available, but when push button to connect to virtual machine it is just loading and loading.
    Do I need some configration to Linux guest OS (Ubuntu 12.04)?

  9. Something is wrong at hypervisor side – probably VMs are failing to start (try starting them via `virsh start` command on hypervisor). Also, enable debug and check webserver error logs.

Leave a Reply

Your email address will not be published. Required fields are marked *