In a VXLAN packet, the destination MAC address in the outer MAC header is used to identify the next-hop IP address based on the destination VTEP address in the routing table of the VTEP where the VM that sends packets resides. This ensures that the encapsulated packet is correctly forwarded towards the remote VTEP.