{"id":1735,"date":"2020-09-19T16:17:17","date_gmt":"2020-09-19T21:17:17","guid":{"rendered":"http:\/\/zitstif.no-ip.org\/?p=1735"},"modified":"2020-09-19T17:44:32","modified_gmt":"2020-09-19T22:44:32","slug":"portable-virtual-lab-that-fits-in-your-pocket","status":"publish","type":"post","link":"http:\/\/zitstif.no-ip.org\/?p=1735","title":{"rendered":"Portable virtual lab that fits in your pocket"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" class=\"\" src=\"https:\/\/image-us.samsung.com\/SamsungUS\/home\/computing\/memory-and-storage\/usb-flash-drives\/pd\/muf-256be4-am\/gallery\/03_MUF-256BE4_R-Perspective_Titan-Gray041918042018.jpg?$product-details-jpg$\" alt=\"USB 3.1 Flash Drive BAR Plus 256GB Titan Gray Memory &amp; Storage - MUF-256BE4\/AM | Samsung US\" width=\"331\" height=\"249\" \/><\/p>\n<p>Storage continues to get cheaper and cheaper. Above is a picture of a SAMSUNG BAR Plus flash drive. I was able to find one used on eBay for about $30 which has 256GB storage capacity.<\/p>\n<p>My goal was to have a portable Linux distro that&#8217;s persistent on a larger capacity flash drive which I can use to run virtual machines on and containers. While I&#8217;m not opposed to *BSD derivatives and even took some time to test out <a href=\"https:\/\/nomadbsd.org\/\" target=\"_blank\" rel=\"noopener noreferrer\">NomadBSD<\/a>, I wanted to have an operating system that is more flexible and has more hardware support. I decided to go with Linux Mint XFCE. This means the flash drive can work in legacy bios systems and UEFI systems (provided secure boot is disabled).\u00a0 To make the persistent Linux USB drive, I used this guide: <a href=\"https:\/\/www.howtogeek.com\/howto\/14912\/create-a-persistent-bootable-ubuntu-usb-flash-drive\/\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/www.howtogeek.com\/howto\/14912\/create-a-persistent-bootable-ubuntu-usb-flash-drive\/<\/a> .<\/p>\n<p>A majority of computers for the past 20 years support virtualization. Granted, there are some rare systems that don&#8217;t support virtualization. (You can still install VirtualBox and have 32bit based guest operating systems.) My love and interest of type 1 hypervisors has lead me to experiment with hypervisors from different vendors. Linux KVM which has been around for 13 years, has become reliable and stable enough for production environments. To get Linux KVM up and running on my flash drive under Linux Mint, I simply used this tutorial: <a href=\"https:\/\/community.linuxmint.com\/tutorial\/view\/1727\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/community.linuxmint.com\/tutorial\/view\/1727<\/a>. Then to get have a nice web based gui to work with Linux KVM, I installed <a href=\"https:\/\/cockpit-project.org\/\" target=\"_blank\" rel=\"noopener noreferrer\">cockpit<\/a> ( <a href=\"https:\/\/www.hiroom2.com\/2018\/08\/02\/linuxmint-19-cockpit-en\/\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/www.hiroom2.com\/2018\/08\/02\/linuxmint-19-cockpit-en\/<\/a> ) .<\/p>\n<p>The next evolution of virtualization in my humble opinion, is virtual container based systems such as <a href=\"https:\/\/www.docker.com\/\" target=\"_blank\" rel=\"noopener noreferrer\">Docker<\/a>. While dockers and container based systems may not always be ideal or meet true isolation security requirements, docker adoption and usage has <a href=\"https:\/\/dzone.com\/articles\/docker-usage-statistics-increased-adoption-by-ente#:~:text=Overall%20Docker%20adoption%20more%20than,development%20and%2018%25%20in%20production.\" target=\"_blank\" rel=\"noopener noreferrer\">skyrocketed<\/a>. One of the most useful uses that I have for docker, is when I need a quick isolated environment for testing software that isn&#8217;t permanent. Need to brush up on MariaDB programming? Awesome, spin up a docker. Have a package you need to use that installs libraries that breaks other things or even your package manager? Docker to the rescue. There are some CUI\/GUI based tools that help you with docker as well if you&#8217;re not a big fan of typing commands. (Check out <a href=\"https:\/\/github.com\/lirantal\/dockly\" target=\"_blank\" rel=\"noopener noreferrer\">dockly<\/a> and <a href=\"https:\/\/www.portainer.io\/\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/www.portainer.io\/<\/a> . <a href=\"https:\/\/cockpit-project.org\/\" target=\"_blank\" rel=\"noopener noreferrer\">Cockpit<\/a> can be used for managing dockers as well.)<\/p>\n<p>To install docker on my persistent flash drive, was no problem (see this guide: <a href=\"https:\/\/linuxhint.com\/install_docker_linux_mint\/\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/linuxhint.com\/install_docker_linux_mint\/<\/a>). However, to get it up and running was a bit more of a pain on a persistent Linux Mint flash drive.\u00a0 You can&#8217;t use the default storage driver, overlay2, you have to use the VFS storage driver (see <a href=\"https:\/\/docs.docker.com\/storage\/storagedriver\/vfs-driver\/\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/docs.docker.com\/storage\/storagedriver\/vfs-driver\/<\/a> ). Once you have done this, you can test docker by simply doing: docker run hello-world.<\/p>\n<p>I also wanted to have secure remote access to the system running my persistent flash drive. I stumbled upon <a href=\"https:\/\/tailscale.com\/\" target=\"_blank\" rel=\"noopener noreferrer\">Tailscale<\/a> and fell in love. Once you have tailscale up and running, you&#8217;ll have a tailscale0 interface. You can now ssh into your persistent flash drive from other places on the internet as long as you have tailscale configured on the client system. Tailscale can traverse NAT!<\/p>\n<p>This persistent flash drive that I have is not without its issues. I have not been able to upgrade the kernel or upgrade to a new version of Linux Mint. Additionally, the mint user password does not persist after reboot (though the root password persists). To access ssh on my flash drive I had to enable root login for ssh, which I know is not ideal or very secure. Caveats aside, this has been a fun learning experience that I would recommend to any other computer enthusiast.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Storage continues to get cheaper and cheaper. Above is a picture of a SAMSUNG BAR Plus flash drive. I was able to find one used on eBay for about $30 which has 256GB storage capacity. My goal was to have a portable Linux distro that&#8217;s persistent on a larger capacity flash drive which I can &hellip; <a href=\"http:\/\/zitstif.no-ip.org\/?p=1735\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Portable virtual lab that fits in your pocket<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11,3],"tags":[1073,1067,1070,1069,1000,1066,1065,1079,1071,1076,1074,1068,1075,1077,709,1072,1078],"class_list":["post-1735","post","type-post","status-publish","format-standard","hentry","category-code","category-posts","tag-cockpit","tag-dockly","tag-flash-drive","tag-gui","tag-hypervisor","tag-kvm","tag-linux-kvm","tag-mesh-vpn","tag-minut-linux","tag-nomadbsd","tag-persistent-linux-flash-drive","tag-portainer","tag-secure-boot","tag-tailscale","tag-uefi","tag-vfs-drivver","tag-wireguard"],"_links":{"self":[{"href":"http:\/\/zitstif.no-ip.org\/index.php?rest_route=\/wp\/v2\/posts\/1735","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/zitstif.no-ip.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/zitstif.no-ip.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/zitstif.no-ip.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/zitstif.no-ip.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1735"}],"version-history":[{"count":19,"href":"http:\/\/zitstif.no-ip.org\/index.php?rest_route=\/wp\/v2\/posts\/1735\/revisions"}],"predecessor-version":[{"id":1754,"href":"http:\/\/zitstif.no-ip.org\/index.php?rest_route=\/wp\/v2\/posts\/1735\/revisions\/1754"}],"wp:attachment":[{"href":"http:\/\/zitstif.no-ip.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1735"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/zitstif.no-ip.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1735"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/zitstif.no-ip.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1735"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}