> ## Documentation Index
> Fetch the complete documentation index at: https://gcore-doc-1046.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a Virtual Machine

Create Linux or Windows Virtual Machines in Gcore Cloud.

<Tip>
  When using [VAST file shares](/cloud/file-shares/configure-file-shares), it is best to create them **prior** to provisioning the corresponding compute resources.
</Tip>

## Step 1. Select a region

1. In the [Gcore Customer Portal](https://portal.gcore.com/accounts/reports/dashboard), open **Instances** tab and click **Create Instance**.

<Frame>
  <img src="https://mintcdn.com/gcore-doc-1046/o7wA0BxBPtk_BB2L/images/docs/cloud/virtual-instances/create-an-instance/1-create-instancebutton.png?fit=max&auto=format&n=o7wA0BxBPtk_BB2L&q=85&s=2c7034d1d2a5010cebebe5f98b055ff2" alt="The Create VM button" width="1100" height="584" data-path="images/docs/cloud/virtual-instances/create-an-instance/1-create-instancebutton.png" />
</Frame>

2. Choose the region where you want to deploy your Virtual Machine (VM).

<Frame>
  <img src="https://mintcdn.com/gcore-doc-1046/o7wA0BxBPtk_BB2L/images/docs/cloud/virtual-instances/create-an-instance/2-region-selection.png?fit=max&auto=format&n=o7wA0BxBPtk_BB2L&q=85&s=4b91b91e7ecaf2eec02b33308063f23e" alt="Region selection" width="654" height="414" data-path="images/docs/cloud/virtual-instances/create-an-instance/2-region-selection.png" />
</Frame>

Notice that regions are labeled either Core or Edge. This represents the region's equipment specifications.

|                                          | Core                        | Edge\*                          |
| ---------------------------------------- | --------------------------- | ------------------------------- |
| Equipment generation                     | The latest                  | Different                       |
| Designed for high scalability on the fly | Yes                         | Not                             |
| Available resources                      | 1000 cores and 30 TB of RAM | Up to 300 cores and 1 TB of RAM |
| Ports for user traffic and storage       | Separate                    | Shared                          |
| Price                                    | Higher                      | Lower                           |

* Edge regions can be transformed into Core regions. Just [send us a request](mailto:support@gcore.com).

## Step 2. Configure the image

Select the type of hardware architecture on which your VM will be running:

* **x86-64** : This architecture is known for its broad compatibility with Linux operating systems and Windows distributions. It is commonly used in general purpose computing applications.
* **ARM** : ARM architecture is designed for energy efficiency and low power consumption, which also supports strong performance, making it ideal for high-performance computing tasks. However, ARM Virtual Machines are compatible with fewer OS distributions.

<Frame>
  <img src="https://mintcdn.com/gcore-doc-1046/o7wA0BxBPtk_BB2L/images/docs/cloud/virtual-instances/create-an-instance/configure-image.png?fit=max&auto=format&n=o7wA0BxBPtk_BB2L&q=85&s=44fb7756e08175f5a9151f588d908a3c" alt="Choose x86-64 or ARM architecture" style={{ width:"100%" }} width="2356" height="1272" data-path="images/docs/cloud/virtual-instances/create-an-instance/configure-image.png" />
</Frame>

Your choice of hardware architecture will affect the available OS options and VM flavors. Choose an OS distribution, a volume, a snapshot, a custom image, or a template from the marketplace.

## Step 3. Choose the VM type

Select the appropriate CPU generation:

* **Intel® Xeon® Scalable, 3rd Gen or 2nd Gen** if you've selected x-86-64 architecture at the previous step.
* **ARM Ampere® Altra® Max Family** if you selected ARM architecture in the previous step.

Choose one of the available flavors.

<Frame>
  <img src="https://mintcdn.com/gcore-doc-1046/o7wA0BxBPtk_BB2L/images/docs/cloud/virtual-instances/create-an-instance/vm-type.png?fit=max&auto=format&n=o7wA0BxBPtk_BB2L&q=85&s=6cef481e6bee50ea21efa1b2d2d045de" alt="VM types and flavors" width="2076" height="1404" data-path="images/docs/cloud/virtual-instances/create-an-instance/vm-type.png" />
</Frame>

<Accordion title="Description of flavors">
  * **Shared**. VMs that share the core of a physical machine with other VMs. They are designed for workloads that don't require high performance. Availability: Luxembourg.

  <Info>
    **Info**

    The bandwidth limit for the **Shared** flavor is up to 100 Mbps. For other configurations it's up to 1 Gbps.
  </Info>

  * **Standard**. VMs best suited for a wide range of workloads that require predictable computing performance. Availability: all regions.

  * **vCPU**. CPU-optimized VMs. Ideal for CPU-intensive tasks that require predictable computing performance, such as batch processing of large data sets and video encoding. Availability: all Core regions.

  * **Memory**. Memory-optimized VMs. Suitable for memory-intensive tasks such as databases, SRM/ERP or data warehouses. Availability: all Core regions.

  * **High Frequency**. VMs with a high CPU clock rate (3.7 GHz in the basic configuration). Ideal for applications requiring single-threaded performance, financial and probabilistic analytics, and automation of computational processes. Availability: Luxembourg, Manassas, Frankfurt.

  * **GPU**. VMs with a graphics card. Suitable for working with graphic information, deep and machine learning applications, and high-performance computing. Availability: Luxembourg.

  * **GPU-HF**. VMs with a high clock rate of the CPU and with a graphics card, suitable for complex calculations that require graphics accelerator resources, high performance, and speed. Availability: Luxembourg.

  <Info>
    **Info**

    InfiniBand networks can only be attached to VMs with flavors that support InfiniBand.
  </Info>
</Accordion>

## Step 4. Set up volumes

Enter a volume name, choose its type, and set its size in GiB.

<Frame>
  <img src="https://mintcdn.com/gcore-doc-1046/o7wA0BxBPtk_BB2L/images/docs/cloud/virtual-instances/create-an-instance/add-volume.png?fit=max&auto=format&n=o7wA0BxBPtk_BB2L&q=85&s=7a71532175a8ef6c9cdb19f82e5139e5" alt="Configure Volumes" width="2148" height="1832" data-path="images/docs/cloud/virtual-instances/create-an-instance/add-volume.png" />
</Frame>

<Accordion title="Available volume types">
  * **High IOPS SSD**. High-performance SSD block storage designed for latency-sensitive transactional workloads (60 IOPS per 1 GiB; 2.5 MB/s per 1 GiB). The IOPS performance limit is 9,000. The bandwidth limit is 500 MB/s.

  Availability: Amsterdam, Frankfurt, London, Luxembourg, Luxembourg-2, Manassas, Paris-2, Singapore

  * **Standard**. Network SSD disk, which provides stable and high random I/O performance, as well as high data reliability (6 IOPS per 1 GiB; 0.4 MB/s per 1 GiB). The IOPS performance limit is 4,500. The bandwidth limit is 300 MB/s.

  Availability: all regions

  * **Cold**. Network HDD disk, suitable for less frequently accessed workloads. The maximum number of IOPS is 1,000. The bandwidth limit is 100 MB/s.

  Availability: Luxembourg

  * **Ultra**. Network block storage option, recommended for non-critical data and workloads that are accessed less frequently. The maximum number of IOPS is 1,000. The bandwidth limit is 100 MB/s.

  Availability: Luxembourg

  * **SSD Low-Latency**. SSD block storage, designed for applications that require low-latency storage and real-time data processing. It can achieve IOPS performance of up to 5000, with an average latency of 300 µs.

  Availability: Amsterdam-2, Frankfurt, Hong Kong, Luxembourg-2, Manassas, Tokyo
</Accordion>

(Optional) Add an **Attachment Tag**.

## Step 5. Add network interfaces

Configure the network interface:

1. Select the **Network type**: **Public**, **Private**, or **Dedicated public**.

2. In the **IP Family** section, select the IP version: **IPv4**, **IPv6**, or **Dual (IPv4 + IPv6)**.

3. (Optional) Enable **Use reserved IP** to assign a [reserved IP address](/cloud/networking/ip-address/create-and-configure-a-reserved-ip-address) to your VM.

<img src="https://mintcdn.com/gcore-doc-1046/o7wA0BxBPtk_BB2L/images/docs/cloud/virtual-instances/create-an-instance/vm-network-section.png?fit=max&auto=format&n=o7wA0BxBPtk_BB2L&q=85&s=1a4582f3c48405dc88902a9406b8182d" alt="Network settings" width="1283" height="682" data-path="images/docs/cloud/virtual-instances/create-an-instance/vm-network-section.png" />

For a **private** interface, configure a network and a subnetwork as described below.

<Info>
  **Info**

  If you need both a public and private interface, disable the default gateway on the private network's subnetwork and assign a floating IP to the private interface.
</Info>

<Tabs>
  <Tab title="Configure a network">
    Select an existing network from the dropdown list or create a new one by clicking **Add a new network**.

    <Frame>
      <img src="https://mintcdn.com/gcore-doc-1046/o7wA0BxBPtk_BB2L/images/docs/cloud/virtual-instances/create-an-instance/add-new-network.png?fit=max&auto=format&n=o7wA0BxBPtk_BB2L&q=85&s=c1096bab28f9070bb5233e0e45f5b656" alt="Private interface with highlighted Add a new network link" width="2300" height="1672" data-path="images/docs/cloud/virtual-instances/create-an-instance/add-new-network.png" />
    </Frame>

    If you choose to add a new network, a new window will open where you'll configure the network settings:

    1. Enter the network name.
    2. (Optional) Turn on the **Use reserved IP** toggle if you want to assign a [reserved IP address](/cloud/networking/ip-address/create-and-configure-a-reserved-ip-address) to the Virtual Machine. Select the desired IP from the list.
    3. (Optional) Turn on the **Use floating IP** toggle if you want to assign a [floating IP address](/cloud/networking/ip-address/create-and-configure-a-floating-ip-address) and receive incoming connections to the VM.
    4. Click **Create network**.

    <Frame>
      <img src="https://mintcdn.com/gcore-doc-1046/o7wA0BxBPtk_BB2L/images/docs/cloud/virtual-instances/create-an-instance/create-network.png?fit=max&auto=format&n=o7wA0BxBPtk_BB2L&q=85&s=db93784e4c0056a07c9bd997bf12cf1b" alt="Add a new network" width="2112" height="1156" data-path="images/docs/cloud/virtual-instances/create-an-instance/create-network.png" />
    </Frame>
  </Tab>

  <Tab title="Configure a subnetwork">
    <Info>
      **Info**

      If your VM has several subnetworks, [ensure that only one subnetwork is routable](/cloud/networking/create-and-manage-a-subnetwork#set-up-the-default-gateway). Otherwise, there will be a conflict with the default gateway on the server, and you might not be able to connect to the VM.
    </Info>

    Select an existing subnetwork from the dropdown list or create a new one by clicking **Add a new subnetwork**.

    <Frame>
      <img src="https://mintcdn.com/gcore-doc-1046/o7wA0BxBPtk_BB2L/images/docs/cloud/virtual-instances/create-an-instance/add-new-subnetwork.png?fit=max&auto=format&n=o7wA0BxBPtk_BB2L&q=85&s=84d0bede69f8570a35f34c179851ad01" alt="Add a new subnetwork" width="2248" height="1540" data-path="images/docs/cloud/virtual-instances/create-an-instance/add-new-subnetwork.png" />
    </Frame>

    If you choose to add a new subnetwork, a new window will open where you'll configure the subnetwork settings:

    1. Enter the subnetwork name.
    2. Set CIDR between ranges: 10.0.0.0 - 10.255.255.255, 172.16.0.0—172.31.255.255, 192.168.0.0—192.168.255.255. Set the mask between 16 and 29.
    3. (Optional) Turn on the **Enable DHCP** toggle to assign IP addresses to machines in the subnet automatically.
    4. (Optional) Turn on the **Non-routable subnetwork** toggle to block access to the subnet from external networks and other subnets. If you keep the network routable, you can specify the **Gateway IP** address. Otherwise, a random IP address will be assigned.
    5. (Optional) Enter **Custom DNS servers** to add specific DNS servers.
    6. (Optional) Turn on **Add tags** to add metadata to the subnetwork.
    7. Click **Create subnetwork**.

    <Frame>
      <img src="https://mintcdn.com/gcore-doc-1046/o7wA0BxBPtk_BB2L/images/docs/cloud/virtual-instances/create-an-instance/create-subnetwork-annotated.png?fit=max&auto=format&n=o7wA0BxBPtk_BB2L&q=85&s=edc6cbbd638cd4f258862704be5e3096" alt="Add a new subnetwork dialog" width="2908" height="2552" data-path="images/docs/cloud/virtual-instances/create-an-instance/create-subnetwork-annotated.png" />
    </Frame>

    <Tip>
      **Tip**

      Optionally, you can turn on the **Use Reserved IP** toggle to assign a [reserved IP address](/cloud/networking/ip-address/create-and-configure-a-reserved-ip-address) to your VM and turn on the **Use Floating IP** toggle to assign a [floating IP address](/cloud/networking/ip-address/create-and-configure-a-floating-ip-address).
    </Tip>
  </Tab>
</Tabs>

### Interface order

When adding multiple interfaces, the order in the creation form determines how the OS names them after the instance starts.

The diagram below shows how the selection order in the creation form carries through to the **Networking** tab and then to the OS interface names:

<img src="https://mintcdn.com/gcore-doc-1046/o7wA0BxBPtk_BB2L/images/docs/cloud/virtual-instances/create-an-instance/vm-network-interface-order-diagram.png?fit=max&auto=format&n=o7wA0BxBPtk_BB2L&q=85&s=20f4bc1774a2499e05991e7839480b40" alt="Diagram showing how interface order set during VM creation maps to the Networking tab and OS interface names" width="2725" height="639" data-path="images/docs/cloud/virtual-instances/create-an-instance/vm-network-interface-order-diagram.png" />

```bash theme={null}
$ ip addr show enp3s0
2: enp3s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 ...
    inet 85.234.84.186/24 metric 1000 brd 85.234.84.255 scope global dynamic enp3s0

$ ip addr show enp4s0
3: enp4s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 ...
    inet 10.0.0.132/24 metric 2000 brd 10.0.0.255 scope global dynamic enp4s0
```

Interface 1 (`enp3s0`) is the public interface; Interface 2 (`enp4s0`) is the private interface. The order set at creation determines routing priority: the first interface has higher priority for outbound traffic than subsequent ones. The interface order cannot be changed after the instance is created.

## Step 6. Configure firewall settings

For **Firewall settings**, select the default firewall or create a new one by clicking **Add firewall**.

If you keep the default firewall, the incoming traffic will be allowed over ICMP, TCP (SSH), and RDP protocols.

If you want to create a new firewall, refer to our article on [adding and configuring a firewall](/cloud/networking/add-and-configure-a-firewall).

## Step 7. Set up authentication

<Tabs>
  <Tab title="Linux Virtual Machine">
    Configure an SSH key for a remote SSH connection. You can add an existing SSH key or generate a new one. For instructions on how to generate and configure the key, check out this guide: [Connect to a VM via SSH](/cloud/virtual-instances/connect/connect-via-ssh).

    <Frame>
      <img src="https://mintcdn.com/gcore-doc-1046/o7wA0BxBPtk_BB2L/images/docs/cloud/virtual-instances/create-an-instance/11-ssh-key.png?fit=max&auto=format&n=o7wA0BxBPtk_BB2L&q=85&s=25b9cea6c1a771029533ea3c160b81f1" alt="SSH keys section with three options: select, generate, or add a new SSH key" width="644" height="142" data-path="images/docs/cloud/virtual-instances/create-an-instance/11-ssh-key.png" />
    </Frame>

    In addition to SSH keys, you can also set up a password for your Virtual Machine, as described in step 9. Setting a password is necessary if you want to connect to a Linux VM [from the Customer Portal](/cloud/virtual-instances/connect/connect-to-your-instance-via-control-panel#connect-to-a-linux-instance).
  </Tab>

  <Tab title="Windows Virtual Machine">
    Configure **Access** by setting a password for the Admin user.

    <Frame>
      <img src="https://mintcdn.com/gcore-doc-1046/o7wA0BxBPtk_BB2L/images/docs/cloud/virtual-instances/create-an-instance/12-access-for-windows-instance.png?fit=max&auto=format&n=o7wA0BxBPtk_BB2L&q=85&s=feef276f5654f5d9bc539e87af7da5a5" alt="Access field with a password" width="659" height="170" data-path="images/docs/cloud/virtual-instances/create-an-instance/12-access-for-windows-instance.png" />
    </Frame>

    <Info>
      **Info**

      Your password must contain between 8 and 16 characters, including at least one lowercase letter (`a-z`), one uppercase letter (`A-Z`), one number (`0-9`), and one special character (`!#$%&'()*+,-./:;<=>?@[]^_{|}~`).
    </Info>

    You can use the password to connect to a Windows VM from the [Gcore Customer Portal](/cloud/virtual-instances/connect/connect-to-your-instance-via-control-panel) or from your computer using RDP (Remote Desktop Protocol).
  </Tab>
</Tabs>

## Step 8 (Optional). Configure additional options

Enable the **User data** toggle to customize your VM during the initial boot by a `cloud-init` agent.

<Frame>
  <img src="https://mintcdn.com/gcore-doc-1046/o7wA0BxBPtk_BB2L/images/docs/cloud/virtual-instances/create-an-instance/13-add-user-data.png?fit=max&auto=format&n=o7wA0BxBPtk_BB2L&q=85&s=1e9516e94ba2d88423c429c840e32a36" alt="User data field with password configuration" width="1100" height="492" data-path="images/docs/cloud/virtual-instances/create-an-instance/13-add-user-data.png" />
</Frame>

You can configure your password to connect to your Linux VM [from the Customer Portal](/cloud/virtual-instances/connect/connect-to-your-instance-via-control-panel) or [via SSH](/cloud/virtual-instances/connect/connect-via-ssh). To do so, insert the following code to the field, replacing `**your password**` with your chosen password:

```yaml theme={null}
#cloud-config 
password: **your password** 
chpasswd: { expire: False } 
ssh_pwauth: True
```

<Info>
  **Info**

  On Cloud VMs with Windows OS, you can't use the `password` parameter both in the "Access" and "User data" fields. Since the "Access" field is required, configuring user data on Windows Virtual Machines is not possible. Read more about the allowed VM parameters in our [API docs](https://api.gcore.com/docs/cloud#tag/Instances/operation/InstanceCreateSetV2.post).
</Info>

<Accordion title="Configure a password hash">
  You can configure the password hash, a machine-readable set of symbols. It'll protect your real password from being compromised. To generate a hash, use the Python script:

  ```
  #!/usr/bin/env python3  
  \# based on [https://stackoverflow.com/a/17992126/117471](https://stackoverflow.com/a/17992126/117471)\# pip3 install passlib  
  import sys  
  from getpass import getpass  
  from passlib.hash import sha512_crypt  
  passwd = input() if not sys.stdin.isatty() else getpass()  
  print(sha512_crypt.hash(passwd, rounds = 5000 ))
  ```
</Accordion>

<Warning>
  **Warning**

  If a VM is only in a private subnet, DHCP must be enabled in the settings of this subnet, so you can log in with a password.
</Warning>

* Turn on **Add tags** to add a key-value pair that forms the metadata of the Virtual Machine description.

<Frame>
  <img src="https://mintcdn.com/gcore-doc-1046/o7wA0BxBPtk_BB2L/images/docs/cloud/virtual-instances/create-an-instance/14-add-tags.png?fit=max&auto=format&n=o7wA0BxBPtk_BB2L&q=85&s=38b8690c12bdd3ebb24d1401f8534097" alt="The field to add tags" width="1100" height="442" data-path="images/docs/cloud/virtual-instances/create-an-instance/14-add-tags.png" />
</Frame>

* Turn on **Add to placement group** to determine how to place multiple VMs.

<Frame>
  <img src="https://mintcdn.com/gcore-doc-1046/o7wA0BxBPtk_BB2L/images/docs/cloud/virtual-instances/create-an-instance/15-add-placement-group.png?fit=max&auto=format&n=o7wA0BxBPtk_BB2L&q=85&s=cbae227feffb027bcd536a9d457be052" alt="The field to add the VM to a placement group" width="1100" height="552" data-path="images/docs/cloud/virtual-instances/create-an-instance/15-add-placement-group.png" />
</Frame>

<Accordion title="Types of placement groups">
  You can place your VM in one of three types of groups:

  * **Affinity** groups assemble virtual machines on the same hardware. Machines launched in one affinity group will exchange data faster because they are located on the same server.
  * **Anti-affinity** groups work the opposite way: all Virtual Machines in this group will be separated across different physical hardware. This increases fault tolerance of a cluster: Even if something goes wrong with one server, machines on the other servers will remain available.
  * **Soft anti-affinity** groups encourage, but don't strictly enforce, the separation of Virtual Machines. Unlike a strict anti-affinity policy, where machines may never be placed together, soft anti-affinity allows placement on the same hardware when it is necessary due to factors like resource constraints or high demand. It is suitable for users who want to use the anti-affinity policy by default while also avoiding machine creation failures if an unused host is not found.
</Accordion>

You can add the VM to an existing placement group or create a new one by clicking **Add placement group**.

## Step 9. Specify the number of VMs

Indicate how many machines with the same configuration you need and name the VMs.

<Frame>
  <img src="https://mintcdn.com/gcore-doc-1046/o7wA0BxBPtk_BB2L/images/docs/cloud/virtual-instances/create-an-instance/16-number-of-instances.png?fit=max&auto=format&n=o7wA0BxBPtk_BB2L&q=85&s=514a91011599432e98e39ff2f34843cb" alt="The field to set the number of instances" width="665" height="279" data-path="images/docs/cloud/virtual-instances/create-an-instance/16-number-of-instances.png" />
</Frame>

The maximum number is limited by your quotas.

For names, use Latin characters, underscores, spaces, and dots.

## Step 10. Create a VM

Click **Create virtual machine**.

Your server will be transitioned to the **Building** status. The system will allocate resources for your Virtual Machine.

After that, the server will be automatically moved to the **Power on** status. Your machine is ready to run!
