Hey @Handian Sudianto !
Unfortunately, Hyper-V doesn't have a built-in feature to natively restrict visibility of a VM to specific users directly. However, you can achieve a similar effect using a combination of user permissions and by managing access at the host level.
Here's what you might consider doing:
- User Permissions: Ensure that only certain users have access to its management and operations. This can involve creating custom roles with limited capabilities in Hyper-V.
- Delegating Control: If you're using Windows Server with Active Directory, you can delegate control over specific VMs to user1 while removing or limiting permissions for other users. This can be done in the Hyper-V Manager by right-clicking the VM, going to "Settings", and looking into delegation settings.
- Using Windows Security: Modify the security settings on the folder where the VM files are stored, ensuring that only user1 has permissions to access those files.
- Scripts: Consider using PowerShell scripts to manage which users can connect remotely to the Hyper-V host. Only allow user1's account by adjusting group memberships.
Relevant Documentation:
- Manage VMs on Azure Local using Windows PowerShell
- Hyper-V Overview
- Role-based Access Control in Hyper-V
Please do not forget to click "Accept Answerā and Yes, this can be beneficial to other community members.
If you have any other questions, let me know in the "comments" and I would be happy to help you.