foxlet / macOS-Simple-KVM

Tools to set up a quick macOS VM in QEMU, accelerated by KVM.
13.56k stars 1.14k forks source link

Make MacOS see virtual disk as SSD #565

Open 512yottabytes opened 2 years ago

512yottabytes commented 2 years ago

Hello, Not an issue, but may be useful and I think it's good to add to the template:

  <qemu:commandline>
    <qemu:arg value='-set'/>
    <qemu:arg value='device.sata0-0-1.rotation_rate=1'/>`
    ...
  </qemu:commandline>

And also discard="unmap" to the disk configuration. My example:

<disk type="file" device="disk">
  <driver name="qemu" type="raw" cache="writeback" io="threads" discard="unmap"/>
  <source file="/var/lib/libvirt/images/macos_12_template_root.img" index="2"/>
  <backingStore/>
  <target dev="sdb" bus="sata"/>
  <boot order="2"/>
  <alias name="sata0-0-1"/>
  <address type="drive" controller="0" bus="0" target="0" unit="1"/>
</disk>

I've tried and it really works.

notAperson535 commented 2 years ago

@512yottabytes looks interesting. Please create a PR on My Repository to add this