The Azure Resources like VMs are always associated with a subscription. So basically you need to move your VMs from one subscription in Tenant A to a subscription in Tenant B.
Now If you want to migrate one VM, in Tenant A, you can use Azure Storage Explorer (https://azure.microsoft.com/en-us/products/storage/storage-explorer/#overview) and Copy the Disk for the VM from Tenant A and paste it to Tenant B. You need to repeat this for each disk associated with your VM. Once the new disks are created you can create a new VM in Tenant B by attaching the disks that you already pasted in Tenant B.
Refer: https://www.remotelyrmm.com/blog/how-to-migrate-an-azure-virtual-machine-from-one-tenant-to-another
If you have one or two VMs, you can follow the above method.
But in case you have many resources follow the below steps.
- Create subscription in Tenant A (This subscription is for migration purpose) and move all your resources that needs to be moved to this subscription. Refer: https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/move-resource-group-and-subscription
- Once you moved all your resources to a subscription in Tenant A, then move that subscription to Tenant B. Refer: https://learn.microsoft.com/en-us/azure/role-based-access-control/transfer-subscription
Hope this helps