Skip to content

Mount target parameter does not get ~ inetpreted as home on target VM anymore #5284

Description

@amorskoy

Describe the bug
Please see full context at canonical/operator#2746 (comment)
Issue: "~" in mount target is taken literally in 1.17 while expended to home in 1.16.

root@andrey /h/andrey# multipass mount --type native ~andrey/onboarding-httpbin-task/ test:~/onboarding-httpbin-task
root@andrey /h/andrey# multipass info test | grep -A1 Mounts
Mounts:         /home/andrey/onboarding-httpbin-task => /home/ubuntu/~/onboarding-httpbin-task
                    UID map: 0:default

To Reproduce
How, and what happened?

  1. multipass mount --type native ~andrey/onboarding-httpbin-task/ test:~/onboarding-httpbin-task
  2. Target mount path on VM is /home/ubuntu/~/onboarding-httpbin-task (notice on "~")

Expected behavior
Path should interpret '~' as home directory on guest VM

Logs
Verbosity logs:

root@andrey /h/andrey# mp -vvvv mount --type native ~andrey/onboarding-httpbin-task/ test:~/onboarding-httpbin-task > /tmp/mp.mount.log
[2026-09-21T09:44:40.211] [debug] [mount cmd] mount.cpp:237, `mp::ParseCode multipass::cmd::Mount::parse_args(mp::ArgParser *)`: adding default uid mapping
[2026-09-21T09:44:40.211] [debug] [mount cmd] mount.cpp:276, `mp::ParseCode multipass::cmd::Mount::parse_args(mp::ArgParser *)`: adding default gid mapping
[2026-09-21T09:44:40.215] [info] [qemu-mount-handler] initializing native mount /home/andrey/onboarding-httpbin-task => /home/ubuntu/~/onboarding-httpbin-task in 'test'
[2026-09-21T09:44:40.223] [debug] [FileOps] Saved file `/var/snap/multipass/common/data/multipassd/multipassd-vm-instances.json` successfully in attempt #1

Additional info

  • OS: Ubuntu 26.04
  • CPU architecture or model: amd64
  • multipass version = 1.17.0-dev.4182+ga584e5fa
  • multipass info = see above
  • multipass get local.driver = qemu

Additional context
Suggested root cause - canonical/operator#2746 (comment)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions