Note that after you have all of this setup, you need to make sure ROS (and Ubuntu) in the VM are properly configured for a multi-machine setup. See wiki/ROS/NetworkSetup for a start with that, or one of the myriad of questions here on ROS Answers about setting up Matlab for use with ROS (use Google: matlab ros_ip ros_hostname site:answers.ros.org).