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

Support customizing VM disks and mounting remote VMs in tart run #847

Merged
merged 3 commits into from
Jul 2, 2024

Conversation

edigaryev
Copy link
Collaborator

To create a VM with a custom disk:

tart create --linux xcode-16.0
tart set --disk <path to DMG> xcode-16.0

To mount this VM after pushing (and pulling it):

tart run --disk ghcr.io/cirruslabs/xcode:16.0 <VM>

@edigaryev edigaryev requested a review from fkorotkov as a code owner June 25, 2024 14:28
@edigaryev edigaryev requested a review from fkorotkov June 25, 2024 16:00
// Unfortunately, VZDiskImageStorageDeviceAttachment does not support
// FileHandle, so we can't easily clone the disk, open it and unlink(2)
// to simplify the garbage collection, so use an intermediate directory.
let clonedDiskURL = try Config().tartTmpDir.appendingPathComponent("run-disk-\(UUID().uuidString)")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we skip it in ro mode?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Answered in #847 (comment).

@edigaryev edigaryev requested a review from fkorotkov June 27, 2024 14:19
@edigaryev edigaryev merged commit 5eccdf7 into main Jul 2, 2024
6 checks passed
@edigaryev edigaryev deleted the remote-vms-as-disks branch July 2, 2024 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants