Modules not Loading in VM install

Hi There,

I seem to have a strange issue where I have installed Asterisk on a VM. Asterisk is running and when I enter the CLI with asterisk -rv the modules dont seem to have loaded.

If I then stop asterisk running and enter the CLI with asterisk -cvvvvvvvvvvvvvvvvvvv the modules seem to load fine and I can use the SIP commands such as ‘sip show peers’

Is there anything I can do to trouble shoot this or has anyone had a similar issue.

Asterisk 1.8.28 / CENTOS 7


If you use -rv the modules will already have loaded before you start the CLI thread. Starting asterisk -rv will not cause the client to load any modules.

Thanks David, Im not sure what the issue is really here. As you say asterisk has already started in the first instance and If I start the CLI using -rv and then try to use the command ‘sip show peers’ the CLI returns there is no such command. Or try ‘module show’ there are 0 modules loaded.

On the otherhand if I stop the asterisk service and then start the CLI thread with -cvvvvvvvvvvvvvvvvvvv then try the same commands ‘sip show peers’ I receive the response I expect and ‘module show’ lists all the modules I expect to be loaded.


What do the logs show when the system startup script starts Asterisk? Are you trying to start Asterisk non-root? Is there any sort of chroot jail present/

I guess we are looking at some sort of protection issue.

To diagnose Asterisk start-up problems , you must start Asterisk in a special mode, known as console mode. As you already did ** asterisk -vvvc** then Carefully look for any errors or warnings that are printed to the CLI, and you should have enough information to solve whatever problem is keeping Asterisk from starting up or load the modules.

Thanks for your reply Ambiorixg, when I start Asterisk with the -vvvc command the modules seem to load fine. This issue seems to be when asterisk is starting up automatically from a machine reboot the modules do not seem to load. Is there a way I can logout or debug asterisk starting up?


information is saved on the asterisk logs… check the log files on /var/log/asterisk/, also what happen if you try to load the module manually for exmple : module load

Ive checkd the logs, they dont seem to be populating with any information when I reboot the machine, only when I run asterisk with -vvvc do the log files fill up. If I try to load the module manually the console returns:

module load
Unable to load module
Command ‘module load’ failed.
Loaded => (Cryptographic Digital Signatures)
== Registered channel type ‘Local’ (Local Proxy Channel Driver)
== Manager registered action LocalOptimizeAway
Loaded => (Local Proxy Channel (Note: used internally by other modules))
SIP channel loading…

You are not able to load module, this could be to a misconfiguration on your sip.conf, for example trying to include a non existing file:

ERROR[10417] config.c: The file ‘sip.d/files.conf’ was listed as a #include but it does not exist.
ERROR[10417] chan_sip.c: Contents of sip.conf are invalid and cannot be parsed

please check your sip.conf file carefully or use the sample configuration files

Thanks again, I tried that even with installing the sample conf files but sill the same issue. I’ll recap what is happening.

I reboot the machine asterisk is installed on. I then enter the CLI with asterisk -rvvv I can enter the command ‘core show help’ and the cli returns the results as expected. I then enter the command ‘module show’ and the CLI returns the information that 0 modules are loaded.

I then ‘core stop now’ and enter the CLI again using asterisk ‘asterisk -cvvvvvddd’ now when I enter ‘module show’ all the modules I expect have loaded.

Why would asterisk not load the modules when started automatically? And how can I view logging when asterisk is started automatically?

Thanks again for any help.

logs files are located on /var/log/asterisk/

check also your module load configuration on /etc/asterisk/modules.conf

My modules.conf contains:


I have also checked the log files in /var/log/asterisk/ and the logs fill with data when I launch the CLI with the ‘asterisk -cvvvvvddd’ and doesnt seem to show any issues as the modules load fine when I do this. However no information is output to the log files when asterisk is starting automatically so I cant see what is causing the issue at startup.


This seems to be an installation issue did you enable the LOADADBLE MODULES on the compiler flag during the installation.

Hi just to ensure that is wasnt an installation issue I re-spun up the VM and reinstalled asterisk just as a double check and still the same problem arises. The LOADADBLE MODULES was checked during the compilation. Are there any known issues installing asterisk on a VM?

I’ve also went through the same steps installing asterisk on a physical server and the installation works fine.

I might be wrong but it seems to be a VM issue, and honestly I think the solution could be on the VM settings or would be required some development knowledge to make this installation works

Whilst running a real time application on a VM is not something you should do without an intimate knowledge of how to configure the VM environment to give it enough resources, the only known issue with installing on some VMs is that the CPUINFO reported by the VM indicates capabilities that the virtual CPU doesn’t actually have, resulting in an illegal instruction at run time.

We ended up flattening the VM again and spinning it back up. Then carrying out the asterisk install again everything seemed to work. So we are still unsure as to what caused the issue, but I think you are both correct in thinking that it was something to do with the VM.

Thanks very much for your time and help Gents.