这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@edigaryev
Copy link
Collaborator

To run this, create a tart.entitlements file:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>com.apple.security.virtualization</key>
	<true/>
</dict>
</plist>

Sign the tart binary:

codesign --sign - --entitlements tart.entitlements --force tart

@edigaryev edigaryev requested a review from fkorotkov February 11, 2022 14:43
Copy link
Contributor

@fkorotkov fkorotkov left a comment

Choose a reason for hiding this comment

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

I wonder if there is a need to store the Ram at all. VMs start super fast on my M1 Max so I wonder if we'll ever need the suspension mechanism at all and it seems it was causing only issues in Parallels and Anka (specifically the time and network portability).

var version: Int = 0
var ecid: VZMacMachineIdentifier
var hardwareModel: VZMacHardwareModel
var cpuCountMin: Int
Copy link
Contributor

Choose a reason for hiding this comment

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

Doesn't look like it's actually min. I was able to change it in the config from 2 to 4 and back. Every time VM was picking up the proper CPU count. I think it should be just cpuCoun.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

See 8375e3c.

var ecid: VZMacMachineIdentifier
var hardwareModel: VZMacHardwareModel
var cpuCountMin: Int
var memorySizeMin: UInt64
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here. Plus I think it's better to store it in Mb and not bytes. Easier for humans. 😅

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

See 8375e3c.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

As for the units, I believe the conversion should be implemented in the CLI itself, because we already have things like ecid and hardwareModel in the configuration file do not make it any easier for humans already.

}

func save(toURL: URL) throws {
try JSONEncoder().encode(self).write(to: toURL)
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's save it in a pretty format:

encoder.outputFormatting = .prettyPrinted

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

See 348d977.

Comment on lines 9 to 11
var configURL: URL { self.baseURL.appendingPathComponent("config") }
var diskURL: URL { self.baseURL.appendingPathComponent("disk") }
var nvramURL: URL { self.baseURL.appendingPathComponent("nvram") }
Copy link
Contributor

Choose a reason for hiding this comment

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

How about having config.json, disk.bin and ram.bin?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

See 6fc868e.

@edigaryev
Copy link
Collaborator Author

I wonder if there is a need to store the Ram at all. VMs start super fast on my M1 Max so I wonder if we'll ever need the suspension mechanism at all and it seems it was causing only issues in Parallels and Anka (specifically the time and network portability).

Are you talking about RAM size?

Because we're not storing the RAM itself at the moment.

@edigaryev edigaryev requested a review from fkorotkov February 14, 2022 14:06
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.

3 participants