mirror of
https://github.com/TrentSPalmer/trentdocs_website.git
synced 2024-12-26 19:32:50 -08:00
extend docs/misc_tips_troubleshooting.md with how to move lxd container
to another server
This commit is contained in:
parent
27b6330edd
commit
14649a2871
@ -25,6 +25,31 @@ for machine in (lxc list | grep RUNNING | awk '{print $2}') ; echo ; \
|
||||
echo $machine ; lxc exec $machine -- bash -c "who" ; end
|
||||
```
|
||||
|
||||
## Move LXD container to another Server
|
||||
|
||||
```bash
|
||||
# stop the container
|
||||
lxc stop <container name>
|
||||
# publish image of container to local *storage*
|
||||
lxc publish <container name> --alias <image name>
|
||||
# export the new image to tarball
|
||||
lxc image export <image name>
|
||||
# scp tarball to other box
|
||||
scp a4762b114fecee2e2bc227b9032405642c5286c02009babef7953e011e597bfe.tar.gz server:
|
||||
# on other box import the image
|
||||
lxc image import <tarball file name> --alias <image name>
|
||||
# launch container
|
||||
lxc launch <image name> <container name>
|
||||
# assign profile to container
|
||||
lxc profile assign <container name> <profile name>
|
||||
```
|
||||
|
||||
Shell into the new running container, update any network interface
|
||||
configurations that you need to, and then restart the container.
|
||||
|
||||
See also
|
||||
[LXD Container Home Server Networking For Dummies](lxd_container_home_server_networking_for_dummies.md)
|
||||
|
||||
## Ubuntu-Mate-Welcome-Center doesn't work some for some repos
|
||||
|
||||
Perhaps your apt-cacher-ng proxy server isn't configured to allow
|
||||
|
@ -228,5 +228,5 @@
|
||||
|
||||
<!--
|
||||
MkDocs version : 0.16.3
|
||||
Build Date UTC : 2017-07-24 10:16:29
|
||||
Build Date UTC : 2017-07-26 16:30:30
|
||||
-->
|
||||
|
@ -118,6 +118,8 @@
|
||||
|
||||
<li><a class="toctree-l3" href="#sending-commands-to-lxd-containers">Sending commands to LXD containers</a></li>
|
||||
|
||||
<li><a class="toctree-l3" href="#move-lxd-container-to-another-server">Move LXD container to another Server</a></li>
|
||||
|
||||
<li><a class="toctree-l3" href="#ubuntu-mate-welcome-center-doesnt-work-some-for-some-repos">Ubuntu-Mate-Welcome-Center doesn't work some for some repos</a></li>
|
||||
|
||||
</ul>
|
||||
@ -183,6 +185,27 @@ for machine in (lxc list | grep RUNNING | awk '{print $2}') ; echo ; \
|
||||
echo $machine ; lxc exec $machine -- bash -c "who" ; end
|
||||
</code></pre>
|
||||
|
||||
<h2 id="move-lxd-container-to-another-server">Move LXD container to another Server</h2>
|
||||
<pre><code class="bash"># stop the container
|
||||
lxc stop <container name>
|
||||
# publish image of container to local *storage*
|
||||
lxc publish <container name> --alias <image name>
|
||||
# export the new image to tarball
|
||||
lxc image export <image name>
|
||||
# scp tarball to other box
|
||||
scp a4762b114fecee2e2bc227b9032405642c5286c02009babef7953e011e597bfe.tar.gz server:
|
||||
# on other box import the image
|
||||
lxc image import <tarball file name> --alias <image name>
|
||||
# launch container
|
||||
lxc launch <image name> <container name>
|
||||
# assign profile to container
|
||||
lxc profile assign <container name> <profile name>
|
||||
</code></pre>
|
||||
|
||||
<p>Shell into the new running container, update any network interface
|
||||
configurations that you need to, and then restart the container.</p>
|
||||
<p>See also
|
||||
<a href="../lxd_container_home_server_networking_for_dummies/">LXD Container Home Server Networking For Dummies</a></p>
|
||||
<h2 id="ubuntu-mate-welcome-center-doesnt-work-some-for-some-repos">Ubuntu-Mate-Welcome-Center doesn't work some for some repos</h2>
|
||||
<p>Perhaps your apt-cacher-ng proxy server isn't configured to allow
|
||||
traffic through from https sources. Make sure the following is
|
||||
|
@ -437,7 +437,7 @@
|
||||
},
|
||||
{
|
||||
"location": "/misc_tips_troubleshooting/",
|
||||
"text": "Misc Tips, TroubleShooting\n\n\nSending commands to LXD containers\n\n\nUse \nbash -c \"<command>\"\n for commands with wildcards. i.e.\n\n\nfor machine in $(lxc list | grep RUNNING | awk '{print $2}') ;\\\n do lxc exec \"${machine}\" -- bash -c \"cat /etc/apt/apt.conf.d/02*\" ; done\n\n\n\n\nfish shell is actually a little bit cleaner\n\n\nfor machine in (lxc list | grep RUNNING | awk '{print $2}') ; \\\n lxc exec $machine -- bash -c \"cat /etc/apt/apt.conf.d/02*\" ; end\n\n\n\n\n# change all their time zones\nfor machine in (lxc list | grep RUNNING | awk '{print $2}') ; \\\n lxc exec $machine -- bash -c \"timedatectl set-timezone America/Los_Angeles\" ; end\n# check to see if anyone is logged in before rebooting\nfor machine in (lxc list | grep RUNNING | awk '{print $2}') ; echo ; \\\n echo $machine ; lxc exec $machine -- bash -c \"who\" ; end \n\n\n\n\nUbuntu-Mate-Welcome-Center doesn't work some for some repos\n\n\nPerhaps your apt-cacher-ng proxy server isn't configured to allow \ntraffic through from https sources. Make sure the following is\nuncommented. This applies for all PPA's that use https.\n\n\n# /etc/apt-cacher-ng/acng.conf\nPassThroughPattern: .*",
|
||||
"text": "Misc Tips, TroubleShooting\n\n\nSending commands to LXD containers\n\n\nUse \nbash -c \"<command>\"\n for commands with wildcards. i.e.\n\n\nfor machine in $(lxc list | grep RUNNING | awk '{print $2}') ;\\\n do lxc exec \"${machine}\" -- bash -c \"cat /etc/apt/apt.conf.d/02*\" ; done\n\n\n\n\nfish shell is actually a little bit cleaner\n\n\nfor machine in (lxc list | grep RUNNING | awk '{print $2}') ; \\\n lxc exec $machine -- bash -c \"cat /etc/apt/apt.conf.d/02*\" ; end\n\n\n\n\n# change all their time zones\nfor machine in (lxc list | grep RUNNING | awk '{print $2}') ; \\\n lxc exec $machine -- bash -c \"timedatectl set-timezone America/Los_Angeles\" ; end\n# check to see if anyone is logged in before rebooting\nfor machine in (lxc list | grep RUNNING | awk '{print $2}') ; echo ; \\\n echo $machine ; lxc exec $machine -- bash -c \"who\" ; end \n\n\n\n\nMove LXD container to another Server\n\n\n# stop the container\nlxc stop <container name>\n# publish image of container to local *storage*\nlxc publish <container name> --alias <image name>\n# export the new image to tarball\nlxc image export <image name>\n# scp tarball to other box\nscp a4762b114fecee2e2bc227b9032405642c5286c02009babef7953e011e597bfe.tar.gz server:\n# on other box import the image\nlxc image import <tarball file name> --alias <image name>\n# launch container\nlxc launch <image name> <container name>\n# assign profile to container\nlxc profile assign <container name> <profile name>\n\n\n\n\nShell into the new running container, update any network interface\nconfigurations that you need to, and then restart the container.\n\n\nSee also\n\nLXD Container Home Server Networking For Dummies\n\n\nUbuntu-Mate-Welcome-Center doesn't work some for some repos\n\n\nPerhaps your apt-cacher-ng proxy server isn't configured to allow \ntraffic through from https sources. Make sure the following is\nuncommented. This applies for all PPA's that use https.\n\n\n# /etc/apt-cacher-ng/acng.conf\nPassThroughPattern: .*",
|
||||
"title": "Misc Tips, Trouble Shooting"
|
||||
},
|
||||
{
|
||||
@ -450,6 +450,11 @@
|
||||
"text": "Use bash -c \"<command>\" for commands with wildcards. i.e. for machine in $(lxc list | grep RUNNING | awk '{print $2}') ;\\\n do lxc exec \"${machine}\" -- bash -c \"cat /etc/apt/apt.conf.d/02*\" ; done fish shell is actually a little bit cleaner for machine in (lxc list | grep RUNNING | awk '{print $2}') ; \\\n lxc exec $machine -- bash -c \"cat /etc/apt/apt.conf.d/02*\" ; end # change all their time zones\nfor machine in (lxc list | grep RUNNING | awk '{print $2}') ; \\\n lxc exec $machine -- bash -c \"timedatectl set-timezone America/Los_Angeles\" ; end\n# check to see if anyone is logged in before rebooting\nfor machine in (lxc list | grep RUNNING | awk '{print $2}') ; echo ; \\\n echo $machine ; lxc exec $machine -- bash -c \"who\" ; end",
|
||||
"title": "Sending commands to LXD containers"
|
||||
},
|
||||
{
|
||||
"location": "/misc_tips_troubleshooting/#move-lxd-container-to-another-server",
|
||||
"text": "# stop the container\nlxc stop <container name>\n# publish image of container to local *storage*\nlxc publish <container name> --alias <image name>\n# export the new image to tarball\nlxc image export <image name>\n# scp tarball to other box\nscp a4762b114fecee2e2bc227b9032405642c5286c02009babef7953e011e597bfe.tar.gz server:\n# on other box import the image\nlxc image import <tarball file name> --alias <image name>\n# launch container\nlxc launch <image name> <container name>\n# assign profile to container\nlxc profile assign <container name> <profile name> Shell into the new running container, update any network interface\nconfigurations that you need to, and then restart the container. See also LXD Container Home Server Networking For Dummies",
|
||||
"title": "Move LXD container to another Server"
|
||||
},
|
||||
{
|
||||
"location": "/misc_tips_troubleshooting/#ubuntu-mate-welcome-center-doesnt-work-some-for-some-repos",
|
||||
"text": "Perhaps your apt-cacher-ng proxy server isn't configured to allow \ntraffic through from https sources. Make sure the following is\nuncommented. This applies for all PPA's that use https. # /etc/apt-cacher-ng/acng.conf\nPassThroughPattern: .*",
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
<url>
|
||||
<loc>/</loc>
|
||||
<lastmod>2017-07-24</lastmod>
|
||||
<lastmod>2017-07-26</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
|
||||
<url>
|
||||
<loc>/apt_pinning_artful_aardvark_packages_in_xenial_xerus/</loc>
|
||||
<lastmod>2017-07-24</lastmod>
|
||||
<lastmod>2017-07-26</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
|
||||
<url>
|
||||
<loc>/lxd_container_home_server_networking_for_dummies/</loc>
|
||||
<lastmod>2017-07-24</lastmod>
|
||||
<lastmod>2017-07-26</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
|
||||
@ -28,7 +28,7 @@
|
||||
|
||||
<url>
|
||||
<loc>/how_to_reassign_a_static_ip_address_with_dnsmasq/</loc>
|
||||
<lastmod>2017-07-24</lastmod>
|
||||
<lastmod>2017-07-26</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
|
||||
@ -36,7 +36,7 @@
|
||||
|
||||
<url>
|
||||
<loc>/serve_and_share_apps_from_your_phone_with_fdroid/</loc>
|
||||
<lastmod>2017-07-24</lastmod>
|
||||
<lastmod>2017-07-26</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
|
||||
@ -44,7 +44,7 @@
|
||||
|
||||
<url>
|
||||
<loc>/nspawn/</loc>
|
||||
<lastmod>2017-07-24</lastmod>
|
||||
<lastmod>2017-07-26</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
|
||||
@ -52,7 +52,7 @@
|
||||
|
||||
<url>
|
||||
<loc>/mastodon_on_arch/</loc>
|
||||
<lastmod>2017-07-24</lastmod>
|
||||
<lastmod>2017-07-26</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
|
||||
@ -60,7 +60,7 @@
|
||||
|
||||
<url>
|
||||
<loc>/debian_nspawn_container_on_arch_for_testing_apache_configurations/</loc>
|
||||
<lastmod>2017-07-24</lastmod>
|
||||
<lastmod>2017-07-26</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
|
||||
@ -68,7 +68,7 @@
|
||||
|
||||
<url>
|
||||
<loc>/dynamic_cacheing_nginx_reverse_proxy_for_pacman/</loc>
|
||||
<lastmod>2017-07-24</lastmod>
|
||||
<lastmod>2017-07-26</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
|
||||
@ -76,7 +76,7 @@
|
||||
|
||||
<url>
|
||||
<loc>/freebsd_jails_on_freenas/</loc>
|
||||
<lastmod>2017-07-24</lastmod>
|
||||
<lastmod>2017-07-26</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
|
||||
@ -84,7 +84,7 @@
|
||||
|
||||
<url>
|
||||
<loc>/arch_redis_nspawn/</loc>
|
||||
<lastmod>2017-07-24</lastmod>
|
||||
<lastmod>2017-07-26</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
|
||||
@ -92,7 +92,7 @@
|
||||
|
||||
<url>
|
||||
<loc>/arch_postgresql_nspawn/</loc>
|
||||
<lastmod>2017-07-24</lastmod>
|
||||
<lastmod>2017-07-26</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
|
||||
@ -100,7 +100,7 @@
|
||||
|
||||
<url>
|
||||
<loc>/misc_tips_troubleshooting/</loc>
|
||||
<lastmod>2017-07-24</lastmod>
|
||||
<lastmod>2017-07-26</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
|
||||
@ -108,7 +108,7 @@
|
||||
|
||||
<url>
|
||||
<loc>/self_signed_certs/</loc>
|
||||
<lastmod>2017-07-24</lastmod>
|
||||
<lastmod>2017-07-26</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user