A Gurobi license file configured on a Virtual Machine in GCP will remain valid if the instance is stopped and restarted. However, a Gurobi license file may become invalid after the Virtual Machine is terminated unless some additional configuration steps are taken.
Gurobi license files are tied to specific hardware and software components of the host machine. These components normally change when the Virtual Machines are terminated and relaunched.
For Linux instances
On a Linux GCP VM, the Gurobi license is associated with the VM's internal IP address.
Assigning a license file to the internal IP
To assign a Gurobi license file to an internal IP, perform the following steps:
- Navigate to VPC Networks > IP addresses
-
Reserve an Internal Static IP Address
Required fields:
- Name
- IP Version - IPv4
- Network - Default or your dedicated network
- Purpose - Non-shared
- When starting up a new VM, choose the newly created static IP address.
-
Log in to your account on the Gurobi website and navigate to Downloads & Licenses->Your Gurobi Licenses. Click the appropriate license ID, then follow the instructions to download the license file onto the Virtual Machine using
grbgetkey.If the VM does not have internet access for grbgetkey, you can install the license manually.
For Windows instances
On Windows, a Gurobi license file depends on the primary volume. On Windows, use a persistent disk as your boot disk to keep the license file valid.
- Use this Persistent Disk as your boot disk for the Windows VM instance
- When recreating instances, reattach the same Persistent Disk rather than creating a new one