Split out generic machine operations from QEMU module