> For the complete documentation index, see [llms.txt](https://docs.glesys.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.glesys.com/products/storage/block-storage/how-tos/move-a-volume-between-virtual-machines.md).

# Move a volume between virtual machines

Before moving a volume to a new virtual machine, make sure to unmount it from the current virtual machine first.

***

Moving a volume between VMs is just a matter of unmounting it from the operating system, detaching it from the current VM, attaching it to another VM, and mounting it.

Start by detaching the volume from the current VM by following the guide [Detach a volume from a virtual machine](https://docs.glesys.com/products/storage/block-storage/how-tos/detach-a-volume-from-a-virtual-machine.md). Make sure you unmount the volume first, as described in the guide.

Then, attach the volume to the new VM by following the guide [Attach a volume to a virtual machine](https://docs.glesys.com/products/storage/block-storage/how-tos/attach-a-volume-to-a-virtual-machine.md).

The final step is to mount the volume in the new VM so it becomes accessible.

{% tabs %}
{% tab title="Linux" %}
Follow the section [Mount the volume in Linux](https://docs.glesys.com/products/storage/block-storage/how-tos/format-and-mount-a-volume.md#mount-the-volume-in-linux) in the guide [Format and mount a volume](https://docs.glesys.com/products/storage/block-storage/how-tos/format-and-mount-a-volume.md). But make sure to ***only*** follow the mount section. **Don't format the volume or create partitions or a partition table! If you format the volume or create a new partition table, you'll lose all data on it!**
{% endtab %}

{% tab title="Windows Server (GUI)" %}
If the volume doesn't show up automatically under **This PC**, start a PowerShell terminal and run the following command (search for ***Terminal*** or ***PowerShell*** in the Start menu).

Execute `Get-Disk` and look for the WWN shown in the control panel and match it to a disk.

<pre data-title="Command and output. Command is highlighted."><code><strong>Get-Disk | Select-Object Number, FriendlyName, UniqueId
</strong>
Number FriendlyName       UniqueId
------ ------------       --------
     0 GLESYS LOCAL DISK  34CE12CC9399D6F5
     1 GLESYS REMOTE DISK 3DD0446B90C484F1
</code></pre>

In this example, disk number 1 matches the WWN from the control panel.

Open **Computer Management** by searching for it in the Start menu.

Once inside Computer Management, select **Disk Management** under **Storage**. Right-click on the disk number that corresponds to the WWN from the previous step (in this case, **Disk 1**). Select **Online**.

<figure><img src="https://3379166260-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlMZhhdQNcWOpX5Bj48GK%2Fuploads%2F04j1D25J9OuuFNPVVuJk%2Fwindows-server-2025-take-disk-online.png?alt=media&amp;token=aaa70ec0-a05f-4a08-bcf0-2fb806be71ce" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Windows Server (PowerShell)" %}
If the volume doesn't show up automatically under **This PC**, start a PowerShell terminal and run the following command (search for ***Terminal*** or ***PowerShell*** in the Start menu).&#x20;

Execute `Get-Disk` and look for the WWN shown in the control panel and match it to a disk.

<pre data-title="Command and output. Command is highlighted."><code><strong>Get-Disk | Select-Object Number, FriendlyName, UniqueId
</strong>
Number FriendlyName       UniqueId
------ ------------       --------
     0 GLESYS LOCAL DISK  34CE12CC9399D6F5
     1 GLESYS REMOTE DISK 3DD0446B90C484F1
</code></pre>

In this example, disk number 1 matches the WWN from the control panel.

Use `Set-Disk` to take the volume online. Use the disk number from the above step.

<pre data-title="Command"><code><strong>Set-Disk -Number 1 -IsOffline $false
</strong></code></pre>

{% endtab %}
{% endtabs %}
