Describe the bug
On both the GUI and CLI, the launch command fails if the provided instance name is very long. This is because of the OS limitation on folder names.
To Reproduce
1. CLI
multipass launch --name abcdjvkcwwuqdxgkvihthjhndimukwzzxwxtrjueurnbngmeptfmjydifqiivbhhgpppqnkbnvnmfgnzrhkbdzwayuadujtdcdnqvadnfpbjuxunjzfuugbnbhfvbuuaabhbpjvfnagmcxdzigfnpvfdytrzukbudqazygwhhyezkuhaxrcjdmihqiuccgqvucaynncvcekkmmvanpbbpdibftmuittdvnhvyfhuyuqzjefyjcqyqwgingtjtfwfikvqtyynmvcnmenfpavngrwtzcgncyndijtqciihcuupudenhjrqcepzxahravijivjdpjajzrznqiuukgdyxuqpecixeqbvzwufmmnxygepzujatencvmpupbmgfiejcizfdcvdzbvyiawcpnuuffyqrjdntrmeztktwfhbvvxgiuixkfnfpzqgnargdpvxdtypzfmpbggwhjwyuqjzuvhnmtcaqqbgekxjumnknczgipgdzxxnbhxgr
- The CLI starts downloading the image and shows an error. The full log is
multipass launch --name abcdjvkcwwuqdxgkvihthjhndimukwzzxwxtrjueurnbngmeptfmjydifqiivbhhgpppqnkbnvnmfgnzrhkbdzwayuadujtdcdnqvadnfpbjuxunjzfuugbnbhfvbuuaabhbpjvfnagmcxdzigfnpvfdytrzukbudqazygwhhyezkuhaxrcjdmihqiuccgqvucaynncvcekkmmvanpbbpdibftmuittdvnhvyfhuyuqzjefyjcqyqwgingtjtfwfikvqtyynmvcnmenfpavngrwtzcgncyndijtqciihcuupudenhjrqcepzxahravijivjdpjajzrznqiuukgdyxuqpecixeqbvzwufmmnxygepzujatencvmpupbmgfiejcizfdcvdzbvyiawcpnuuffyqrjdntrmeztktwfhbvvxgiuixkfnfpzqgnargdpvxdtypzfmpbggwhjwyuqjzuvhnmtcaqqbgekxjumnknczgipgdzxxnbhxg
Creating abcdjvkcwwuqdxgkvihthjhndimukwzzxwxtrjueurnbngmeptfmjydifqiivbhhgpppqnkbnvnmfgnzrhkbdzwayuadujtdcdnqvadnfpbjuxunjzfuugbnbhfvbuuaabhbpjvfnagmcxdzigfnpvfdytrzukbudqazygwhhyezkuhaxrcjdmihqiuccgqvucaynncvcekkmmvanpbbpdibftmuittdvnhvyfhuyuqzjefyjcqyqwgingtjtfwfikvqtyynmvcnmenfpavngrwtzcgncyndijtqciihcuupudenhjrqcepzxahravijivjdpjajzrznqiuukgdyxuqpecixeqbvzwufmmnxygepzujatencvmpupbmgfiejcizfdcvdzbvyiawcpnuuffyqrjdntrmeztktwfhbvvxgiuixkfnfpzqgnargdpvxdt
Verifying image: |
Preparing image for abcdjvkcwwuqdxgkvihthjhndimukwzzxwxtrjueurnbngmeptfmjydifqiivbhhgpppqnkbnvnmfgnzrhkbdzwayuadujtdcdnqvadnfpbjuxunjzfuugbnbhfvbuuaabhbpjvfnagmcxdzigfnpvfdytrzukbudqazygwhhyezkuhaxrcjdmihqiuccgqvucaynncvcekkmmvanpbbpdibftmuittdvnhvyfhuyuqzjefyjcqyqwgingtjtfwfikvqtyynmvcnmenfpavngrwtzcgncyndijtqciihcuupudenhjrqcepzxahravijivjdpjajzrznqiuukgdyxuqpecixeqbvzwufmmnxygepzujatencvmpupbmgfiejcizfdcvdzbvyiawcpnuuffyqrjdntrmeztktwfhbvvxgiuixkfnfpzq
launch failed: unable to create directory '/var/root/Library/Application Support/multipassd/qemu/vault/instances/abcdjvkcwwuqdxgkvihthjhndimukwzzxwxtrjueurnbngmeptfmjydifqiivbhhgpppqnkbnvnmfgnzrhkbdzwayuadujtdcdnqvadnfpbjuxunjzfuugbnbhfvbuuaabhbpjvfnagmcxdzigfnpvfdytrzukbudqazygwhhyezkuhaxrcjdmihqiuccgqvucaynncvcekkmmvanpbbpdibftmuittdvnhvyfhuyuqzjefyjcqyqwgingtjtfwfikvqtyynmvcnmenfpavngrwtzcgncyndijtqciihcuupudenhjrqcepzxahravijivjdpjajzrznqiuukgdyxuqpecixeqbvzwufmmnxygepzujatencvmpupbmgfiejcizfdcvdzbvyiawcpnuuffyqrjdntrmeztktwfhbvvxgiuixkfnfpzqgnargdpvxdtypzfmpbggwhjwyuqjzuvhnmtcaqqbgekxjumnknczgipgdzxxnbhxg'
2. GUI
- The GUI starts downloading the image and shows the "launching state". The GUI also shows a black ribbon across the screen with the long name which is not a good user experience.

2. The GUI displays the error.
The error message is:
unable to create directory '/var/root/ Library/Application Support/multipassd/ qemu/vault/instances/jvkcwwuqdxgkviht hjhndimukwzzxwxtrjueurnbngmeptfmjydi faiivbhhgpppqnkbnvnmfgnzrhkbdzwayu adujtdednqvadnfpbjuxunjzfuugbnbhfvbu uaabhbpjvfnagmoxdzigfnpvfdytrzukbudq azygwhhyezkuhaxrcjdmihqiuccgqvucayn ncvcekkmmvanpbbpdibftmuittdvnhvyfhu yuązjefyjcąyqwgingtjtfwfikvątyynmvcn...
Expected behavior
- In the CLI, there should be an instant error message if the name exceeds a certain string length.
An example would be
multipass launch --name <a very long string>
launch failed: instance name too long (<length of provided string e.g. 200> chars, max <what is the max allowed?>)
Instance names map to filesystem directories and must fit OS limits.
Allowed: 1–<max allowed> chars, [a-zA-Z][a-zA-Z0-9-]*
Try: multipass launch --name <shorter-name>
We can also truncate the echoed instance name in the error log to make the logs/error message readable. If you look at provided terminal logs in the previous section, they are not great design.
Something to debate:
We could still launch an instance by truncating the long instance name to the max allowed length and issue a warning in the terminal.
multipass launch --name abcdjvkcwwuqdxgkvi...nbhxgr
warning: name truncated to <max allowed> chars → 'abcdjvkcwwuqdxgkvihthjhndimukwzzxwxtrjueurnbngmeptfmjydifqiivbh'
original was 612 chars (OS filesystem limit)
use --strict-name or --force etc to fail instead
Launched: abcdjvkcwwuqdxgkvihthjhndimukwzzxwxtrjueurnbngmeptfmjydifqiivbh
The tradeoff here is that the process is convenient but there is a silent collision risk if two long names share prefix
- In the GUI, a text input validator on the name form field should have a validation check for string length.
Additional info
- OS: MacOS Tahoe 26.5
- CPU architecture or model: Apple M1
We also need to find out what is the max string length that is allowed by the various OS.
Describe the bug
On both the GUI and CLI, the launch command fails if the provided instance name is very long. This is because of the OS limitation on folder names.
To Reproduce
1. CLI
multipass launch --name abcdjvkcwwuqdxgkvihthjhndimukwzzxwxtrjueurnbngmeptfmjydifqiivbhhgpppqnkbnvnmfgnzrhkbdzwayuadujtdcdnqvadnfpbjuxunjzfuugbnbhfvbuuaabhbpjvfnagmcxdzigfnpvfdytrzukbudqazygwhhyezkuhaxrcjdmihqiuccgqvucaynncvcekkmmvanpbbpdibftmuittdvnhvyfhuyuqzjefyjcqyqwgingtjtfwfikvqtyynmvcnmenfpavngrwtzcgncyndijtqciihcuupudenhjrqcepzxahravijivjdpjajzrznqiuukgdyxuqpecixeqbvzwufmmnxygepzujatencvmpupbmgfiejcizfdcvdzbvyiawcpnuuffyqrjdntrmeztktwfhbvvxgiuixkfnfpzqgnargdpvxdtypzfmpbggwhjwyuqjzuvhnmtcaqqbgekxjumnknczgipgdzxxnbhxgr2. GUI
The error message is:
unable to create directory '/var/root/ Library/Application Support/multipassd/ qemu/vault/instances/jvkcwwuqdxgkviht hjhndimukwzzxwxtrjueurnbngmeptfmjydi faiivbhhgpppqnkbnvnmfgnzrhkbdzwayu adujtdednqvadnfpbjuxunjzfuugbnbhfvbu uaabhbpjvfnagmoxdzigfnpvfdytrzukbudq azygwhhyezkuhaxrcjdmihqiuccgqvucayn ncvcekkmmvanpbbpdibftmuittdvnhvyfhu yuązjefyjcąyqwgingtjtfwfikvątyynmvcn...Expected behavior
An example would be
We can also truncate the echoed instance name in the error log to make the logs/error message readable. If you look at provided terminal logs in the previous section, they are not great design.
Something to debate:
We could still launch an instance by truncating the long instance name to the max allowed length and issue a warning in the terminal.
The tradeoff here is that the process is convenient but there is a silent collision risk if two long names share prefix
Additional info
We also need to find out what is the max string length that is allowed by the various OS.