diff -Nur nvwa/0009-improve-criu-prepare-opration.patch obs_nvwa/0009-improve-criu-prepare-opration.patch
--- nvwa/0009-improve-criu-prepare-opration.patch	1970-01-01 08:00:00.000000000 +0800
+++ obs_nvwa/0009-improve-criu-prepare-opration.patch	2022-10-19 22:32:39.000000000 +0800
@@ -0,0 +1,74 @@
+From 4e5eaef3c13a6be4a2119d8ae9314bee2b983ddf Mon Sep 17 00:00:00 2001
+From: Jingxian He <hejingxian@huawei.com>
+Date: Fri, 14 Oct 2022 21:19:02 +0800
+Subject: [PATCH] improve-criu-prepare-opration
+
+---
+ config/nvwa-restore.yaml |  4 ++--
+ misc/nvwa-pre.sh         | 10 +++++++---
+ src/server.go            |  2 +-
+ 3 files changed, 10 insertions(+), 6 deletions(-)
+
+diff --git a/config/nvwa-restore.yaml b/config/nvwa-restore.yaml
+index ab97121..6141ce4 100644
+--- a/config/nvwa-restore.yaml
++++ b/config/nvwa-restore.yaml
+@@ -1,6 +1,6 @@
+ pids:
+ services:
+ restore_net: false
+-enable_quick_kexec: false
++enable_quick_kexec: true
+ enable_pin_memory: false
+-enable_use_fork_pid: false
++enable_use_fork_pid: true
+diff --git a/misc/nvwa-pre.sh b/misc/nvwa-pre.sh
+index 69f6de9..57c11b4 100644
+--- a/misc/nvwa-pre.sh
++++ b/misc/nvwa-pre.sh
+@@ -1,6 +1,6 @@
+ #!/bin/bash
+ 
+-set -e
++#set -e
+ 
+ # 1. Increase last pid by 2011 from saved last pid.
+ #    So services restoring may use its old pid.
+@@ -24,7 +24,7 @@ if [ "${NEED_RESTORE}" != "0" ]; then
+ 		last_pid="$(cat ${LAST_PID_FILE})"
+ 	fi
+ 
+-	new_last_pid="$(expr \( ${last_pid} + 2011 \) % ${MAX_PID})"
++	new_last_pid="$(expr \( ${last_pid} + 5011 \) % ${MAX_PID})"
+ 	echo "${new_last_pid}" > "${LAST_PID_SAVE_FILE}"
+ 	echo "${new_last_pid}" > "${LAST_PID_FILE}"
+ else
+@@ -33,7 +33,11 @@ fi
+ 
+ # 2. Enable Pin Memory
+ modprobe pin_memory
+-/usr/bin/nvwa-pin --init-pagemap-read
++modprobe nf_tables
++is_x86="$(uname -a | grep x86_64)"
++if [[ $is_x86"X" == "X" ]]; then
++	/usr/bin/nvwa-pin --init-pagemap-read
++fi
+ 
+ # 3. Enable PMEM
+ grep -q "Persistent Memory" /proc/iomem || exit 0
+diff --git a/src/server.go b/src/server.go
+index 4e03339..ccfc009 100644
+--- a/src/server.go
++++ b/src/server.go
+@@ -231,7 +231,7 @@ func loadCmdline() (string, error) {
+ }
+ 
+ func getCriuExtPara() []string {
+-	criuExtPara := []string{"--shell-job", "--enable-external-masters", "--skip-in-flight"}
++	criuExtPara := []string{"--shell-job", "--enable-external-masters", "--skip-in-flight", "--use-nft"}
+ 
+ 	enablePM := nvwaRestoreConfig.GetBool("enable_pin_memory")
+ 	if enablePM {
+-- 
+2.33.0
+
diff -Nur nvwa/0010-add-nvwa-deploy-script.patch obs_nvwa/0010-add-nvwa-deploy-script.patch
--- nvwa/0010-add-nvwa-deploy-script.patch	1970-01-01 08:00:00.000000000 +0800
+++ obs_nvwa/0010-add-nvwa-deploy-script.patch	2022-10-20 11:16:37.000000000 +0800
@@ -0,0 +1,32 @@
+From b128450e67afd6925f04c39f47b9ae8c7c15e67a Mon Sep 17 00:00:00 2001
+From: Jingxian He <hejingxian@huawei.com>
+Date: Wed, 19 Oct 2022 20:11:53 +0800
+Subject: [PATCH] add nvwa deploy script
+
+---
+ misc/nvwa-deploy.sh | 10 ++++++++++
+ 1 file changed, 10 insertions(+)
+ create mode 100644 misc/nvwa-deploy.sh
+
+diff --git a/misc/nvwa-deploy.sh b/misc/nvwa-deploy.sh
+new file mode 100644
+index 0000000..a6fc8cd
+--- /dev/null
++++ b/misc/nvwa-deploy.sh
+@@ -0,0 +1,13 @@
++#!/bin/bash
++
++PROC_NAME=$1
++
++CFG_FILE="/etc/nvwa/nvwa-restore.yaml"
++PROC_PID=`pidof $PROC_NAME`
++PID_STR="pids: $PROC_PID"
++OLD_PID_STR=`sed -n '/^pids:/p' $CFG_FILE`
++
++sed -i "s/$OLD_PID_STR/$PID_STR/g" $CFG_FILE
++
++systemctl stop firewalld
++systemctl disable firewalld
+-- 
+2.33.0
+
diff -Nur nvwa/nvwa.spec obs_nvwa/nvwa.spec
--- nvwa/nvwa.spec	2022-11-02 15:28:55.914058819 +0800
+++ obs_nvwa/nvwa.spec	2022-10-20 11:16:37.000000000 +0800
@@ -1,6 +1,6 @@
 Name:           nvwa
 Version:        0.1
-Release:        6
+Release:        10
 Summary:        a tool used for openEuler kernel update
 
 License:        MulanPSL-2.0 and Apache-2.0 and MIT and MPL-2.0
@@ -15,6 +15,8 @@
 Patch6:         0006-pin-move-pin-from-tools-to-tools-pin.patch
 Patch7:		0007-add-support-for-nginx-service-dump-restore.patch
 Patch8:         0008-restore-pid-file-after-restore-from-systemd.patch
+Patch9:         0009-improve-criu-prepare-opration.patch
+Patch10:        0010-add-nvwa-deploy-script.patch
 
 BuildRequires:  golang >= 1.13
 Requires:       kexec-tools criu
@@ -54,6 +56,7 @@
 install -m 0640 %{_builddir}/%{name}-v%{version}/config/%{name}-server.yaml %{buildroot}/etc/%{name}/
 
 install -m 0750 %{_builddir}/%{name}-v%{version}/misc/%{name}-pre.sh %{buildroot}/%{_bindir}/
+install -m 0750 %{_builddir}/%{name}-v%{version}/misc/%{name}-deploy.sh %{buildroot}/%{_bindir}/
 install -m 0644 %{_builddir}/%{name}-v%{version}/misc/%{name}.service %{buildroot}/usr/lib/systemd/system
 install -m 0644 %{_builddir}/%{name}-v%{version}/misc/%{name}-pre.service %{buildroot}/usr/lib/systemd/system
 
@@ -80,26 +83,36 @@
 %{_bindir}/%{name}
 %{_bindir}/%{name}-pin
 %{_bindir}/%{name}-pre.sh
+%{_bindir}/%{name}-deploy.sh
 
 %changelog
-* Fri Aug 06 2021 anatasluo <luolongjuna@gmail.com> - 0.1-6
+* Wed Oct 19 2022 fu.lin <fulin10@huawei.com> - 0.1-9
+- add nvwa deploy script
+
+* Tue 18 Oct 2022 fu.lin <fulin10@huawei.com> - 0.1-8
+- script: add module action in nvwa-pre
+
+* Mon 17 Oct 2022 fu.lin <fulin10@huawei.com> - 0.1-7
+- fix bugs
+
+* Fri 06 Aug 2021 anatasluo <luolongjuna@gmail.com> - 0.1-6
 - Add "--skip-in-flight" for criu dump/restore
 - restore pid file after restore from systemd
 
-* Sat Jul 31 2021 anatasluo <luolongjuna@gmail.com> - 0.1-5
+* Sat 31 Jul 2021 anatasluo <luolongjuna@gmail.com> - 0.1-5
 - Add necessary patches from version 0.2
 - Do kexec before criu dump
 - Change nvwa socket location
 - Add x for kexec
 - Change pin location 
 
-* Mon Jul 26 2021 anatasluo <luolongjuna@gmail.com> - 0.1-4
+* Mon 26 Jul 2021 anatasluo <luolongjuna@gmail.com> - 0.1-4
 - Add use fork pid support for kernel 4.19
 
-* Fri Mar 19 2021 snoweay <snoweay@163.com> - 0.1-3
+* Fri 19 Mar 2021 snoweay <snoweay@163.com> - 0.1-3
 - Add secure compile args.
 
-* Thu Mar 18 2021 anatasluo <luolongjun@huawei.com>
+* Thu 18 Mar 2021 anatasluo <luolongjun@huawei.com>
 - Update to 0.1-r2
 * Thu Feb 18 2021 anatasluo <luolongjun@huawei.com>
 - Update to 0.0.1
