Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data storage with secondary image on external disk #5079

Closed
nerdlich opened this issue Feb 28, 2023 · 5 comments
Closed

Data storage with secondary image on external disk #5079

nerdlich opened this issue Feb 28, 2023 · 5 comments
Labels
enhancement New feature or request
Milestone

Comments

@nerdlich
Copy link

nerdlich commented Feb 28, 2023

I've read #3484, but does it mean that I cannot add a secondary disk on an external drive of the host, i.e. outside the utm bundle? The UI lets me do it. I can create a qcow2, import it as virtio and start the guest. The guest sees the disk as /dev/vdb and I can move files to it. After shutting down the vm, the settings screen shows the correct usage of each disk. However, on host OS level, all the data ends up in the original qcow2 image inside the utm bundle. The new image on the external disk is still just kilobytes.

Configuration
UTM Version: 4.1.5 (74)
macOS Version: 13.2.1
Mac Chip (Intel, M1, ...): M1

# df -h
Filesystem                         Size  Used Avail Use% Mounted on
/dev/mapper/ubuntu--vg-ubuntu--lv   98G   17G   77G  18% /
/dev/vda2                          2.0G  129M  1.7G   8% /boot
/dev/vda1                          1.1G  6.4M  1.1G   1% /boot/efi
/dev/vdb1                          3.4T  227G  3.0T   7% /srv

config.plist.zip

@nerdlich
Copy link
Author

Realized that the additional images get copied to the UTM bundle. Is support for external disks planned, or is there a workaround?

@ktprograms
Copy link
Contributor

Wild guess, but if you add it as a removable drive, I think it won't copy the disk into the bundle. By default the UI switches the interface to USB when you enable Removable, but I think you can switch it to VirtIO and it'll still work fine.

@osy
Copy link
Contributor

osy commented Mar 4, 2023

We had some discussion about this in the past but the belief is that we only need to support the following use cases:

  1. All disk images are inside the bundle
  2. The bundle can be moved anywhere, including to external drives
  3. You can add removable disk images that are read-only (similar to CD drives) pointing to outside the bundle

We didn't think there was any use in supporting read-write images external to the bundle and supporting it would lead to confusion when the bundle is moved around. Can you explain what you are trying to achieve?

@nerdlich
Copy link
Author

nerdlich commented Mar 4, 2023

I understand your reasoning and it certainly makes sense in a desktop setting. My use case is a (semi) headless server with a virtual OS volume on the internal SSD and data and backup volumes intended to be on USB HDDs. I solved it now by sharing '/Volumes' via virtfs, which gives the VM access to 'Macintosh HD' too, but I choose to ignore that :)
I did not like that removable disks have to be reattached manually after restarting UTM or MacOS.

@osy osy added the enhancement New feature or request label Mar 4, 2023
@osy osy added this to the Future milestone Mar 5, 2023
@pmsjt
Copy link

pmsjt commented Apr 15, 2023

No, these cases are not sufficient. If all you needed were internal RW drives and external RO drives, then USB thumbdrives would not exist. Alas they do. They do because having external RW media is a thing.

I also want to point out that the UI does allow the selection of an external USB disk (not CD), but then it proceeds to ignore the setting and will translate that into a QEMU CD external drive regardless.

@osy osy modified the milestones: Future, v4.2 Apr 17, 2023
@osy osy closed this as completed in ff3dcc6 Apr 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants