The invention relates to a stateful service container thermal migration method based on memory compaction transmission. The method comprises the following steps of 1, environment creation, wherein resources and status information needed by the LXC container virtualization environment are isolated, the resources and the status information are saved in a picture mode, and freezing treatment is performed on an LXC container; the LXC container virtualization environment is isolated from a Linux kernel, the LXC container virtualization environment is saved through a namespace mechanism, and the process is recovered; 2, thermal migration, wherein memory page migration is copied, and a memory page is migrated. According to the method, redundant data transmission is lowered, the dynamic migrationefficiency is improved, the steps are simplified, and operation is convenient.