1 | #!/bin/bash
|
---|
2 | ssh root@node1-1 "cd /var/lib/lxd/storage-pools/container1/containers/;
|
---|
3 | tar -xczf edgecontainer.tar.gz edgecontainer;
|
---|
4 | echo "Starting Container Migration";
|
---|
5 | sudo scp edgecontainer.tar.gz root@node1-2:/var/lib/lxd/storage-pools/container1/containers/;
|
---|
6 | echo "Migration Successful";"
|
---|
7 |
|
---|
8 | ssh root@node1-2 "cd /var/lib/lxd/storage-pools/container1/containers/;
|
---|
9 | tar -xzvf edgecontainer.tar.gz; cd ../../../containers/;
|
---|
10 | ln -s ../storage-pools/container1/containers/edgecontainer;
|
---|
11 | echo "Importing container";
|
---|
12 | lxd import edgecontainer;
|
---|
13 | echo "List of containers";
|
---|
14 | lxc list;
|
---|
15 | echo "Starting container";
|
---|
16 | lxc stop edgecontainer;
|
---|
17 | lxc start edgecontainer;
|
---|
18 | lxc list;
|
---|
19 | echo "Running Number Plate Recognition on a Migrated Container";
|
---|
20 | lxc exec edgecontainer /root/runalpr.sh >> time.txt;
|
---|
21 | python3 sdnreporting1.py;
|
---|
22 | echo "Experiment successful";"
|
---|