naming images/root dir trees of ct's and vm's / renaming instances

mathx

Renowned Member
Jan 15, 2014
184
3
83
I previously posted about renaming instances from numbers (100, 101, etc) to names. Got no reply :/

One lesser solution is to rename the root trees for the CT's and images of VM's. So I've done
Code:
mv 100 name; ln -s name 100
in /var/lib/vz/private, I think that'll work.

What'd be nice if in /etc/pve/nodes/* that the 100.conf was a symlink to name.conf as well. I work on names, not numbers. Specific clients have specific needs and specific names are easier to remember than ID numbers. Especially when I go through a backup and look at their dirs.

However, I cant symlink in /etc/pve at all (due to xattrs? but lsattr wont even run in there), so i cant do that with the .conf files.

Any suggestions?
 
You cannot use symlinks on /etc/pve. That is a very special distributed file system, and VMIDs inside the file names are used for several things internally.
 
how about in /var/lib/vz/private/? can I mv 100 $name; ln -s $name 100 ok?
 
hmm true enough. how about a bind mount to another dir for each image then? the bind mount would only be for external viewpoint, the dirs in private/### would be left as is (the vz id #) - any issues with that?