@Michelle Elsaid I'm house hacking a rental property in L.A. that was fully occupied when it was on the market. Since my intention was to live in one of the units and rent out the others, having a unit vacant by close of escrow was one of the "must-haves" on my list.
Although sellers hate it when you do this, I drove to properties that I was interested in, knocked on the door and spoke to the tenants, saying that I was interested in purchasing the property, and asked if they'd be interested in "cash for keys." Oftentimes the tenants weren't able to make a decision on the spot, so I got their number and followed up later. If they appeared uninterested, I moved on.
Once I found the property that fit all my criteria, I asked my friend to write up a contract saying that I would pay the tenants $X dollars if they moved out by a certain date, and further stipulated that the contract is void if I do not close on the house. We did it this way because I did not want to close on the house if a vacant unit was not guaranteed. Furthermore, my understanding is that you cannot enter into contracts on properties that you don't actually own. Anyway, things may have gone wrong using this method ... I'm not sure ... but it worked out well for me. I'm not in any way a knowledgeable about legal matters, and this is just my personal experience, so please talk to an attorney.