Manually Resetting the Identity of a Porta On Prem VM
Each Porta VM is a copy made from the same image, so any virtual machines created from this image will all have the same identity. This will cause problems when it requests an IP address from the network.
We want to be able to uniquely identify this virtual machine, so we need to reset its identity and then reboot the machine.
- Open Windows Powershell or Terminal.
- Connect to the VM using SSH (replace the command below with your own values):
portavmis the username you will be connecting asVM-IPis the VM’s IPv4 address on the network
Terminal window ssh portavm@<VM-IP># Example: ssh portavm@192.168.50.9 - Run the following command to reset the VM’s identity:
Terminal window ./scripts/reset_identity.sh - You will be prompted to enter a new hostname for the VM.
- To use the default suggested hostname, simply hit
Enter.- The suggestion is usually the current hostname appended with a random number, e.g.,
Porta-VM-1234.
- The suggestion is usually the current hostname appended with a random number, e.g.,
- To use a custom hostname, type it in and hit
Enter.- You can simply use with its Windows hostname appended with
-VM(e.g.PXLAB-VM), as long as this is a unique name.
- You can simply use with its Windows hostname appended with
- The hosts file of the virtual machine will be automatically updated with this new hostname.
- To use the default suggested hostname, simply hit
- The terminal will then output various information as it resets the identity.
- When prompted to reboot, type
yand hitEnterto reboot the VM. - While the machine is rebooting, your current connection will be disconnected, which is normal.
- Once the reboot is finished, your VM will be using its new hostname and machine identity!
- You can verify its new hostname by reconnecting using SSH again, replacing the command below with your own values.
-
portavmis the username you will be connecting asVM-IPis the VM’s IPv4 address on the network
Terminal window ssh portavm@<VM-IP> - The terminal prompt on successful connection should now show the new hostname, for example:
Terminal window portavm@Porta-VM-1234:~$
- You can verify its new hostname by reconnecting using SSH again, replacing the command below with your own values.
-