Docs · 参考

设置参考

可用 `1vm get` 读取、`1vm set` 修改的每个点分键。

机器定义是可直读的 JSON 文件,每项设置都有点分键。

1vm config dev              # the whole definition
1vm get dev                 # list every available key
1vm get dev network.mode    # read one
1vm set dev network.mode nat

设置在写入时验证,而非启动时——无效值会立即失败并给出原因,而不是凌晨 3 点 启动时才报错。引擎支持在运行中修改的设置会即时生效,否则下次启动生效。 运行中的机器默认拒绝硬件变更,除非设置明确说明支持。

Machine

KeyNotes
cpuCountVirtual CPUs
memorye.g. 8GiB
diskSizeA ceiling; the disk is sparse
macAddressThe guest's MAC
clipboardSharingBoth directions. Linux needs spice-vdagent; macOS guests cannot
rosettax86 translation in a Linux guest, Virtualization.framework only

Network

KeyNotes
network.modenat, host-only, or bridged:en0
portForwards.adde.g. tcp:2222:22
portForwards.removeSame form

Shared folders

KeyNotes
sharedFolders.addtag=projects path=~/Projects
sharedFolders.removeBy tag

Graphics

KeyNotes
graphics.resolutionGuest display size
graphics.displaysNumber of heads
graphics.hiDPIRetina scaling
graphics.accelerationWhere the engine and guest support it

Input

KeyNotes
input.commandKeyWhat ⌘ sends to the guest
input.optionKeyWhat ⌥ sends
input.translateMacShortcutsMap Mac shortcuts to guest equivalents
input.translateOptionArrowsWord-wise cursor movement
input.captureSystemShortcutsLet the guest take system shortcuts
input.matchHostKeyboardLayoutFollow the Mac's layout
input.keyboardProfileKeyboard model presented to the guest
input.mousePointer device type
input.releaseChordThe keys that release keyboard capture

SSH

KeyNotes
ssh.accessEnable or disable Mac-to-guest SSH
ssh.disableTurn it off
ssh.usersWhich guest users are reachable
ssh.hostPortHost-side port
ssh.aliasName used in ~/.ssh/config
ssh.identity / ssh.identityFileKey selection
ssh.passwordAuthenticationAllow password auth

关于不可用设置

Mac 或所选引擎不支持的选项会保持可见并禁用,同时给出原因,而不是 消失。消失的选项教不会你任何东西;会自我说明的选项告诉你换引擎或换 Mac 是否会改变结果。