QUICK SOLUTION FOR INTERMITTENT SOUND WITH CRACKLING ON VIRTUAL MACHINE WITH WINDOWS 10 OPERATING SYSTEM
If you are using the built in sound card and an intermittent crackling sound is heard at the output do the following steps:
STEP 1. Use VirtManager and make sure that the virtual machine was shut off
STEP 2. From the Virtual Machine Manager Edit menu, select Virtual Machine Details
STEP 3. To access the virtual hardware details window, click the icon (bulb) in the toolbar
STEP 4. From the side panel, select CPUs and set the number of vCPUs to half the number of CPUs of the logical host. For example, vCPU allocation: 2 if Logical Host CPUs: 4
STEP 5. From the side panel, select Sound ich9 and set HDA (ICH6) or HDA (ICH9) model
STEP 6. Press the apply button
STEP 7. Run the guest virtual machine.
Normally, Windows 10 will automatically search and install driver for devices installed on the guest virtual machine. You can try to look for missing drivers by downloading the ISO image with virtIO drivers.
NOTE 1. If the problem is solved but occurs when using some programs, see TROUBLESHOOTING from this GUIDE, namely: My guest machine freezes consequently my USB audio interface crashing (for passthrough solution using an additional PCIe Gen3 x4 USB 3.2 card).
Troubleshooting has been tested on an USB audio interface, but should be suitable for built in sound card as well.
NOTE 2. If you are a musician and you want more productivity, most likely you will need an USB audio interface and additional PCIe devices (PCIe card passthrough solution).