Not able to set ulimit ( max open files) inside vms

I don’t think you are right on this point. I routinely access my containers using ssh and have no problem with ulimit. Actually sometimes there are problems using ulimit as root in a container:

Anyway the OP says there are problems with using lxc config set, that’s before logging in the container.