multipass icon indicating copy to clipboard operation
multipass copied to clipboard

Rename instance

Open johnsca opened this issue 7 years ago • 28 comments

It would be nice to be able to rename an existing instance.

johnsca avatar May 22 '18 22:05 johnsca

@johnsca, yeah I think that's a good idea:)

townsend2010 avatar May 23 '18 14:05 townsend2010

We should switch to using UUIDs in image paths etc., and have the name just be a label.

Saviq avatar Feb 21 '19 13:02 Saviq

I would really like to have this implemented for making snapcraft-<snapname> instances which are created by multipass launch <image_url> due to download issues.

brlin-tw avatar Feb 27 '19 14:02 brlin-tw

I would really like to have this implemented for making snapcraft-<snapname> instances which are created by multipass launch <image_url> due to download issues.

Hey @Lin-Buo-Ren, would you please file a new issue describing your download issues? Note snapcraft uses a cloud-init template that you'd need to use. There's no reason why you couldn't multipass launch --name snapcraft-<snapname> snapcraft:core18 to start with - I believe snapcraft will realize the instance is there and use it.

Saviq avatar Feb 27 '19 15:02 Saviq

@Saviq I later found there's a --name option in the multipass launch command that I can make use of, thanks for your help!

brlin-tw avatar Feb 27 '19 19:02 brlin-tw

@Lin-Buo-Ren yes, that's exactly what I meant :)

Saviq avatar Feb 27 '19 19:02 Saviq

So we are not able to rename multpass instance in 2021?

arafatx avatar Aug 17 '21 23:08 arafatx

probably add a rename sub command to multipass

winkee01 avatar Nov 16 '21 02:11 winkee01

Seem that we can not rename multipass instances now?

prncoprs avatar Nov 26 '21 07:11 prncoprs

while there doesn't seem to be an option to rename an existing instance, following the hint from @brlin-tw it is possible to use a predefined name (e.g. u20) on creation with:

multipass launch --name u20 ubuntu

glowinthedark avatar Jan 02 '22 15:01 glowinthedark

It seems a very basic functionality. Once an instance is created, it may grow in functions, contents, and seems logical to be able to rename it

peret2000 avatar Nov 06 '22 16:11 peret2000

The instance resets the hostname on restart. In order to avoid this comment the lines - set_hostname - update_hostname - update_etc_hosts in the "/etc/cloud/cloud.cfg" file.

chav-n avatar Nov 17 '22 11:11 chav-n

Any updates?

changhoon-sung avatar Jan 10 '23 04:01 changhoon-sung

Bump

artsra avatar Feb 23 '23 14:02 artsra

Does someone know how to rename instance (may be via renaming instance file or any config files)?

troxycoru avatar Mar 15 '23 04:03 troxycoru

This would also be very helpful for my usecase.

Then also, "--name" has no help dialog; It would be useful to know what the naming restrictions are. For example, multipass launch --name "00340599maas" failed, but multipass launch --name "case00340599" works.

pjmattingly avatar Mar 16 '23 21:03 pjmattingly

So we are not able to rename multpass instance in 2021?

2023 (almost 2024)

pythoninthegrass avatar Dec 07 '23 19:12 pythoninthegrass

2023 (almost 2024)

The most useless kind of comment on GitHub.

There used to be a time when GitHub users weren't so entitled…

huyz avatar Dec 08 '23 05:12 huyz

@huyz Renaming VMs is table stakes for hypervisors. Leaving an issue open for 5 years is hardly entitled. Either close the issue as "won't do" or put a time line on it.

pythoninthegrass avatar Dec 08 '23 17:12 pythoninthegrass

An update regarding this...yes, we made a bad decision in the early days of Multipass to key everything off of the instance name and making assumptions around that. The fact we did that has made this seemingly easy request much more difficult than it should be. That said, we are working on a cloning feature which essentially copies and "renames" an instance (among some other things), but we think we can reuse the instance renaming part of that to allow renaming of existing instances. I'm not sure exactly when we can get to work on this after clone is released as we have a lot on our plates, but I really hope we can fix this in 2024.

townsend2010 avatar Jan 04 '24 19:01 townsend2010

Thank you for your work on this @townsend2010. As strange of a demand as it is to make of your great tool and an open source project, it is useful and still highly desired - as you know.

I have found myself finding real power with multipass on macOS to run light Linux (Ubuntu) instances in the background instead of using heavier Parallels in cases where I don't need a GUI. Unfortunately I've been bitten a few times now making an instance that I did not plan to have become a long term and integral component of workflow... I find myself highly frustrated to not be able to rename an instance to more meaningful names in these cases.

ylluminate avatar Mar 26 '24 07:03 ylluminate

@townsend2010 wrote:

An update [...] after clone is released as we have a lot on our plates, but I really hope we can fix this in 2024.

Awesome, thank you!

Does 2024 still look promising?

holta avatar Jul 17 '24 15:07 holta