I wanted to create a "clean" Windows 7 image so I created a VM with a "Not Attached" NIC. I tried to create the image many times. The VM always ended up freezing somewhere in the process of installing additional software. However, to reproduce the issue it's sufficient to just install Windows and let it idle on the desktop.
When the VM freezes, it uses 100% CPU. The screen is stuck, and it doesn't react to Ctrl-Alt-Del or ACPI shutdown. In gdb I can that it's the "EMT" thread using CPU. I wasn't able to single-step thru the code because I seemed to trigger some VirtualBox watchdog. In strace the EMT thread is mostly doing a ton of "ioctl(4, _IOC(0, 0x56, 0xc1, 0x00), 0) = 0" to run the VCPU. I think VirtualBox makes the guest's E1000 driver misbehave, freezing the guest.
I have tried a few things:
- Different NIC fixes the problem (PCnet-FAST III)
- Creating an empty Linux bridge and attaching the E1000 NIC fixes the problem
- Creating a Ubuntu Live-CD VM. It did not freeze, but the e1000 driver complains a lot about "Detected Tx Unit Hang" (see attached log).
System Info:
- VirtualBox 5.2.18 from the virtualbox,org repository. When debugging I used VirtualBox-5.2.18.tar.bz2 to get debug symbols.
- Freezes with and without Guest Additions installed in the guest. With GA the log ends with "VMMDev: vmmDevHeartbeatFlatlinedTimer: Guest seems to be unresponsive. Last heartbeat received 4 seconds ago".
- Host: Debian 9, 32GB RAM
- Guest: Windows 7 SP1, 2GB RAM