Hey Sriram,
To be able to help you troubleshooting this issue, I'd need some more information:
- What is the output of the netstat -plnt command if run it inside the Ubuntu VM?
- What error messages are you getting when trying to connect to MQTT broker from your client (Raspberry Pi)?
- What steps did you take to install and configure your Mosquito service on Ubuntu VM?
Sincerely,