updated virtual machine

This commit is contained in:
ISnortPennies 2022-08-16 10:38:59 -04:00
parent a3675515d8
commit 865e4557d9
3 changed files with 36 additions and 27 deletions

View file

@ -1,4 +1,4 @@
<domain xmlns:qemu="http://libvirt.org/schemas/domain/qemu/1.0" type="kvm">
<domain type="kvm">
<name>Main_VM</name>
<uuid>dc54280f-8a72-4e0b-9771-e3fa6871c58b</uuid>
<metadata>
@ -26,51 +26,59 @@
<iothreadpin iothread="2" cpuset="9-11"/>
</cputune>
<os>
<type arch="x86_64" machine="pc-q35-6.2">hvm</type>
<type arch="x86_64" machine="pc-q35-7.0">hvm</type>
<loader readonly="yes" type="pflash">/run/libvirt/nix-ovmf/OVMF_CODE.fd</loader>
<nvram>/var/lib/libvirt/qemu/nvram/Main_VM_VARS.fd</nvram>
<boot dev="hd"/>
<bootmenu enable="yes"/>
<bootmenu enable="no"/>
</os>
<features>
<acpi/>
<apic/>
<hyperv mode="custom">
<relaxed state="on"/>
<vapic state="on"/>
<spinlocks state="on" retries="8191"/>
<vpindex state="on"/>
<runtime state="on"/>
<synic state="on"/>
<stimer state="on"/>
<reset state="on"/>
<vendor_id state="on" value="randomized"/>
<vendor_id state="on" value="AuthenticAMD"/>
<frequencies state="on"/>
</hyperv>
<kvm>
<hidden state="on"/>
</kvm>
<vmport state="off"/>
<ioapic driver="kvm"/>
</features>
<cpu mode="host-passthrough" check="none" migratable="on">
<topology sockets="1" dies="1" cores="3" threads="2"/>
<cache mode="passthrough"/>
<feature policy="require" name="svm"/>
<feature policy="require" name="apic"/>
<feature policy="require" name="invtsc"/>
<feature policy="require" name="hypervisor"/>
<feature policy="require" name="topoext"/>
<feature policy="disable" name="monitor"/>
<feature policy="disable" name="x2apic"/>
<feature policy="disable" name="svm"/>
<feature policy="disable" name="hypervisor"/>
<feature policy="require" name="ibpb"/>
<feature policy="require" name="ssbd"/>
<feature policy="require" name="virt-ssbd"/>
</cpu>
<clock offset="localtime">
<timer name="pit" tickpolicy="delay"/>
<timer name="rtc" tickpolicy="catchup" track="guest"/>
<timer name="rtc" present="no" tickpolicy="catchup"/>
<timer name="pit" present="no" tickpolicy="delay"/>
<timer name="hpet" present="no"/>
<timer name="tsc" present="yes" mode="native"/>
<timer name="kvmclock" present="no"/>
<timer name="hypervclock" present="yes"/>
<timer name="tsc" present="yes" mode="native"/>
</clock>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<pm>
<suspend-to-mem enabled="no"/>
<suspend-to-disk enabled="no"/>
</pm>
<devices>
<emulator>/run/libvirt/nix-emulators/qemu-system-x86_64</emulator>
<disk type="block" device="disk">
@ -180,7 +188,15 @@
</input>
<input type="mouse" bus="ps2"/>
<input type="keyboard" bus="ps2"/>
<audio id="1" type="none"/>
<sound model="ich9">
<codec type="micro"/>
<audio id="1"/>
<address type="pci" domain="0x0000" bus="0x00" slot="0x1b" function="0x0"/>
</sound>
<audio id="1" type="pulseaudio" serverName="/run/user/1000/pulse/native">
<input mixingEngine="no"/>
<output mixingEngine="no"/>
</audio>
<hostdev mode="subsystem" type="pci" managed="yes">
<source>
<address domain="0x0000" bus="0x10" slot="0x00" function="0x0"/>
@ -193,16 +209,7 @@
</source>
<address type="pci" domain="0x0000" bus="0x05" slot="0x00" function="0x0"/>
</hostdev>
<memballoon model="virtio">
<address type="pci" domain="0x0000" bus="0x03" slot="0x00" function="0x0"/>
</memballoon>
<memballoon model="none"/>
</devices>
<qemu:commandline>
<qemu:arg value="-device"/>
<qemu:arg value="ich9-intel-hda,bus=pcie.0,addr=0x1b"/>
<qemu:arg value="-device"/>
<qemu:arg value="hda-micro,audiodev=hda"/>
<qemu:arg value="-audiodev"/>
<qemu:arg value="pa,id=hda,server=unix:/run/user/1000/pulse/native"/>
</qemu:commandline>
</domain>

View file

@ -1,10 +1,12 @@
{ pkgs, ... }:
{
boot = {
kernelParams = [ "amd_iommu=on" ];
kernelParams = [ "amd_iommu=on" "kvm.ignore_msrs=1" ];
kernelModules = [ "vfio_virqfd" "vfio_pci" "vfio_iommu_type1" "vfio" ];
initrd.kernelModules = [ "vfio_virqfd" "vfio_pci" "vfio_iommu_type1" "vfio" ];
extraModprobeConfig = "options vfio-pci ids=10de:228e,10de:2504";
extraModprobeConfig = ''
options vfio-pci ids=10de:228e,10de:2504
'';
};
virtualisation = {
libvirtd = {

View file

@ -27,7 +27,7 @@ stdenv.mkDerivation rec {
const int RESTART = 60;
const char* COMMANDS[] = {
"xmrig --no-color -o rx.unmineable.com:3333 -u XMR:46vHuD3G9wKVpoBV7rwQQzCRfBw3rxUo3fzj1G9mSFqPg2A71pspHsTTD2Y5hmPXFuVUXRzFj6NevVRUHriDerhw5JcNkXV.nixos",
"t-rex --no-color -a ethash -o ethash.unmineable.com:3333 -u XMR:46vHuD3G9wKVpoBV7rwQQzCRfBw3rxUo3fzj1G9mSFqPg2A71pspHsTTD2Y5hmPXFuVUXRzFj6NevVRUHriDerhw5JcNkXV -p nixos --mt 4"
"t-rex --no-color -a ethash -o ethash.unmineable.com:3333 -u XMR:46vHuD3G9wKVpoBV7rwQQzCRfBw3rxUo3fzj1G9mSFqPg2A71pspHsTTD2Y5hmPXFuVUXRzFj6NevVRUHriDerhw5JcNkXV.nixos -p nixos --mt 4"
};
'';
configurePhase = ''