Skip to content

Commit

Permalink
refactor(vfkit): add random number generator (#36)
Browse files Browse the repository at this point in the history
In Apple ARM machines, if the entropy in the virtual machine is insufficient, it will cause mkfs.btrfs to be very slow (taking approximately 6~12 seconds). It will be much faster (less than 1 second) by passing the entropy from the host machine to the virtual machine.

Signed-off-by: Black-Hole1 <[email protected]>
  • Loading branch information
BlackHole1 authored Dec 13, 2023
1 parent 31f9617 commit e1fcb05
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/darwin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,7 @@ export class DarwinOVM {
...Mount.toVFKit(),
"--device", `virtio-blk,path=${this.options.targetDir}/tmp.img`,
"--device", `virtio-blk,path=${this.options.targetDir}/data.img`,
"--device", "virtio-rng",
"--disable-orphan-process",
], {
timeout: 0,
Expand Down

0 comments on commit e1fcb05

Please sign in to comment.