That is the correct way to update. However, it is strongly encouraged to create a backup of the host and all VMs before updating in case something goes wrong. There should be minimal interference with your VMs, however, don’t quote me on that. Just a heads up, Proxmox 5.x will reach its end of life on 7/2020. So I would recommend looking at upgrading to version 6 soon. Hope that helps!