There is no difference from restoring the database to a physical server. For instance:
RESTORE DATABASE db FROM DISK = '\\server\share\DB.bak'
WITH MOVE 'db_data' TO 'D:\MSSQL\Data\Db.mdf',
MOVE 'db_log' TO 'D:\MSSQL\Log\DB.ldf'
One way or another the backup must be readable from the VM (again, no different from a physical server). Either you copy the backup to the VM, or you put it on a file share.