Thanks for your question. It sounds like routing may not be setup correctly with your vnet. If a VM cannot get out, you might check to see what user defined routes are set on the subnet this VM is attached to. By default, internet will route through Microsoft, but if customized network settings are in effect, this may not happen.
For DNS -- You can run cat /etc/resolv.conf which will show what current DNS nameservers are set on your VM. You can also look in your VM vnic settings to find your Azure DNS settings -- you will want to validate that they are the same and they are correct. You should also check to see if a DNS server exists in the current vnet, or if one is accessible on the network.
You can always reach out to Microsoft support to help with this type of issue. To open a ticket, login to the portal and click the help icon ? in the top right corner. portal.azure.com
If this answer was helpful to you, it might be helpful to others -- please mark it as an accepted answer so that others may learn from your experience if they have similar issues.