Skip to main content
You can detach a secondary disk or a shared filesystem from a VM. You cannot detach a boot disk.

Steps

Get the disk’s device ID or the filesystem’s mount tag

  1. In the sidebar, go to https://mintcdn.com/nebius-ai-cloud/rOlLZ_MFvrheaI-h/_assets/sidebar/storage.svg?fit=max&auto=format&n=rOlLZ_MFvrheaI-h&q=85&s=f060b15cbd82c08f84599faeeeb07ece Storage → Disks or https://mintcdn.com/nebius-ai-cloud/rOlLZ_MFvrheaI-h/_assets/sidebar/storage.svg?fit=max&auto=format&n=rOlLZ_MFvrheaI-h&q=85&s=f060b15cbd82c08f84599faeeeb07ece Storage → Shared filesystems.
  2. Copy the device ID from the list of disks or the mount tag from the list of filesystems.

Make sure that the VM does not mount the volume when the VM restarts

  1. Connect to the VM over SSH.
  2. Switch to the root user:
  3. If you want to detach a secondary disk, get its UUID:
    In this example, we assume that you have named the device disk-0; for disks, all device IDs are prefixed with virtio-.
  4. Open /etc/fstab with your preferred text editor, for example, nano /etc/fstab, and delete the lines that refer to the volumes:
    • The line for a disk should start with its UUID:
    • The line for a filesystem should start with the filesystem’s mount tag from the VM specification:
      In this example, the filesystem has the mount tag filesystem-0 and is mounted at /mnt/fs.
  5. Disconnect from the VM.

Remove the volume from the VM’s specification

  1. In the sidebar, go to https://mintcdn.com/nebius-ai-cloud/rOlLZ_MFvrheaI-h/_assets/sidebar/compute.svg?fit=max&auto=format&n=rOlLZ_MFvrheaI-h&q=85&s=8d3eda9b92f5a626a81d01268852f482 Compute → Virtual machines.
  2. Open the page of the required VM.
  3. Click https://mintcdn.com/nebius-ai-cloud/1Ha0sWR6e1mnIaHS/_assets/square.svg?fit=max&auto=format&n=1Ha0sWR6e1mnIaHS&q=85&s=fa5b9d220f12bdedefbdb713438e23c4 Stop VM and then confirm it.
    You can detach a disk from a running VM, but this can cause data loss or corruption.
  4. After the VM’s status becomes Stopped, switch to the Disks or Filesystems tab.
  5. Next to the disk or filesystem, click https://mintcdn.com/nebius-ai-cloud/1Ha0sWR6e1mnIaHS/_assets/button-vellipsis.svg?fit=max&auto=format&n=1Ha0sWR6e1mnIaHS&q=85&s=e80b8e57c43bfd117679262e6a1334ad → Detach.
  6. After the volume is detached, click https://mintcdn.com/nebius-ai-cloud/1Ha0sWR6e1mnIaHS/_assets/play.svg?fit=max&auto=format&n=1Ha0sWR6e1mnIaHS&q=85&s=bce64b8131f20ec6139c949e67563483 Start VM and then confirm it.
You can attach and mount different additional volumes to the VM later.