Enabling access to virtual machines
If you plan to run the pre-snapshot and post-snapshot scripts, or to restore individual files, you must enable HYCU for Azure to access these virtual machines by assigning credentials to them.
Prerequisites
-
For Windows virtual machines:
- A user account with the admin privileges must be configured on the virtual machine.
- WinRM must be enabled and configured on the virtual machine.
- A firewall must be configured to allow inbound network traffic through the required TCP port for WinRM.
-
For Linux virtual machines:
- A user account with the
sudo
privileges must be configured on the virtual machine. - Only if using password authentication. The
sudoers
file must be configured to allow a user that has permissions to access the virtual machine to runsudo
commands without being asked for the password (theNOPASSWD
tag must be added to thesudoers
file). - A firewall must be configured to allow inbound network traffic through the required TCP port for SSH.
- For Ubuntu 22.04 virtual machines that have RSA key-based authentication configured: You must add the
PubkeyAcceptedKeyTypes=+ssh-rsa
parameter to the/etc/ssh/sshd_config
file, and then restart the SSH service by running thesystemctl restart ssh.service
command.
- A user account with the
Limitation
If you use the SSH protocol with private key authentication, only the RSA key type is supported.
Consideration
If a virtual machine is deleted from Azure, but still has at least one valid restore point available, keep in mind that you can unassign credentials from such a virtual machine, but cannot assign them.
To access the Virtual Machines panel, in the navigation pane, click Virtual Machines.
Procedure
-
In the Virtual Machines panel, select the virtual machine to which you want to assign a credential group.
-
Click Credentials.
-
Click New.
- Enter a name for the credential group.
-
From the Protocol drop-down menu, select one of the following protocol options:
Protocol option Instructions Automatic Select this option if you want HYCU for Azure to automatically select a protocol for accessing the virtual machine: the SSH protocol (TCP port 22) or the WinRM protocol (TCP port 5985, HTTP transport), and then enter the user name and password of a user account that has required permissions to access the virtual machine.
n Note For Linux virtual machines: Password authentication is used by default. If you want to use public key authentication, select the SSH protocol option and make the required modifications.
SSH Select this option if you want to use the SSH protocol, and then make the following:
-
In the Port field, enter the SSH server port number.
-
From the Authentication drop-down menu, select the type of authentication you want to be used, and then provide the required information:
Password authentication Enter the user name and password of a user account that has required permissions to access the virtual machine. Public key authentication Enter the user name of a user account that has required permissions to access the virtual machine. Private key authentication Do the following:
- Enter the user name of a user account that has required permissions to access the virtual machine.
- Choose a private key.
-
Only if the private key is encrypted. Enter the private key passphrase.
WinRM Select this option if you want to use the WinRM protocol, and then do the following:
- In the Port field, enter the WinRM server port number.
- From the Transport drop-down menu, select one of the following transport protocol options:
- HTTPS
HTTP
- Enter the user name and password of a user account that has required permissions to access the virtual machine.
-
- Click Save.
-
Only if using the public key authentication type. Download a public SSH key in HYCU for Azure and reset it in Azure. To do so, follow these steps:
- In HYCU for Azure, select the required credential group, click Download Key, and then copy the public SSH key.
- In Azure, reset the public SSH key for the selected virtual machine and, as a new public SSH key, specify the one you copied from HYCU for Azure. For details on how to do this, see Azure documentation.
-
Click Assign.
The name of the assigned credential group appears in the Credential group column of the Virtual Machines panel. HYCU for Azure performs virtual machine discovery after you assign the credentials to the virtual machines and the Discovery status in the Virtual Machines panel is updated accordingly.
t Tip If several virtual machines share the same user name and password, you can use multiple selection to assign the same credential group to them.
To unassign a credential group from a virtual machine, in the Virtual Machines panel, select the virtual machine, click Credentials, and then click Unassign.
You can also edit any of the existing credential groups (select a credential group, click Edit, and then make the required modifications) or delete the ones that you do not need anymore (select a credential group, and then click Delete).