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

That explains it. You don’t need to install debian 9 in a KVM using snap and check for differences, if you did you’d find that snap lxc packages a more recent liblxc library with it allowing for lxd to work fully including lxc config set … nofile without this kind of hassle.
Works for me with ubuntu 16.04 hosts (16.04 packages liblxc 2.0 in system (deb) libraries).
Without snap you have to compile liblxc and support security updates yourself. That’s life for people wanting to compile system tools :slight_smile: