Change VM disk from QCOW to RAW disk

Jun 24, 2019
8
1
23
35
hello,

i have an VM and VM Disk is store on NAS Server with qcow2 format. And size of disk is 1TB
i want to move its VM disk to local storage (raw disk) and shrink its size to 300GB, because usage disk VM only 100GB.
OS VM using ubuntu server 16.04

what should i do,thanks
 

Attachments

  • capture hardisk VM.PNG
    capture hardisk VM.PNG
    16.8 KB · Views: 17
To change storage format you can "qm clone" (man qm), or "qm move-disk" (man qm).

Reducing disk size is not a single click operation. There are many steps involved, starting from inside the VM. You are better off ensuring that you have "trim" properly implemented https://pve.proxmox.com/wiki/Shrink_Qcow2_Disk_Files.
There is no built-in "thin provisioning" with raw format: https://forum.proxmox.com/threads/question-about-raw-and-thin-provisioning.37635/

The easiest way for you is to client copy the data from qcow to appropriately sized raw.



Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox