Porta On Prem VM Setup Guide
The setup_vm.ps1 powershell script will guide you through the set-up of a new VM automatically. Periodic interaction will be required, but overall this script will:
- Detect and disable Hyper-V if it is enabled.
- Import a new Porta VM image or use an existing VM.
- Configure the VM’s network settings.
- Enable the OpenSSH Windows feature.
- Generate an SSH key and set up SSH access to the VM.
- Optionally add rules to Windows firewall.
- Optionally reset the VM’s identity.
- Configure a static IP address for the VM.
Prerequisites
Section titled “Prerequisites”Before beginning the setup process, ensure your physical machine meets the prerequisite criteria:
- A copy of the latest Porta On Prem Virtual Machine release as a zip file.
- This zip contains the
setup_vm.ps1script and the.ovaVM image file. - The image is an
.ovafile, which is a virtual machine image that can be imported into VirtualBox. - The image is a pre-configured Ubuntu image with Docker and Porta Manager already installed.
- This zip contains the
- VirtualBox 7.1.8 installed.
- Latest copy of the Porta On Prem application as a zip file.
- Minimum of 3 physical machines if running database replication.
| Component | Specification |
|---|---|
| Windows 11 64-bit | |
| VirtualBox 7.1.8 | |
| Intel i7 4th Generation (required: CPU with AVX2 support) | |
| 8GB RAM | |
| 100+GB free disk space |
-
Beginning the Setup
Section titled “Beginning the Setup”- Extract the latest Porta On Prem VM zip file on the Windows machine for which it will be installed.
- Right-click on Windows Powershell or Windows Terminal and choose “Run as administrator”.
- In the window that opens, run the following command:
Example:Powershell -ExecutionPolicy ByPass -NoExit -File "\Path\to\setup_vm.ps1"Powershell -ExecutionPolicy ByPass -NoExit -File "C:\Users\user.name\Desktop\setup_vm.ps1"
-
Running the Script
Section titled “Running the Script”- The script will begin running and prompt for the Porta VM password.
- Enter the Porta VM password provided to you by Disguise and press
Enter.
-
Hyper-V Check
Section titled “Hyper-V Check”In order to set up and run Porta VM, Hyper-V must not be enabled. The status of Hyper-V will be automatically checked.
- If Hyper-V is already disabled, the script will proceed automatically.
- If Hyper-V is enabled, you’ll need to disable it by typing
yand hittingEnter.- If you choose to disable it now, you’ll need to reboot your computer.
- To reboot now, enter
yand pressEnter
- To reboot now, enter
- After rebooting, run the
setup_vm.ps1script again and begin from Step 1.
- If you choose to disable it now, you’ll need to reboot your computer.
-
VirtualBox Check
Section titled “VirtualBox Check”The script will check if VirtualBox is installed:
- If VirtualBox is already installed, the script will proceed automatically and you may proceed to the next step.
- If VirtualBox is not installed, you will be prompted to install it.
- If you choose to install it, enter
yand pressEnter. - The script will download and install VirtualBox automatically.
- After installation, you may need to reboot your computer
- To reboot now, enter
yand pressEnter
- To reboot now, enter
- After rebooting, run the
setup_vm.ps1script again
- If you choose to install it, enter
-
VM Selection
Section titled “VM Selection”You’ll be presented with options to import a new VM, or use an existing one.
- Type
1and hitEnterto choose to import a new VM. - In the file explorer window that opens, navigate to the folder where you extracted the VM zip and select the
.ovafile. - Click
Opento import this file. - The image will begin importing. Wait for it to finish, this may take several minutes.
- There will be a lot of output in the terminal, but you can ignore it.
- Once the import is complete, the script will print “Successfully imported the appliance.” and proceed automatically to the next step.
- Type
-
VM Network Configuration
Section titled “VM Network Configuration”-
Select the network adapter you want the VM to use by entering the number corresponding to the listed adapter and pressing
Enter.- If you’re unsure which adapter to choose, select the one that reads as
(Status: Up ...) - If your machine contains a more complex networking setup, you may need to try different adapters until you find one that works, or ask your network administrator for help.
- If you’re unsure which adapter to choose, select the one that reads as
-
The virtual machine will now power on and begin booting.
- This will open another terminal window that may briefly display a lot of output.
- While waiting for hte VM to boot, your Powershell window will display “Waiting for VM to start…” periodically until the VM is fully booted.
-
In the Powershell window, you will see the detected IP address of the VM, which will be used to access Porta later.
- For example:
VM is running with IP: 10.221.113.136
- For example:
-
You will be warned that the
authenticity of the host can't be establishedand asked if you want to continue connecting. -
Type
yesand pressEnter(the “yes” will not appear in the terminal, but it is still being entered) -
The terminal will display “SSH connection established successfully”.
-
Setting up firewall rules is optional, and you can decline to set them up by typing
nand pressingEnter.
-
-
Resetting Identity
Section titled “Resetting Identity”- If you are running multiple virtual machines, enter
yand pressEnter. - Enter a new hostname or simply press
Enterto use the default suggested hostname. - You will be prompted for the password again a couple of times, then the VM will reboot.
- After about 30 seconds, the VM will be back online.
- It’s not uncommon to encounter a timeout error when the VM is rebooting, see the Timed out waiting for VM to come online section if this happens. 4.The script will then get a new IP address for the VM and print it to the terminal.
- You may be prompted for password several more times.
- If you are running multiple virtual machines, enter
-
Setting Static IP Address
Section titled “Setting Static IP Address”The script will automatically proceed to set up a static IP for the VM.
- The script will perform a network scan to find available IP addresses on your network.
- Select an IP address for the virtual machine by typing the number corresponding to one of the listed available IPs and pressing
Enter.- If you choose to enter a custom IP address:
- Enter the full IP address (e.g.,
192.168.1.100) - If the IP appears to be in use, you’ll be asked to confirm by typing
yand pressingEnter
- Enter the full IP address (e.g.,
- If you choose to enter a custom IP address:
- Next, select the machine role (also known as its type) by entering the number corresponding to one of the following options and pressing
Enter:- main
- backup
- arbiter
- The script will then proceed to configure the VM with the selected static IP address and machine role.
- You will see a lot of output in the terminal, including password prompts, but you can ignore it.
- When IP configuration is complete, the script will print “Static IP setup completed successfully! VM is now accessible at IP:” and list the new static IP address.
-
Completed
Section titled “Completed”Once the setup has finished, your VM is ready to use!
- Access the Porta Manager (installer wizard) in the browser at the VM’s IP address and port
88:http://VM-IP:88. - Porta Manager’s login credentials are:
- Email address:
superadmin@disguise.one - Password: The Porta VM password
- Email address:
- After signing in, you can click the “Begin” button on the dashboard to use the installer wizard to install Porta.
- Make sure you have downloaded the latest Porta On Prem bundle and have it ready to upload when prompted by the installer wizard.
- Access the Porta Manager (installer wizard) in the browser at the VM’s IP address and port
Troubleshooting common issues during VM setup
Section titled “Troubleshooting common issues during VM setup”ACPI Shutdown is taking longer than 3 minutes
Section titled “ACPI Shutdown is taking longer than 3 minutes”Force the machine to stop:
- In the VM’s terminal window, File > Close > Power Off Machine.
Once the VM terminal window has closed, in VirtualBox, start it again by double-clicking the VM in the sidebar, or selecting it and clicking the Start button in the header.
Timed out waiting for VM to come online / VM takes too long at any given step
Section titled “Timed out waiting for VM to come online / VM takes too long at any given step”The error “Timed out waiting for VM to come online” is not uncommon during IP setup or resetting identity. Try the following steps:
- First, we will try to gracefully shut down the machine.
- In the VM’s terminal window, File > Close > ACPI Shutdown
- If this does not begin printing new output to the window, or is taking more than a minute or two to complete, you can force the machine to stop:
- In the VM’s terminal window, File > Close > Power Off Machine.
- Return to your initial Powershell window and enter
Ctrl+Cto stop the VM setup script. - Re-run the
setup_vm.ps1script by hitting theUparrow on your keyboard so that thesetup_vm.ps1command from the beginning of this guide appears, and then hittingEnter. - Continue as before until the
VM Selectionstep. - When prompted to import a new Porta VM or use and existing one, type
2and pressEnter. - You’ll see a list of available VMs with their current status (running or stopped).
- Select the VM you previously imported by typing its listed number and hitting
Enter. - If the VM is not already running, the script will start it.
- Continue with the steps from Network Configuration above.
Failed to establish SSH connection
Section titled “Failed to establish SSH connection”If you encounter this error during the Network Configuration step, AND your IP was listed as 127.0.0.1, see VM IP Address is 127.0.0.1 below.
If you encounter this error during the Resetting Identity step, then after VM setup has completed you will need to manually reset the VM’s identity and manually set up a static IP for the machine. Please see the Manually Resetting Identity and VM Static IP Setup guides for instructions.
If you encounter this error during the Setting Static IP Address step, you will need to manually set up the static IP after VM setup has completed. Please see the VM Static IP Setup guide for instructions.
VM IP address is 127.0.0.1
Section titled “VM IP address is 127.0.0.1”VirtualBox is probably not connected to the correct network adapter, or DHCP is not working. Take these steps to try to resolve the issue:
- Shutdown the VM if it is running.
- Open Powershell in Windows and run
ipconfig /allto list all adapters and their names. - Open VirtualBox and navigate to the VM’s Settings -> Network Settings.
- Ensure the Vm’s “Attached to” is set to “Bridged Adapter” and the selected “Name” matches the name of the adapter you want to use, as listed in the
ipconfigresults. - Start the VM and try again.
”No available IPs found”
Section titled “”No available IPs found””Sometimes the network scan fails to complete or doesn’t find any available IPs. There are a few scenarios in which this can occur, and the solution depends on which.
- If this issue occurs during the Resetting Identity step, you will need to manually reset the identity and/or set up the static IP after VM setup has completed. Please see the Manually Resetting Identity and Manual Static IP Setup guides for instructions.
- If this issue occurs during the Setting Static IP Address step, you’ll need to configure an IP manually after VM setup has completed. Please see the VM Static IP Setup guide for instructions.
VirtualBox error when importing appliance: E_INVALIDARG 0X80070057
Section titled “VirtualBox error when importing appliance: E_INVALIDARG 0X80070057”Likely a disk space issue. Make sure the default location for the VM is on a drive with enough space.
- In VirtualBox, go to File > Preferences > General and change the Default Machine Folder if needed.
VM booting is stuck on “Begin: Loading essential drivers”
Section titled “VM booting is stuck on “Begin: Loading essential drivers””Shut down the VM and go into the VM’s VirtualBox Settings -> Storage. Make sure these are set as expected. Checking the Solid State box for the SATA hard disk resolved the issue when last seen.
rcu: detected stalls on CPUs/tasks or other similar errors in the VM terminal
Section titled “rcu: detected stalls on CPUs/tasks or other similar errors in the VM terminal”This indicates the VM is struggling with resources. Normally restarting the VM will resolve the issues. Gracefully shut down the VM by navigating to the VM’s terminal window and clicking File > Close > ACPI Shutdown.
If this does not begin printing new output to the window, or is taking more than a minute or two to complete, you can force the machine to stop by navigating to the VM’s terminal window, and clicking File > Close > Power Off Machine.
If this error becomes a common occurrence, please make confirm that your physical machine meets the VM requirements, and, if so, contact Disguise support.
systemd-networkd.service: Watchdog timeout message / array-index-out-of-bounds message in the VM terminal
Section titled “systemd-networkd.service: Watchdog timeout message / array-index-out-of-bounds message in the VM terminal”This message can appear during setup, and is usually not a problem. If the setup completes successfully, you can ignore this message.
VM Disk Space Issues
Section titled “VM Disk Space Issues”If you encounter disk space issues on the VM (not Windows itself), check Docker’s filesystem by running this command in the VM’s terminal:
docker system dfHere is an example of what you may see:
TYPE TOTAL ACTIVE SIZE RECLAIMABLEImages 12 4 13.77GB 10.3GB (74%)Containers 4 4 360MB 0B (0%)Local Volumes 7 3 6.55GB 6.334GB (96%)Build Cache 0 0 0B 0BIf the Images “Reclaimable” space is significant, you can free it up by connecting to the VM and running:
docker image prune -afIf you still need more space, please contact Disguise support for assistance.