Pupils have been donning VR headsets as police turn to technology to raise awareness of the consequences of carrying knives.