mirror of
https://github.com/foxlet/macOS-Simple-KVM.git
synced 2024-11-24 03:59:41 +01:00
GNOME Boxes, SELinux, USB Tablet and reformat
This commit is contained in:
parent
e6c0b56fb7
commit
bb57b52b2c
2 changed files with 78 additions and 77 deletions
5
make.sh
5
make.sh
|
@ -21,7 +21,8 @@ error() {
|
||||||
}
|
}
|
||||||
|
|
||||||
generate(){
|
generate(){
|
||||||
sed -e "s|VMDIR|$VMDIR|g" -e "s|MACHINE|$MACHINE|g" tools/template.xml.in > $OUT
|
UUID=$( cat /proc/sys/kernel/random/uuid )
|
||||||
|
sed -e "s|VMDIR|$VMDIR|g" -e "s|UUID|$UUID|g" -e "s|MACHINE|$MACHINE|g" tools/template.xml.in > $OUT
|
||||||
echo "$OUT has been generated in $VMDIR"
|
echo "$OUT has been generated in $VMDIR"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -30,7 +31,7 @@ generate
|
||||||
argument="$1"
|
argument="$1"
|
||||||
case $argument in
|
case $argument in
|
||||||
-a|--add)
|
-a|--add)
|
||||||
sudo virsh define $OUT
|
virsh -c qemu:///session define $OUT
|
||||||
;;
|
;;
|
||||||
-h|--help)
|
-h|--help)
|
||||||
print_usage
|
print_usage
|
||||||
|
|
|
@ -1,113 +1,113 @@
|
||||||
<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
|
<domain type="kvm" xmlns:qemu="http://libvirt.org/schemas/domain/qemu/1.0">
|
||||||
<name>macOS-Simple-KVM</name>
|
<name>macOS-Simple-KVM</name>
|
||||||
<uuid>d06d502a-904a-4b34-847d-debf1a3d76c7</uuid>
|
<uuid>UUID</uuid>
|
||||||
<memory unit='KiB'>2097152</memory>
|
<title>macOS</title>
|
||||||
<currentMemory unit='KiB'>2097152</currentMemory>
|
<memory unit="KiB">2097152</memory>
|
||||||
<vcpu placement='static'>4</vcpu>
|
<currentMemory unit="KiB">2097152</currentMemory>
|
||||||
|
<vcpu placement="static">4</vcpu>
|
||||||
<os>
|
<os>
|
||||||
<type arch='x86_64' machine='MACHINE'>hvm</type>
|
<type arch="x86_64" machine="MACHINE">hvm</type>
|
||||||
<loader readonly='yes' type='pflash'>VMDIR/firmware/OVMF_CODE.fd</loader>
|
<loader readonly="yes" type="pflash">VMDIR/firmware/OVMF_CODE.fd</loader>
|
||||||
<nvram>VMDIR/firmware/OVMF_VARS-1024x768.fd</nvram>
|
<nvram>VMDIR/firmware/OVMF_VARS-1024x768.fd</nvram>
|
||||||
<boot dev='hd'/>
|
<boot dev="hd" />
|
||||||
</os>
|
</os>
|
||||||
<features>
|
<features>
|
||||||
<acpi />
|
<acpi />
|
||||||
<apic />
|
<apic />
|
||||||
<vmport state='off'/>
|
<vmport state="off" />
|
||||||
</features>
|
</features>
|
||||||
<cpu>
|
<cpu>
|
||||||
<topology sockets='1' cores='4' threads='1'/>
|
<topology sockets="1" cores="4" threads="1" />
|
||||||
</cpu>
|
</cpu>
|
||||||
<clock offset='utc'>
|
<clock offset="utc">
|
||||||
<timer name='rtc' tickpolicy='catchup'/>
|
<timer name="rtc" tickpolicy="catchup" />
|
||||||
<timer name='pit' tickpolicy='delay'/>
|
<timer name="pit" tickpolicy="delay" />
|
||||||
<timer name='hpet' present='no'/>
|
<timer name="hpet" present="no" />
|
||||||
</clock>
|
</clock>
|
||||||
<on_poweroff>destroy</on_poweroff>
|
<on_poweroff>destroy</on_poweroff>
|
||||||
<on_reboot>restart</on_reboot>
|
<on_reboot>restart</on_reboot>
|
||||||
<on_crash>destroy</on_crash>
|
<on_crash>destroy</on_crash>
|
||||||
<pm>
|
<pm>
|
||||||
<suspend-to-mem enabled='no'/>
|
<suspend-to-mem enabled="no" />
|
||||||
<suspend-to-disk enabled='no'/>
|
<suspend-to-disk enabled="no" />
|
||||||
</pm>
|
</pm>
|
||||||
<devices>
|
<devices>
|
||||||
<emulator>/usr/bin/qemu-system-x86_64</emulator>
|
<emulator>/usr/bin/qemu-system-x86_64</emulator>
|
||||||
<disk type='file' device='disk'>
|
<disk type="file" device="disk">
|
||||||
<driver name='qemu' type='qcow2'/>
|
<driver name="qemu" type="qcow2" />
|
||||||
<source file='VMDIR/ESP.qcow2'/>
|
<source file="VMDIR/ESP.qcow2" />
|
||||||
<target dev='sda' bus='sata'/>
|
<target dev="sda" bus="sata" />
|
||||||
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
|
<address type="drive" controller="0" bus="0" target="0" unit="0" />
|
||||||
</disk>
|
</disk>
|
||||||
<disk type='file' device='disk'>
|
<disk type="file" device="disk">
|
||||||
<driver name='qemu' type='raw'/>
|
<driver name="qemu" type="raw" />
|
||||||
<source file='VMDIR/BaseSystem.img'/>
|
<source file="VMDIR/BaseSystem.img" />
|
||||||
<target dev='sdb' bus='sata'/>
|
<target dev="sdb" bus="sata" />
|
||||||
<address type='drive' controller='0' bus='0' target='0' unit='1'/>
|
<address type="drive" controller="0" bus="0" target="0" unit="1" />
|
||||||
</disk>
|
</disk>
|
||||||
<controller type='usb' index='0' model='ich9-ehci1'>
|
<controller type="usb" index="0" model="ich9-ehci1">
|
||||||
<address type='pci' domain='0x0000' bus='0x00' slot='0x1d' function='0x7'/>
|
<address type="pci" domain="0x0000" bus="0x00" slot="0x1d" function="0x7" />
|
||||||
</controller>
|
</controller>
|
||||||
<controller type='usb' index='0' model='ich9-uhci1'>
|
<controller type="usb" index="0" model="ich9-uhci1">
|
||||||
<master startport='0'/>
|
<master startport="0" />
|
||||||
<address type='pci' domain='0x0000' bus='0x00' slot='0x1d' function='0x0' multifunction='on'/>
|
<address type="pci" domain="0x0000" bus="0x00" slot="0x1d" function="0x0" multifunction="on" />
|
||||||
</controller>
|
</controller>
|
||||||
<controller type='usb' index='0' model='ich9-uhci2'>
|
<controller type="usb" index="0" model="ich9-uhci2">
|
||||||
<master startport='2'/>
|
<master startport="2" />
|
||||||
<address type='pci' domain='0x0000' bus='0x00' slot='0x1d' function='0x1'/>
|
<address type="pci" domain="0x0000" bus="0x00" slot="0x1d" function="0x1" />
|
||||||
</controller>
|
</controller>
|
||||||
<controller type='usb' index='0' model='ich9-uhci3'>
|
<controller type="usb" index="0" model="ich9-uhci3">
|
||||||
<master startport='4'/>
|
<master startport="4" />
|
||||||
<address type='pci' domain='0x0000' bus='0x00' slot='0x1d' function='0x2'/>
|
<address type="pci" domain="0x0000" bus="0x00" slot="0x1d" function="0x2" />
|
||||||
</controller>
|
</controller>
|
||||||
<controller type='sata' index='0'>
|
<controller type="sata" index="0">
|
||||||
<address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
|
<address type="pci" domain="0x0000" bus="0x00" slot="0x1f" function="0x2" />
|
||||||
</controller>
|
</controller>
|
||||||
<interface type='network'>
|
<interface type="user">
|
||||||
<mac address='52:54:00:92:d4:7b'/>
|
<mac address="52:54:00:92:d4:7b" />
|
||||||
<source network='default'/>
|
<model type="e1000-82545em" />
|
||||||
<model type='e1000-82545em'/>
|
<address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x0" />
|
||||||
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
|
|
||||||
</interface>
|
</interface>
|
||||||
<serial type='pty'>
|
<serial type="pty">
|
||||||
<target type='isa-serial' port='0'>
|
<target type="isa-serial" port="0">
|
||||||
<model name='isa-serial'/>
|
<model name="isa-serial" />
|
||||||
</target>
|
</target>
|
||||||
</serial>
|
</serial>
|
||||||
<console type='pty'>
|
<console type="pty">
|
||||||
<target type='serial' port='0'/>
|
<target type="serial" port="0" />
|
||||||
</console>
|
</console>
|
||||||
<input type='mouse' bus='usb'>
|
<input type="tablet" bus="usb">
|
||||||
<address type='usb' bus='0' port='1'/>
|
<address type="usb" bus="0" port="1"/>
|
||||||
</input>
|
</input>
|
||||||
<input type='keyboard' bus='usb'>
|
<input type="keyboard" bus="usb">
|
||||||
<address type='usb' bus='0' port='2'/>
|
<address type="usb" bus="0" port="2" />
|
||||||
</input>
|
</input>
|
||||||
<graphics type='spice' autoport='yes'>
|
<graphics type="spice" autoport="yes">
|
||||||
<listen type='address'/>
|
<listen type="address" />
|
||||||
<image compression='off'/>
|
<image compression="off" />
|
||||||
</graphics>
|
</graphics>
|
||||||
<sound model='ich9'>
|
<sound model="ich9">
|
||||||
<address type='pci' domain='0x0000' bus='0x00' slot='0x1b' function='0x0'/>
|
<address type="pci" domain="0x0000" bus="0x00" slot="0x1b" function="0x0" />
|
||||||
</sound>
|
</sound>
|
||||||
<video>
|
<video>
|
||||||
<model type='qxl' ram='65536' vram='65536' vgamem='16384' heads='1' primary='yes'/>
|
<model type="vga" vram="131072" heads="1" primary="yes"/>
|
||||||
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
|
<address type="pci" domain="0x0000" bus="0x00" slot="0x01" function="0x0"/>
|
||||||
</video>
|
</video>
|
||||||
<redirdev bus='usb' type='spicevmc'>
|
<redirdev bus="usb" type="spicevmc">
|
||||||
<address type='usb' bus='0' port='3'/>
|
<address type="usb" bus="0" port="3" />
|
||||||
</redirdev>
|
</redirdev>
|
||||||
<redirdev bus='usb' type='spicevmc'>
|
<redirdev bus="usb" type="spicevmc">
|
||||||
<address type='usb' bus='0' port='4'/>
|
<address type="usb" bus="0" port="4" />
|
||||||
</redirdev>
|
</redirdev>
|
||||||
<memballoon model='none'/>
|
<memballoon model="none" />
|
||||||
</devices>
|
</devices>
|
||||||
|
<seclabel type="dynamic" model="selinux" relabel="yes"/>
|
||||||
<qemu:commandline>
|
<qemu:commandline>
|
||||||
<qemu:arg value='-cpu'/>
|
<qemu:arg value="-cpu" />
|
||||||
<qemu:arg value='Penryn,kvm=on,vendor=GenuineIntel,+invtsc,vmware-cpuid-freq=on,+pcid,+ssse3,+sse4.2,+popcnt,+avx,+aes,+xsave,+xsaveopt,check'/>
|
<qemu:arg value="Penryn,kvm=on,vendor=GenuineIntel,+invtsc,vmware-cpuid-freq=on,+pcid,+ssse3,+sse4.2,+popcnt,+avx,+aes,+xsave,+xsaveopt,check" />
|
||||||
<qemu:arg value='-device'/>
|
<qemu:arg value="-device" />
|
||||||
<qemu:arg value='isa-applesmc,osk=ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc'/>
|
<qemu:arg value="isa-applesmc,osk=ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc" />
|
||||||
<qemu:arg value='-smbios'/>
|
<qemu:arg value="-smbios" />
|
||||||
<qemu:arg value='type=2'/>
|
<qemu:arg value="type=2" />
|
||||||
</qemu:commandline>
|
</qemu:commandline>
|
||||||
</domain>
|
</domain>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue