How to rename disk images in local-lvm?

HE_Cole

Member
Oct 25, 2018
45
1
6
32
Miami, FL
Hello Everyone!

I need to be able to rename disk images stored in local-lvm. We have a gui site that uses the Promox API and when our users go to create a VM and select an OS template all they see is vm-9000-disk-0,vm-9001-disk-0 etc.

Currently each of the vm-9000-disk-0,vm-9001-disk-0,vm-9002-disk-0 corresponds to a different OS for cloning to create a new vm.

I just want to rename each disk from vm-9000-disk-0 TO os-name-version like "Ubuntu-16-04-LTS" so users would see name of the os they want to use NOT vm-9000-disk-0.


I use the below to import my images to lvm.

qm importdisk 9000 bionic-server-cloudimg-amd64.img local-lvm

Then i add the imported image to my vm for cloning with

qm set 9000 --scsihw virtio-scsi-pci --scsi0 local-lvm:vm-9000-disk-0 "i would change this to my new name"

Thanks a Bunch
 
Hey there!

I am not sure what you mean by in the options, But in the GUI if your under Your-Server then Local-lvm then disk-images yes thats where the images are listed. I believe local-lvm is a block storage system so i dont know where images in it are stored or how to edit there names.

I just need to know how to simply rename disk images stored on local-lvm to what ever name i want.
 
Last edited:
You cannot simple rename the disk using arbitrary names, because we encode and use information stored in the disk name.
 
  • Like
Reactions: HE_Cole
Thanks dietmar ! Thats very interesting, So is there any way to add data the name without messing with the encoding? Right now our users just see vm-9000-disk-0 etc and have to look at a list to which number corresponds to a OS it would help us alot to be able to add the friendly name of the OS to the disk image name some how.

Thanks
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!