<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Python VM not starting in NSO Docker container on M1 Mac in NSO Developer Hub Discussions</title>
    <link>https://community.cisco.com/t5/nso-developer-hub-discussions/python-vm-not-starting-in-nso-docker-container-on-m1-mac/m-p/4655740#M7264</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.cisco.com/t5/user/viewprofilepage/user-id/536962"&gt;samuel.coome@secunetics.com&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This might be a know bug. Best to check the Cisco Bug Search Tool and see if there is a workaround:&amp;nbsp;&lt;A href="https://bst.cloudapps.cisco.com/bugsearch" target="_blank"&gt;https://bst.cloudapps.cisco.com/bugsearch&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 23 Jul 2022 01:07:17 GMT</pubDate>
    <dc:creator>Alexander Stevenson</dc:creator>
    <dc:date>2022-07-23T01:07:17Z</dc:date>
    <item>
      <title>Python VM not starting in NSO Docker container on M1 Mac</title>
      <link>https://community.cisco.com/t5/nso-developer-hub-discussions/python-vm-not-starting-in-nso-docker-container-on-m1-mac/m-p/4646324#M7219</link>
      <description>&lt;P&gt;Similar to this post&amp;nbsp;&lt;A href="https://community.cisco.com/t5/nso-developer-hub-discussions/python-vm-not-starting-from-darwin-ncs-install-on-m1-macbook/m-p/4646305/highlight/true#M7218" target="_blank"&gt;https://community.cisco.com/t5/nso-developer-hub-discussions/python-vm-not-starting-from-darwin-ncs-install-on-m1-macbook/m-p/4646305/highlight/true#M7218&lt;/A&gt;&amp;nbsp;I am having issue with NSO and the M1 Mac.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My second issue is running a Linux docker container on my M1. M1 Mac uses Rosetta stone to perform qemu emulation for allow x86_64 programs to run on the M1 (arm64) Mac. The docker desktop runs fine, and other co-workers have containers that they ran on their previous Macs prior to moving to the M1 chipset. The NSO docker image will start up fine, note as healthy, and I can access the ncs cli. The java works fine, however the python VM fails to load.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;admin@c647657c6c41# show packages package oper-status | tab
                                                                                                                   PACKAGE
                                     PROGRAM                                                                       META     FILE
                                     CODE     JAVA           PYTHON         BAD NCS  PACKAGE  PACKAGE  CIRCULAR    DATA     LOAD   ERROR
NAME                             UP  ERROR    UNINITIALIZED  UNINITIALIZED  VERSION  NAME     VERSION  DEPENDENCY  ERROR    ERROR  INFO
------------------------------------------------------------------------------------------------------------------------------------------
aaa                              X   -        -              -              -        -        -        -           -        -      -
apply-template-interfaces        -   -        -              X              -        -        -        -           -        -      -
apply-to-devices                 -   -        -              X              -        -        -        -           -        -      -
...&lt;/PRE&gt;&lt;PRE&gt;root@c647657c6c41:/# cat log/ncs-python-vm-apply-template-interfaces.log
&amp;lt;INFO&amp;gt; 07-Jul-2022::14:17:40.339 apply-template-interfaces MainThread: - Python 3.7.3 (default, Jan 22 2021, 20:04:44) [GCC 8.3.0]
&amp;lt;INFO&amp;gt; 07-Jul-2022::14:17:40.346 apply-template-interfaces MainThread: - Starting...
&amp;lt;INFO&amp;gt; 07-Jul-2022::14:17:40.356 apply-template-interfaces MainThread: - Started
root@c647657c6c41:/#&lt;/PRE&gt;&lt;P&gt;But each one exits early.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;root@c647657c6c41:/# cat log/ncs-python-vm.log
&amp;lt;INFO&amp;gt; 7-Jul-2022::14:17:39.516 c647657c6c41 ncs[100]: Started PyVM: &amp;lt;&amp;lt;"apply-to-devices"&amp;gt;&amp;gt; , Port=#Port&amp;lt;0.99&amp;gt; , OSpid="1276"
&amp;lt;INFO&amp;gt; 7-Jul-2022::14:17:39.614 c647657c6c41 ncs[100]: Started PyVM: &amp;lt;&amp;lt;"apply-template-interfaces"&amp;gt;&amp;gt; , Port=#Port&amp;lt;0.101&amp;gt; , OSpid="1287"
...
&amp;lt;INFO&amp;gt; 7-Jul-2022::14:17:39.658 c647657c6c41 ncs[100]: apply-to-devices :: Starting python3 -u /opt/ncs/ncs-5.5.2.12/src/ncs/pyapi/ncs_pyvm/startup.py -l info -f /log/ncs-python-vm -i apply-to-devices
&amp;lt;INFO&amp;gt; 7-Jul-2022::14:17:39.794 c647657c6c41 ncs[100]: apply-template-interfaces :: Starting python3 -u /opt/ncs/ncs-5.5.2.12/src/ncs/pyapi/ncs_pyvm/startup.py -l info -f /log/ncs-python-vm -i apply-template-interfaces
...
&amp;lt;INFO&amp;gt; 7-Jul-2022::14:19:33.355 c647657c6c41 ncs[100]: apply-template-interfaces :: PYTHONPATH is now ['/opt/ncs/ncs-5.5.2.12/src/ncs/pyapi/ncs_pyvm', '/opt/ncs/ncs-5.5.2.12/src/ncs/pyapi', '/nso/run/state/packages-in-use/1/apply-template-interfaces/python', '/usr/lib/python37.zip', '/usr/lib/python3.7', '/usr/lib/python3.7/lib-dynload', '/usr/local/lib/python3.7/dist-packages', '/usr/lib/python3/dist-packages', '/opt/ncs/nso-build/lib/pylib']
...
&amp;lt;INFO&amp;gt; 7-Jul-2022::14:19:33.365 c647657c6c41 ncs[100]: apply-to-devices :: PYTHONPATH is now ['/opt/ncs/ncs-5.5.2.12/src/ncs/pyapi/ncs_pyvm', '/opt/ncs/ncs-5.5.2.12/src/ncs/pyapi', '/nso/run/state/packages-in-use/1/apply-to-devices/python', '/usr/lib/python37.zip', '/usr/lib/python3.7', '/usr/lib/python3.7/lib-dynload', '/usr/local/lib/python3.7/dist-packages', '/usr/lib/python3/dist-packages', '/opt/ncs/nso-build/lib/pylib']
...
&amp;lt;INFO&amp;gt; 7-Jul-2022::14:20:06.021 c647657c6c41 ncs[100]: Got EXIT on Port= #Port&amp;lt;0.101&amp;gt;
&amp;lt;INFO&amp;gt; 7-Jul-2022::14:20:06.040 c647657c6c41 ncs[100]: Got EXIT on Port= #Port&amp;lt;0.99&amp;gt;
&amp;lt;INFO&amp;gt; 7-Jul-2022::14:20:06.056 c647657c6c41 ncs[100]: Got EXIT on Port= #Port&amp;lt;0.98&amp;gt;
&amp;lt;INFO&amp;gt; 7-Jul-2022::14:20:06.074 c647657c6c41 ncs[100]: Got EXIT on Port= #Port&amp;lt;0.97&amp;gt;
&amp;lt;INFO&amp;gt; 7-Jul-2022::14:20:06.088 c647657c6c41 ncs[100]: Got EXIT on Port= #Port&amp;lt;0.94&amp;gt;
&amp;lt;INFO&amp;gt; 7-Jul-2022::14:20:06.107 c647657c6c41 ncs[100]: Got EXIT on Port= #Port&amp;lt;0.91&amp;gt;
&amp;lt;INFO&amp;gt; 7-Jul-2022::14:20:06.124 c647657c6c41 ncs[100]: Got EXIT on Port= #Port&amp;lt;0.89&amp;gt;
&amp;lt;INFO&amp;gt; 7-Jul-2022::14:20:06.146 c647657c6c41 ncs[100]: Got EXIT on Port= #Port&amp;lt;0.87&amp;gt;
&amp;lt;INFO&amp;gt; 7-Jul-2022::14:20:06.164 c647657c6c41 ncs[100]: Got EXIT on Port= #Port&amp;lt;0.86&amp;gt;
&amp;lt;INFO&amp;gt; 7-Jul-2022::14:20:06.181 c647657c6c41 ncs[100]: Got EXIT on Port= #Port&amp;lt;0.85&amp;gt;
&amp;lt;INFO&amp;gt; 7-Jul-2022::14:20:06.198 c647657c6c41 ncs[100]: Got EXIT on Port= #Port&amp;lt;0.83&amp;gt;
&amp;lt;INFO&amp;gt; 7-Jul-2022::14:20:06.216 c647657c6c41 ncs[100]: Got EXIT on Port= #Port&amp;lt;0.81&amp;gt;
&amp;lt;INFO&amp;gt; 7-Jul-2022::14:20:06.233 c647657c6c41 ncs[100]: Got EXIT on Port= #Port&amp;lt;0.79&amp;gt;
&amp;lt;INFO&amp;gt; 7-Jul-2022::14:20:06.251 c647657c6c41 ncs[100]: Got EXIT on Port= #Port&amp;lt;0.78&amp;gt;
&amp;lt;INFO&amp;gt; 7-Jul-2022::14:20:06.273 c647657c6c41 ncs[100]: Got EXIT on Port= #Port&amp;lt;0.77&amp;gt;
&amp;lt;INFO&amp;gt; 7-Jul-2022::14:20:06.290 c647657c6c41 ncs[100]: Got EXIT on Port= #Port&amp;lt;0.75&amp;gt;
&amp;lt;INFO&amp;gt; 7-Jul-2022::14:20:06.308 c647657c6c41 ncs[100]: Got EXIT on Port= #Port&amp;lt;0.74&amp;gt;
&amp;lt;INFO&amp;gt; 7-Jul-2022::14:20:06.325 c647657c6c41 ncs[100]: Got EXIT on Port= #Port&amp;lt;0.73&amp;gt;
&amp;lt;INFO&amp;gt; 7-Jul-2022::14:20:06.343 c647657c6c41 ncs[100]: Got EXIT on Port= #Port&amp;lt;0.72&amp;gt;
&amp;lt;INFO&amp;gt; 7-Jul-2022::14:20:06.360 c647657c6c41 ncs[100]: Got EXIT on Port= #Port&amp;lt;0.71&amp;gt;
&amp;lt;INFO&amp;gt; 7-Jul-2022::14:20:06.383 c647657c6c41 ncs[100]: Got EXIT on Port= #Port&amp;lt;0.66&amp;gt;
&amp;lt;INFO&amp;gt; 7-Jul-2022::14:20:06.400 c647657c6c41 ncs[100]: Got EXIT on Port= #Port&amp;lt;0.62&amp;gt;
&amp;lt;INFO&amp;gt; 7-Jul-2022::14:20:06.418 c647657c6c41 ncs[100]: Got EXIT on Port= #Port&amp;lt;0.61&amp;gt;
&amp;lt;INFO&amp;gt; 7-Jul-2022::14:20:06.435 c647657c6c41 ncs[100]: Got EXIT on Port= #Port&amp;lt;0.60&amp;gt;
root@c647657c6c41:/#&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;From digging around, it looks like it's failing around the python VM start for the python action itself.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It's clear that qemu is running python, which qemu running java is fine but python is having issues. I'm not certain if it's python itself, which other members on my team not using NSO are using the same containers with python in them without issue. I also run python, so I think it's specific to some library or file being used in NCS.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;root@c647657c6c41:/opt/ncs/ncs-5.5.2.12/src/ncs/pyapi# ps aux | grep java&lt;BR /&gt;root 977 2.2 10.6 13014104 3501964 ? Ssl 15:24 7:16 /usr/bin/qemu-x86_64 /usr/bin/java java -XX:+UseG1GC -XX:+UseStringDeduplication -classpath :/opt/ncs/ncs-5.5.2.12/java/jar/* -Dhost=127.0.0.1 -Dport=4569 -Djvm.restart.enabled=false -Djvm.restart.errCount=3 -Djvm.restart.duration=60 -Djava.security.egd=file:/dev/./urandom -Dfile.encoding=UTF-8 -Dorg.apache.logging.log4j.simplelog.StatusLogger.level=OFF com.tailf.ncs.NcsJVMLauncher&lt;BR /&gt;root 5571 0.0 0.0 147308 7720 pts/1 Sl+ 20:43 0:00 /usr/bin/qemu-x86_64 /bin/grep grep java&lt;BR /&gt;&lt;A href="mailto:root@c647657c6c41:/opt/ncs/ncs-5.5.2.12/src/ncs/pyapi" target="_blank"&gt;root@c647657c6c41:/opt/ncs/ncs-5.5.2.12/src/ncs/pyapi#&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;root@c647657c6c41:/opt/ncs/ncs-5.5.2.12/src/ncs/pyapi# python3
Python 3.7.3 (default, Jan 22 2021, 20:04:44)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
&amp;gt;&amp;gt;&amp;gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I found the file that starts the python VM for the python action class, and modified it with some comments to trace the logic, but got to here and am now lost. I'm pretty sure that&amp;nbsp;&lt;EM&gt;self.main._run()&lt;/EM&gt; call goes to the main.py file of the action where it goes into the main class of the ncs application&amp;nbsp;&lt;EM&gt;class Main(ncs.application.Application):&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&amp;lt;DEBUG&amp;gt; 16-Feb-2022::16:57:03.33 apply-template-interfaces MainThread: - --- Init NcsPyVM object
&amp;lt;DEBUG&amp;gt; 16-Feb-2022::16:57:03.33 apply-template-interfaces MainThread: - Created class: Main
&amp;lt;DEBUG&amp;gt; 16-Feb-2022::16:57:03.33 apply-template-interfaces MainThread: - Created Thread: apply-template-interfaces.main.Main
&amp;lt;DEBUG&amp;gt; 16-Feb-2022::16:57:03.35 apply-template-interfaces ComponentThread:main: - Starting Main Class: apply-template-interfaces.main.Main
&amp;lt;DEBUG&amp;gt; 16-Feb-2022::16:57:03.35 apply-template-interfaces ComponentThread:main: - ['__class__', '__delattr__', '__dict__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__le__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', '_daemon_name', '_finish', '_logger', '_mk_daemon_name', '_ncs_callback_channel', '_ncs_cname', '_ncs_i', '_ncs_id', '_ncs_pname', '_ncs_user_threads', '_ready', '_run', '_start', '_state_manager', '_state_mgr', '_trans_cb_cls', 'add_running_thread', 'create_daemon', 'critical', 'dd', 'debug', 'del_running_thread', 'error', 'info', 'log', 'reg_finish', 'register_action', 'register_fun', 'register_nano_service', 'register_service', 'register_trans_cb', 'setup', 'teardown', 'unreg_finish', 'wait', 'warning']
&amp;lt;DEBUG&amp;gt; 16-Feb-2022::16:57:03.36 apply-template-interfaces ComponentThread:main: - HERE1


	...
        # Get the 'main class' from module
        self.dbg('Getattr ' + classname + ' from: ' + modname)
        main_cls = getattr(mod, classname)
    ...
    def run(self):
        self.dbg('Starting Main Class: ' + self.main_class)
        try:
            self.dbg(dir(self.main))
            if hasattr(self.main, '_run'):
                self.dbg('HERE1')
                self.main._run()
            else:
                self.dbg('HERE2')
                self.main.run()
            self._component_threads.thread_finished(self.n)&lt;/PRE&gt;&lt;PRE&gt;class Main(ncs.application.Application):
    def setup(self):
        self.log.info('Main RUNNING')
        self.register_action('apply-template-interfaces-action', ApplyTemplateInterfaces)&lt;/PRE&gt;&lt;P&gt;After all of this, I am still lost as to what to do next.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jul 2022 20:47:39 GMT</pubDate>
      <guid>https://community.cisco.com/t5/nso-developer-hub-discussions/python-vm-not-starting-in-nso-docker-container-on-m1-mac/m-p/4646324#M7219</guid>
      <dc:creator>samuel.coome@secunetics.com</dc:creator>
      <dc:date>2022-07-07T20:47:39Z</dc:date>
    </item>
    <item>
      <title>Re: Python VM not starting in NSO Docker container on M1 Mac</title>
      <link>https://community.cisco.com/t5/nso-developer-hub-discussions/python-vm-not-starting-in-nso-docker-container-on-m1-mac/m-p/4655740#M7264</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.cisco.com/t5/user/viewprofilepage/user-id/536962"&gt;samuel.coome@secunetics.com&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This might be a know bug. Best to check the Cisco Bug Search Tool and see if there is a workaround:&amp;nbsp;&lt;A href="https://bst.cloudapps.cisco.com/bugsearch" target="_blank"&gt;https://bst.cloudapps.cisco.com/bugsearch&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 23 Jul 2022 01:07:17 GMT</pubDate>
      <guid>https://community.cisco.com/t5/nso-developer-hub-discussions/python-vm-not-starting-in-nso-docker-container-on-m1-mac/m-p/4655740#M7264</guid>
      <dc:creator>Alexander Stevenson</dc:creator>
      <dc:date>2022-07-23T01:07:17Z</dc:date>
    </item>
    <item>
      <title>Re: Python VM not starting in NSO Docker container on M1 Mac</title>
      <link>https://community.cisco.com/t5/nso-developer-hub-discussions/python-vm-not-starting-in-nso-docker-container-on-m1-mac/m-p/4658399#M7279</link>
      <description>&lt;P&gt;Hello, as far as I can see the problem is coming from C bindings code. I know for sure when it fails, but the reason cannot be tracked on python side cause python calls the C api&lt;A href="https://developer.cisco.com/docs/nso/api/#nso-api-5-6-nso-python-api-_ncs-maapi/_ncs.maapi.load_schemas" target="_blank"&gt;(https://developer.cisco.com/docs/nso/api/#nso-api-5-6-nso-python-api-_ncs/_ncs.mmap_schemas&lt;/A&gt;). Basically it fails under heavy packages reload, because if you try to redeploy one package you'll see that the VM starts fine. But when you try to do a packages reload the maapi call to NSO seems to get stuck.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;It fails when load_schemas&lt;/P&gt;
&lt;PRE&gt;_tm.maapi.&lt;SPAN&gt;load_schemas&lt;/SPAN&gt;(&lt;SPAN&gt;self&lt;/SPAN&gt;.msock)&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;is called inside&amp;nbsp;/ncs/maapi.py:&lt;/P&gt;
&lt;PRE&gt;&lt;SPAN&gt;# convenience&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;def &lt;/SPAN&gt;&lt;SPAN&gt;load_schemas&lt;/SPAN&gt;(&lt;SPAN&gt;self&lt;/SPAN&gt;, &lt;SPAN&gt;use_maapi_socket&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;False&lt;/SPAN&gt;)&lt;SPAN&gt;:&lt;BR /&gt;&lt;/SPAN&gt;    &lt;SPAN&gt;"""Load the schemas to Python (using shared memory if enabled).&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;    If 'use_maapi_socket' is set to True, the schmeas are loaded through&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;    the NSO daemon via a MAAPI socket.&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;    """&lt;BR /&gt;&lt;/SPAN&gt;    &lt;SPAN&gt;if &lt;/SPAN&gt;Maapi._schemas_loaded&lt;SPAN&gt;:&lt;BR /&gt;&lt;/SPAN&gt;        &lt;SPAN&gt;return&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;    with &lt;/SPAN&gt;Maapi._schemas_loaded_lock&lt;SPAN&gt;:&lt;BR /&gt;&lt;/SPAN&gt;        &lt;SPAN&gt;if not &lt;/SPAN&gt;Maapi._schemas_loaded&lt;SPAN&gt;:&lt;BR /&gt;&lt;/SPAN&gt;            &lt;SPAN&gt;if &lt;/SPAN&gt;&lt;SPAN&gt;use_maapi_socket&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;BR /&gt;&lt;/SPAN&gt;                _tm.maapi.&lt;SPAN&gt;load_schemas&lt;/SPAN&gt;(&lt;SPAN&gt;self&lt;/SPAN&gt;.msock)&lt;BR /&gt;                Maapi._schemas_loaded &lt;SPAN&gt;= &lt;/SPAN&gt;&lt;SPAN&gt;True&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;            else&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;BR /&gt;&lt;/SPAN&gt;                &lt;SPAN&gt;try&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;BR /&gt;&lt;/SPAN&gt;                    path &lt;SPAN&gt;= &lt;/SPAN&gt;_tm.maapi.&lt;SPAN&gt;get_schema_file_path&lt;/SPAN&gt;(&lt;SPAN&gt;self&lt;/SPAN&gt;.msock)&lt;BR /&gt;                    _tm.&lt;SPAN&gt;mmap_schemas&lt;/SPAN&gt;(path)&lt;BR /&gt;                    Maapi._schemas_loaded &lt;SPAN&gt;= &lt;/SPAN&gt;&lt;SPAN&gt;True&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;                except &lt;/SPAN&gt;_tm.error.Error&lt;SPAN&gt;:&lt;BR /&gt;&lt;/SPAN&gt;                    &lt;SPAN&gt;# Shared memory not enabled?&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;                    # Fallback to schema load over socket!&lt;BR /&gt;&lt;/SPAN&gt;                    _tm.maapi.&lt;SPAN&gt;load_schemas&lt;/SPAN&gt;(&lt;SPAN&gt;self&lt;/SPAN&gt;.msock)       &amp;lt;--------------------- HERE !&lt;BR /&gt;                    Maapi._schemas_loaded &lt;SPAN&gt;= &lt;/SPAN&gt;&lt;SPAN&gt;True&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN&gt;I saw that&amp;nbsp;use_maapi_socket = False so it jumps intro the else, which catches an error and falls back to the except statement:&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;SPAN&gt;&amp;lt;INFO&amp;gt; 27-Jul-2022::09:05:09.918 ncs.maapi ComponentThread:main: - Traceback (most recent call last):&lt;BR /&gt;File "/opt/ncs/ncs-5.7.2.1/src/ncs/pyapi/ncs/maapi.py", line 448, in load_schemas&lt;BR /&gt;_tm.mmap_schemas(path)&lt;BR /&gt;_ncs.error.Error: system call failed (24): Failed to mmap 95993856 bytes at 0x4010277000: mmap() returned 0xffff73eb4000&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN&gt;After `&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;_tm.maapi.&lt;SPAN&gt;load_schemas&lt;/SPAN&gt;(&lt;SPAN&gt;self&lt;/SPAN&gt;.msock)&amp;nbsp;&lt;/PRE&gt;
&lt;P&gt;all the VM processes start to die. On ncs.log we can see that a timeout is reached so all VMs are being terminated.&lt;/P&gt;
&lt;PRE class="p1"&gt;&lt;SPAN class="s1"&gt;&amp;lt;ERR&amp;gt; 27-Jul-2022::09:05:34.464 nso_docker_1 ncs[3744]: - The NCS Python VM acl, acl-reconcile, clear-counters, ebgp, ebgp-reconcile, eth-cfm-edd, eth-cfm-edd-reconcile, eth-cfm-pe, eth-cfm-pe-reconcile, eth-monitor, eth-monitor-reconcile, ic, ic-reconcile, ipsla, ipsla-reconcile, keychain, keychain-reconcile, l2access, l2access-reconcile, l2sic, l2sic-reconcile, l3multicast, l3multicast-reconcile, l3sic, l3sic-reconcile, massive-configs, prefix-set, prefix-set-reconcile, pt-common, pt-reconcile-common, rip, rip-reconcile, route-policy, route-policy-reconcile, sr, sr-reconcile, vlan, vlan-reconcile, vll, vll-reconcile, vpls, vpls-reconcile, vrf, vrf-reconcile startup timeout reached, terminating&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;P&gt;I wasn't able to determine which timeout is being triggered or where the processes are being killed. Again, this makes me think that it's from C code that this is happening.&lt;/P&gt;
&lt;P&gt;Even if I increase the packages reload timeout the problem persists:&lt;/P&gt;
&lt;PRE class="p1"&gt;&lt;SPAN class="s1"&gt;admin@ncs# &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;packages reload max-wait-time 5000&lt;/STRONG&gt; &lt;/FONT&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN class="s1"&gt;reload-result {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="s1"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;package acl&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="s1"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;result false&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="s1"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;info Python VM failed to start&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="s1"&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="s1"&gt;reload-result {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="s1"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;package acl-reconcile&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="s1"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;result false&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="s1"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;info Python VM failed to start&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="s1"&gt;}&lt;BR /&gt;&lt;/SPAN&gt;......&lt;/PRE&gt;
&lt;P&gt;So honestly this has to be investigated by BU cause we end up on a roadblock when it starts calling C API.&lt;/P&gt;
&lt;P&gt;Definitely the parent process and their childs are being killed abruptly, probably wit a SIGKILL cause no exception or message is logged, and if we top on our machine:&lt;/P&gt;
&lt;DIV id="tinyMceEditor_dd8a7d43fe8acacealves_1" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 999px;"&gt;&lt;img src="https://community.cisco.com/t5/image/serverpage/image-id/158235iD33442328C0679A8/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;You can see that the python VMs are being created, and out of nowhere they are being killed.&lt;/P&gt;
&lt;P&gt;And no, that's not the OOM killer cause I run&amp;nbsp;&lt;SPAN class="s1"&gt;dmesg&lt;/SPAN&gt; and it comes clean, so the OS is not killing our processes:&lt;/P&gt;
&lt;PRE class="p1"&gt;&lt;SPAN class="s1"&gt;[admin@nso_docker_1 ncs]$ sudo dmesg -T | egrep -i 'killed'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="s1"&gt;[admin@nso_docker_1 ncs]$&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;P&gt;I run out of options &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jul 2022 16:37:29 GMT</pubDate>
      <guid>https://community.cisco.com/t5/nso-developer-hub-discussions/python-vm-not-starting-in-nso-docker-container-on-m1-mac/m-p/4658399#M7279</guid>
      <dc:creator>cealves</dc:creator>
      <dc:date>2022-07-28T16:37:29Z</dc:date>
    </item>
    <item>
      <title>Re: Python VM not starting in NSO Docker container on M1 Mac</title>
      <link>https://community.cisco.com/t5/nso-developer-hub-discussions/python-vm-not-starting-in-nso-docker-container-on-m1-mac/m-p/4671964#M7338</link>
      <description>&lt;P&gt;NSO on Mac M1 is not supported atm, there is an existing feature request for this ask and is under consideration. Will update the thread if I know more.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Aug 2022 18:53:47 GMT</pubDate>
      <guid>https://community.cisco.com/t5/nso-developer-hub-discussions/python-vm-not-starting-in-nso-docker-container-on-m1-mac/m-p/4671964#M7338</guid>
      <dc:creator>nandhinr</dc:creator>
      <dc:date>2022-08-18T18:53:47Z</dc:date>
    </item>
    <item>
      <title>Re: Python VM not starting in NSO Docker container on M1 Mac</title>
      <link>https://community.cisco.com/t5/nso-developer-hub-discussions/python-vm-not-starting-in-nso-docker-container-on-m1-mac/m-p/4672531#M7340</link>
      <description>&lt;P&gt;Thank you. I look forward to the update.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Aug 2022 14:21:34 GMT</pubDate>
      <guid>https://community.cisco.com/t5/nso-developer-hub-discussions/python-vm-not-starting-in-nso-docker-container-on-m1-mac/m-p/4672531#M7340</guid>
      <dc:creator>samuel.coome@secunetics.com</dc:creator>
      <dc:date>2022-08-19T14:21:34Z</dc:date>
    </item>
    <item>
      <title>Re: Python VM not starting in NSO Docker container on M1 Mac</title>
      <link>https://community.cisco.com/t5/nso-developer-hub-discussions/python-vm-not-starting-in-nso-docker-container-on-m1-mac/m-p/4755641#M7623</link>
      <description>&lt;P&gt;Are there any updates to this issue? It has been months now - so checking for an update.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Jan 2023 21:34:48 GMT</pubDate>
      <guid>https://community.cisco.com/t5/nso-developer-hub-discussions/python-vm-not-starting-in-nso-docker-container-on-m1-mac/m-p/4755641#M7623</guid>
      <dc:creator>lwarrin1964</dc:creator>
      <dc:date>2023-01-16T21:34:48Z</dc:date>
    </item>
    <item>
      <title>Re: Python VM not starting in NSO Docker container on M1 Mac</title>
      <link>https://community.cisco.com/t5/nso-developer-hub-discussions/python-vm-not-starting-in-nso-docker-container-on-m1-mac/m-p/4757053#M7633</link>
      <description>&lt;P&gt;&lt;a href="https://community.cisco.com/t5/user/viewprofilepage/user-id/1449873"&gt;@lwarrin1964&lt;/a&gt;&amp;nbsp;this feature is supposed to be fixed in NSO 6.1 (tentative release date: April)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Jan 2023 21:49:46 GMT</pubDate>
      <guid>https://community.cisco.com/t5/nso-developer-hub-discussions/python-vm-not-starting-in-nso-docker-container-on-m1-mac/m-p/4757053#M7633</guid>
      <dc:creator>nandhinr</dc:creator>
      <dc:date>2023-01-18T21:49:46Z</dc:date>
    </item>
    <item>
      <title>Re: Python VM not starting in NSO Docker container on M1 Mac</title>
      <link>https://community.cisco.com/t5/nso-developer-hub-discussions/python-vm-not-starting-in-nso-docker-container-on-m1-mac/m-p/5202492#M8694</link>
      <description>&lt;P&gt;It looks like 6.1.1 supports for standard (non-docker) install works on Mac M1 now -&amp;nbsp;&lt;A href="https://community.cisco.com/t5/nso-developer-hub-discussions/python-vm-not-starting-from-darwin-ncs-install-on-m1-macbook/m-p/4715396#M7497" target="_blank"&gt;Solved: Re: Python VM not starting from Darwin NCS install on M1 Macbook - Cisco Community&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I haven't tried container yet.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Oct 2024 16:42:19 GMT</pubDate>
      <guid>https://community.cisco.com/t5/nso-developer-hub-discussions/python-vm-not-starting-in-nso-docker-container-on-m1-mac/m-p/5202492#M8694</guid>
      <dc:creator>samuel.coome@secunetics.com</dc:creator>
      <dc:date>2024-10-02T16:42:19Z</dc:date>
    </item>
    <item>
      <title>Re: Python VM not starting in NSO Docker container on M1 Mac</title>
      <link>https://community.cisco.com/t5/nso-developer-hub-discussions/python-vm-not-starting-in-nso-docker-container-on-m1-mac/m-p/5202809#M8695</link>
      <description>&lt;P&gt;If you are running Docker containers on Apple silicone arm64, I suggest you use the Linux arm64 NSO variant, e.g., nso-6.3.3.linux.arm64.installer.bin&lt;/P&gt;</description>
      <pubDate>Thu, 03 Oct 2024 08:12:02 GMT</pubDate>
      <guid>https://community.cisco.com/t5/nso-developer-hub-discussions/python-vm-not-starting-in-nso-docker-container-on-m1-mac/m-p/5202809#M8695</guid>
      <dc:creator>cohult</dc:creator>
      <dc:date>2024-10-03T08:12:02Z</dc:date>
    </item>
  </channel>
</rss>

