# Set Up Storage

Storage space is added to your [<mark style="color:blue;">virtual machines</mark>](https://docs.ionos.com/support/general-information/glossary-of-terms#virtual-machine) by using storage elements in your [<mark style="color:blue;">VDC</mark>](https://docs.ionos.com/support/general-information/glossary-of-terms#vdc). Storage name, availability zone, size, OS image, and boot options are configurable for each element.

### How to add Storage to a Server or a Cube

1. Drag a storage element ([<mark style="color:blue;">HDD</mark>](https://docs.ionos.com/support/general-information/glossary-of-terms#hdd) or [<mark style="color:blue;">SSD</mark>](https://docs.ionos.com/support/general-information/glossary-of-terms#ssd)) from the **Palette** onto a **Server** or a **Cube** in the Workspace to connect them together. The highlighted VM will expand with a storage section.
2. Click the **Unnamed HDD Storage** to highlight the storage section. You can now see new options in the **Inspector** on the right.

![A Cube comes with an SSD, but you may also add a HDD to the setup. Drag and drop the storage element directly onto the Cube](/files/rIyIbT3vLHmIeHSxBMv0)

{% hint style="info" %}
Storage type cannot be changed after provisioning.
{% endhint %}

### How to Configure Storage

1. Enter a name that is unique within your VDC.
2. Select a zone in which you want the storage device to be maintained. When you select A (Auto), our system assigns the optimal Zone. The [<mark style="color:blue;">Availability Zone</mark>](https://app.gitbook.com/s/-Mj91LQrRzfHvr2Jl2Rv/general-information/glossary-of-terms#availability-zone) cannot be changed after [<mark style="color:blue;">provisioning</mark>](https://app.gitbook.com/s/-Mj91LQrRzfHvr2Jl2Rv/general-information/glossary-of-terms#provisioning).
3. Specify the required storage capacity. The size can be increased after provisioning, even while the [<mark style="color:blue;">server</mark>](#how-to-add-storage-to-a-server-or-a-cube) is running, as long as this is supported by its operating system. It is not possible to reduce the storage size after provisioning.

You can select one of the IONOS images or [<mark style="color:blue;">snapshots</mark>](https://app.gitbook.com/s/-Mj91LQrRzfHvr2Jl2Rv/general-information/glossary-of-terms#snapshot), or use your own. Only images and snapshots that you have access to are available for selection. Since provisioning does not require you to specify an image, you can also create empty storage volumes.

**Authentication**

1. Set the root or administrator password for your server according to the guidelines. This is recommended for both operating system types
2. Select an [<mark style="color:blue;">SSH key</mark>](https://app.gitbook.com/s/-Mj91LQrRzfHvr2Jl2Rv/general-information/glossary-of-terms#ssh-keys) stored in the SSH Key Manager.
3. Copy and paste the public part of your SSH key into this field.
4. Select the storage volume from which the server is to boot by clicking on BOOT or Make Boot Device.

#### Alternative Mode

* When adding a storage element using the Inspector, select the appropriate check box in the **Add Storage** dialog box. If you wish to boot from the network, set this on the server: **Server** in the Workspace > **Inspector** > **Storage**.
* It is recommended to always use [<mark style="color:blue;">VirtIO</mark>](#install-windows-virtio-drivers) to benefit from the full performance of InfiniBand. IDE is intended for troubleshooting if, for instance, the operating system has no VirtIO drivers installed. In this case, Windows usually displays a "blue screen" when booting.
* After provisioning, the [<mark style="color:blue;">Live Vertical Scaling</mark>](https://app.gitbook.com/s/-Mj91LQrRzfHvr2Jl2Rv/general-information/glossary-of-terms#lvs) properties of the selected image are displayed. You can make changes to these properties later, which will require a reboot. You can set the properties of your uploaded images before you apply them to storage volumes in the Image Manager.
* **(Optional)** Add and configure further storage elements.
* **(Optional)** Make further changes to your data center.
* Provision your changes. The storage device is now provisioned and configured according to your settings.

### How to add a CD-ROM drive

To assign an image and specify a boot device, you need to add and configure a storage element.

* Click on CD-ROM to add a CD-ROM drive so that you can use ISO images to install and configure an operating system from scratch.
* Set up a network by connecting the server to other elements, such as an internet access element or other servers through their NICs.
* Provision your changes.

The server is available according to your settings.

### How to Delete Storage

When you no longer need snapshots or images, you should remove them from your cloud infrastructure to avoid unnecessary costs. For backup purposes, you can create a snapshot before deleting it.

1. In the Workspace, select the storage device you wish to delete.
2. Open the context menu of the element and select **Delete**.
3. **(alternative)** Select the element and press the **DEL** key.
4. Provision your changes result: The storage device is deleted and will no longer be available.

{% hint style="info" %}

* If you delete a server and its storage devices, or the entire data center, their backups are not deleted automatically. Only when you delete a Backup Unit will the backups it contains actually be deleted.
* If you no longer need the backups of deleted [<mark style="color:blue;">VMs</mark>](https://app.gitbook.com/s/-Mj91LQrRzfHvr2Jl2Rv/general-information/glossary-of-terms#vm), you should delete them manually in the Backup Unit Manager to avoid unnecessary costs.
  {% endhint %}

### Install Windows VirtIO Drivers

VirtIO provides an efficient abstraction for hypervisors and a common set of IO virtualization drivers. It was chosen to be the main platform for IO virtualization in KVM. There are four drivers available:

* Balloon - The balloon driver affects the memory management of the guest OS.
* VIOSERIAL - The serial driver affects single serial device limitation within KVM.
* NetKVM - The network driver affects Ethernet network adapters.
* VIOSTOR - The block driver affects SCSI based controllers.

Windows-based systems require VirtIO drivers primarily to recognize the VirtIO (SCSI) controller and network adapter presented by the IONOS KVM-based hypervisor. This can be accomplished in a variety of ways depending on the state of the virtual machine.

IONOS provides pre-configured Windows Server images that already contain the required VirtIO drivers and the optimal network adapter configuration. We also offer a VirtIO ISO to simplify the driver installation process for Windows 2008 R2, Windows 2012 & Windows 2012 R2 systems. This ISO can be found in the CD-ROM drop-down menu under **IONOS Images** which can be used for new Windows installations (only required for customer-provided images), as well as **Windows images** that have been migrated from other environments (e.g. via VMDK upload).\\

{% hint style="info" %}
Always use the latest Windows VirtIO driver from IONOS.
{% endhint %}

#### How to install Windows VirtIO drivers

1. Add a CD-ROM drive and open the installation menu:

* In the Workspace, select the required server.
* In the **Inspector**, open the **Storage**.
* Click on **CD-ROM** to add a CD-ROM drive.
* In the dialog box, choose an IONOS image with drivers (`windows-VirtIO-driver-<version>.iso`) and select the **Boot from Device** check box.
* Confirm the action by clicking the Create **CD-ROM Drive**.
* Provision your changes.
* Connect to the server using Remote Console. The installation menu opens.
* Follow the options provided by the installation menu.
* Remove the CD-ROM drive as soon as the menu asks you to do so, and shut down the VM.
* In DCD, specify from which storage to boot.
* Restart the server using the DCD.
* Provision your changes.
* Connect to the server again using the Remote Console to make further changes.

2\. Set optimal values: For an optimal configuration, apply the following settings:

* **MTU**:
  * Internal network interface: 1500 MTU
  * External network interface: 1500 MTU
* **Offloading for Receive (RX) and Transmit (TX)**:
* Offload Tx IP checksum: Enabled
* Offload Tx LSO: Enabled
* Offload Tx TCP checksum: Enabled
* Fix IP checksum on LSO: Enabled
* Hardware checksum: Enabled

3\. Disable TCP Offloading/Chimney:

* Default:

  `netsh int tcp set global chimney=disabled`
* Everything:

```
rss=disabled
chimney=disabled
congestionprovider=none
netdma=disabled dca=disabled
ecncapability=disabled
timestamps=enabled
```

* Alternatively, modify the Windows registry:

```
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters]
"EnableTCPA"=dword:00000000
"EnableRSS"=dword:00000000
"EnableTCPChimney"=dword:00000000
```

The installation will be active after a restart. The following command can be used to verify the status of the configuration above.

```
netsh interface tcp show global
```

4\. Set correct values for any network adapter automatically: You can apply the correct settings for any network adapter automatically by executing the following commands in PowerShell:

* Request network adapter information `Get-NetAdapter`

The following output is displayed:

* In the Name field, use the output value instead of "Ethernet".
* Create a new file using PowerShell ISE (**File > New**).
* Copy and paste the following code and make sure to change `$name ="Ethernet"` properly:

```
Clear-Host
$name ="Ethernet"
Set-NetAdapterAdvancedProperty-name $name -RegistryKeyword "MTU" -Registryvalue 1500
Set-NetAdapterAdvancedProperty -name $name -RegistryKeyword "*rss" -Registryvalue 0
Set-NetAdapterAdvancedProperty -name $name -RegistryKeyword"*TCPChecksumOffloadIPv4" -Registryvalue 0
Set-NetAdapterAdvancedProperty -name $name -RegistryKeyword "*UDPChecksumOffloadIPv4" -Registryvalue 0
netsh interface tcp set global chimney=disabled
netsh interface tcp set global autotuninglevel=normal
netsh interface tcp set global netdma=disabled
netsh interface tcp set global dca=disabled
netsh interface tcp set global ecncapability=disabled
netsh interface tcp set global timestamps=enabled
Get-NetAdapterAdvancedProperty
netsh int tcp show global
```

* Click File > Execute.
* Check the settings.
* Restart the VM. The correct settings are applied automatically.

5\. Activate TCP/IP auto-tuning:

TCP/IP auto-tuning ensures optimal data transfer between client and server by monitoring network traffic and automatically adjusting the "Receive Window Size". You should always activate this option to ensure the best performance.

Activate:

```
netsh interface tcp set global autotuninglevel=normal
```

Check:

```
netsh interface tcp show global
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ionos.com/cloud/~/revisions/1AlFSZBNMIBgs7fiOwFD/compute/block-storage/dcd-how-tos/add-block-storage.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
