Skip to content

Create directory in the guest to mount --rodir in #236

@bjackman

Description

@bjackman

Another case where what I want seems simple enough, but I'm not sure what the behaviour/UX should be.

I don't like using my host rootfs for testing (it changes too much) so I normally boot a minimal guest in virtme-ng and then pass stuff I wanna run in there in via --rodir or --rwdir. I usually just use /mnt as the guest directory for that.

The minor annoyance comes when I wanna pass multiple directories in that way: the target directory needs to exist in the guest but if I've already used /mnt for one directory I can't use it again.

I think the best ways I can see to solve that would be:

  1. Just have virtme-init create the target directory unconditionally.
  2. Add some optional variant like --rwdir-create/--rodir-create that does this.

Option 1 seems like it might cause some surprise since that's not how mount or /etc/fstab works. If it only created 1 level of directory (mkdir rather than mkdir -p) that might help mitigate the worst sources of confusion. Option 2 seems easiest to reason about but it's kinda annoying to create new "configuration surface" like that. Any other options / other thoughts?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions