{"id":160,"date":"2023-01-04T06:48:03","date_gmt":"2023-01-04T06:48:03","guid":{"rendered":"http:\/\/cloudkul.com\/blog\/?p=160"},"modified":"2024-12-24T10:54:53","modified_gmt":"2024-12-24T10:54:53","slug":"virtualization-with-vagrant","status":"publish","type":"post","link":"https:\/\/cloudkul.com\/blog\/virtualization-with-vagrant\/","title":{"rendered":"Virtualization with Vagrant\u2026!!!"},"content":{"rendered":"<p><span style=\"font-family: 'PT Serif', serif;\"><span style=\"font-size: large;\">Hello, In my last blog, we discussed <\/span><\/span><span style=\"font-family: 'PT Serif', serif;\"><span style=\"font-size: large;\"><a href=\"http:\/\/cloudkul.com\/blog\/start-your-journey-with-docker-2\/\" target=\"_blank\" rel=\"noopener\">docker technology.<\/a><\/span><\/span><span style=\"font-family: 'PT Serif', serif;\"><span style=\"font-size: large;\">\u00a0Today let&#8217;s talk about how to do <span style=\"color: #333333;\">virtualization with<\/span> vagrants.<\/span><\/span><\/p>\n<p align=\"justify\"><span style=\"color: #333333;\"><span style=\"font-family: 'PT Serif', serif;\"><span style=\"font-size: large;\">Firstly, the main question is, what is vagrant, why should we adopt it in our working environment &amp; what is the main difference between docker &amp; vagrant?<\/span><\/span><\/span><\/p>\n<p align=\"justify\"><span style=\"color: #333333;\"><span style=\"font-family: 'PT Serif', serif;\"><span style=\"font-size: large;\">As you may know about virtualization, Vagrant is also a part of virtualization. <\/span><\/span><\/span><\/p>\n<p align=\"justify\"><span style=\"color: #333333;\"><span style=\"font-family: 'PT Serif', serif;\"><span style=\"font-size: large;\">We get a complete base machine with the help of <a href=\"https:\/\/cloudkul.com\/blog\/vagrant-implementation\/\">Vagrant in a virtual box<\/a> and it&#8217;s up to you that you handle it from the command line or you wanna use its graphical interface.<\/span><\/span><\/span><\/p>\n<p align=\"justify\"><span style=\"color: #333333;\"><span style=\"font-family: 'PT Serif', serif;\"><span style=\"font-size: large;\">Because Vagrant provides you with both interfaces GUI as well as CLI for <a href=\"https:\/\/cloudkul.com\/blog\/lets-use-windows-through-vagrant-2\/\">virtualization<\/a>, it is very feasible to run on your base machine.<\/span><\/span><\/span><\/p>\n<p align=\"justify\"><span style=\"color: #333333;\"><span style=\"font-family: 'PT Serif', serif;\"><span style=\"font-size: large;\">It doesn\u2019t consume a large amount of hardware on your base machine because it is also a lightweight application.<\/span><\/span><\/span><\/p>\n<p align=\"justify\"><span style=\"color: #333333;\"><span style=\"font-family: 'PT Serif', serif;\"><span style=\"font-size: large;\">It uses VirtualBox and VMware, requiring a single command to build, destroy, and create fresh boxes.<\/span><\/span><\/span><\/p>\n<h2><strong><span style=\"color: #333333;\"><span style=\"font-family: 'PT Serif', serif;\"><span style=\"font-size: large;\"><b>Why should we adopt vagrants for virtualization?<\/b><\/span><\/span><\/span><\/strong><\/h2>\n<p align=\"justify\"><span style=\"color: #333333;\"><span style=\"font-family: 'PT Serif', serif;\"><span style=\"font-size: large;\">It is very easy to handle, I mean it looks like no tangle of wires and you can easily run multiple developments or testing environments simultaneously on a single base machine.<\/span><\/span><\/span><\/p>\n<p align=\"justify\"><span style=\"color: #333333;\"><span style=\"font-family: 'PT Serif', serif;\"><span style=\"font-size: large;\">I would also like to tell you that there are so many organizations that are not only working on Vagrant but also have moved their testing servers to it.<\/span><\/span><\/span><\/p>\n<p align=\"justify\"><span style=\"color: #333333;\"><span style=\"font-family: 'PT Serif', serif;\"><span style=\"font-size: large;\">They are adopting this application because of its reliability and consistency and all the servers are running well on this application.<\/span><\/span><\/span><\/p>\n<p align=\"justify\"><span style=\"color: #333333;\"><span style=\"font-family: 'PT Serif', serif;\"><span style=\"font-size: large;\">Even if I talk about my organization, we have also moved our couple of servers on Vagrant and we get positive results, so you can say that I am writing this blog with practical experience.<\/span><\/span><\/span><\/p>\n<p align=\"justify\"><span style=\"color: #333333;\"><span style=\"font-family: 'PT Serif', serif;\"><span style=\"font-size: large;\">Vagrant is attractive and reliable because it ensures your environment works seamlessly, even after upgrading your OS or doing a fresh install.<\/span><\/span><\/span><\/p>\n<p align=\"justify\"><span style=\"color: #333333;\"><span style=\"font-family: 'PT Serif', serif;\"><span style=\"font-size: large;\">Just take a backup of your vagrant box and after installation, export your vagrant box back to your base machine and start your work from where you have left off.<\/span><\/span><\/span><\/p>\n<h2 align=\"justify\"><span style=\"color: #333333;\"><span style=\"font-family: 'PT Serif', serif;\"><span style=\"font-size: large;\">Now, let&#8217;s talk about the main difference between Docker &amp; Vagrant:-<\/span><\/span><\/span><\/h2>\n<p align=\"justify\"><span style=\"color: #333333;\"><span style=\"font-family: 'PT Serif', serif;\"><span style=\"font-size: large;\">It isn\u2019t correct to compare Vagrant and Docker directly because in some scenarios they do overlap and in the vast majority they don\u2019t, so it isn\u2019t a fair comparison in most cases.<\/span><\/span><\/span><\/p>\n<p align=\"justify\"><strong><span style=\"color: #333333;\"><span style=\"font-family: 'PT Serif', serif;\"><span style=\"font-size: large;\">Here are some points for knowledge that are mentioned below:<\/span><\/span><\/span><\/strong><\/p>\n<p align=\"justify\"><span style=\"color: #333333;\"><span style=\"font-family: 'PT Serif', serif;\"><span style=\"font-size: large;\">1) Vagrant is mostly in use for testing purposes while Docker is for developing purposes.<\/span><\/span><\/span><\/p>\n<p align=\"justify\"><span style=\"color: #333333;\"><span style=\"font-family: 'PT Serif', serif;\"><span style=\"font-size: large;\">2) Vagrant knows how to configure some advanced or non-trivial things like networking and syncing folders. <\/span><\/span><\/span><\/p>\n<p align=\"justify\"><span style=\"color: #333333;\"><span style=\"font-family: 'PT Serif', serif;\"><span style=\"font-size: large;\">For example Vagrant knows how to attach a static IP to the machine, you just need to mention the IP address on that Vagrant file which you get after initializing.<\/span><\/span><\/span><\/p>\n<p align=\"justify\"><span style=\"color: #333333;\"><span style=\"font-family: 'PT Serif', serif;\"><span style=\"font-size: large;\">3) Docker is lightweight because it shares the host machine&#8217;s kernel while isolating user spaces, allowing different containers to run on various Linux distributions.<\/span><\/span><\/span><\/p>\n<p align=\"justify\"><span style=\"color: #333333;\"><span style=\"font-family: 'PT Serif', serif;\"><span style=\"font-size: large;\">4) Vagrant makes its Kernel with its OS while Docker always shares the kernel of the base machine.<\/span><\/span><\/span><\/p>\n<p align=\"justify\"><a href=\"http:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2015\/11\/Difference-Between-Docker-And-Vagrant2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-352 size-full\" src=\"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2015\/11\/Difference-Between-Docker-And-Vagrant2.png\" alt=\"diffrence\" width=\"825\" height=\"260\" \/><\/a><\/p>\n<p align=\"justify\"><strong><span style=\"color: #333333;\"><span style=\"font-family: 'PT Serif', serif;\"><span style=\"font-size: large;\"><b>A specific argument that I\u2019ve heard in favor of using Docker instead of Vagrant is:<\/b><\/span><\/span><\/span><\/strong><\/p>\n<p align=\"justify\"><span style=\"color: #000000;\"><span style=\"text-decoration: underline;\"><strong><span style=\"font-family: 'PT Serif', serif;\"><span style=\"font-size: large;\">Docker is faster<\/span><\/span><\/strong><\/span><span style=\"font-family: 'PT Serif', serif;\"><span style=\"font-size: large;\">:-<\/span><\/span><strong><span style=\"font-family: 'PT Serif', serif;\"><span style=\"font-size: large;\"><b>\u00a0<\/b><\/span><\/span><\/strong><\/span><span style=\"color: #333333;\"><span style=\"font-family: 'PT Serif', serif;\"><span style=\"font-size: large;\">Once you have a host that can run Linux containers, Docker is definitely faster for running a container than any virtual machine would be. <\/span><\/span><\/span><\/p>\n<p align=\"justify\"><span style=\"color: #333333;\"><span style=\"font-family: 'PT Serif', serif;\"><span style=\"font-size: large;\">But launching a virtual machine is like a one-time cost. In production, Docker shines because of its lightweight architecture.<\/span><\/span><\/span><\/p>\n<p align=\"justify\"><span style=\"color: #333333;\"><span style=\"font-family: 'PT Serif', serif;\"><span style=\"font-size: large;\">I hope now it&#8217;s clear to see that it is very difficult and I believe It\u2019s not correct, to compare Docker and Vagrant.<br \/>\n<\/span><\/span><\/span><\/p>\n<h2><span style=\"color: #333333;\"><span style=\"font-family: 'PT Serif', serif;\"><span style=\"font-size: large;\">Conclusion<\/span><\/span><\/span><\/h2>\n<p align=\"justify\"><span style=\"color: #333333;\"><span style=\"font-family: 'PT Serif', serif;\"><span style=\"font-size: large;\">Docker can replace Vagrant in specific use cases, but Vagrant generally enhances the Docker experience without hindering it.<\/span><\/span><\/span><\/p>\n<p align=\"justify\"><span style=\"color: #333333;\"><span style=\"font-family: 'PT Serif', serif;\"><span style=\"font-size: large;\">If you find this isn\u2019t true, then <\/span><\/span><\/span><span style=\"color: #333333;\"><span style=\"font-family: 'PT Serif', serif;\"><span style=\"font-size: large;\">I\u2019m happy to take suggestions to improve my knowledge.<\/span><\/span><\/span><\/p>\n<p align=\"justify\"><span style=\"color: #333333;\"><span style=\"font-family: 'PT Serif', serif;\"><span style=\"font-size: large;\">So, In the Next Article, I\u2019ll Provide A Very Simple Way That You Can Follow To Get Yourself Up And Running.<\/span><\/span><\/span><\/p>\n<p style=\"text-align: center;\"><strong><a href=\"http:\/\/cloudkul.com\/contact\/\" target=\"_blank\" rel=\"noopener\">FOR ANY TYPE OF QUERY OR HELP, KINDLY CONTACT US<\/a><\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hello, In my last blog, we discussed docker technology.\u00a0Today let&#8217;s talk about how to do <a class=\"text-primary\" title=\"read more\" href=\"https:\/\/cloudkul.com\/blog\/virtualization-with-vagrant\/\">[&#8230;]<\/a><\/p>\n","protected":false},"author":4,"featured_media":325,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[1],"tags":[7,6],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Virtualization with Vagrant\u2026!!! - Cloudkul<\/title>\n<meta name=\"description\" content=\"Vagrant is also a part of virtualization, we get a base machine using vagrant in a virtual box and it&#039;s up to you to handle it from the CLI or GUI.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/cloudkul.com\/blog\/virtualization-with-vagrant\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Virtualization with Vagrant\u2026!!! - Cloudkul\" \/>\n<meta property=\"og:description\" content=\"Vagrant is also a part of virtualization, we get a base machine using vagrant in a virtual box and it&#039;s up to you to handle it from the CLI or GUI.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/cloudkul.com\/blog\/virtualization-with-vagrant\/\" \/>\n<meta property=\"og:site_name\" content=\"Cloudkul\" \/>\n<meta property=\"article:published_time\" content=\"2023-01-04T06:48:03+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-12-24T10:54:53+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2015\/11\/Virtualization-With-Vagrant.png\" \/>\n\t<meta property=\"og:image:width\" content=\"848\" \/>\n\t<meta property=\"og:image:height\" content=\"422\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Prashant Arora\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/cloudkul.com\/blog\/virtualization-with-vagrant\/\",\"url\":\"https:\/\/cloudkul.com\/blog\/virtualization-with-vagrant\/\",\"name\":\"Virtualization with Vagrant\u2026!!! - Cloudkul\",\"isPartOf\":{\"@id\":\"https:\/\/cloudkul.com\/blog\/#website\"},\"datePublished\":\"2023-01-04T06:48:03+00:00\",\"dateModified\":\"2024-12-24T10:54:53+00:00\",\"author\":{\"@id\":\"https:\/\/cloudkul.com\/blog\/#\/schema\/person\/0f130d5c45f7a843f035c2b26dfd8822\"},\"description\":\"Vagrant is also a part of virtualization, we get a base machine using vagrant in a virtual box and it's up to you to handle it from the CLI or GUI.\",\"breadcrumb\":{\"@id\":\"https:\/\/cloudkul.com\/blog\/virtualization-with-vagrant\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/cloudkul.com\/blog\/virtualization-with-vagrant\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/cloudkul.com\/blog\/virtualization-with-vagrant\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/cloudkul.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Virtualization with Vagrant\u2026!!!\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/cloudkul.com\/blog\/#website\",\"url\":\"https:\/\/cloudkul.com\/blog\/\",\"name\":\"Cloudkul\",\"description\":\"Host your eCommerce Store on AWS with Optimized Performance\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/cloudkul.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/cloudkul.com\/blog\/#\/schema\/person\/0f130d5c45f7a843f035c2b26dfd8822\",\"name\":\"Prashant Arora\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/cloudkul.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/ffd3d12ef1ac706011cfd6f835707402?s=96&d=https%3A%2F%2Fs.gravatar.com%2Favatar%2F6148c37469011bc2f8e491ca8f5de495%3Fs%3D80&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/ffd3d12ef1ac706011cfd6f835707402?s=96&d=https%3A%2F%2Fs.gravatar.com%2Favatar%2F6148c37469011bc2f8e491ca8f5de495%3Fs%3D80&r=g\",\"caption\":\"Prashant Arora\"},\"url\":\"https:\/\/cloudkul.com\/blog\/author\/prashant089\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Virtualization with Vagrant\u2026!!! - Cloudkul","description":"Vagrant is also a part of virtualization, we get a base machine using vagrant in a virtual box and it's up to you to handle it from the CLI or GUI.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/cloudkul.com\/blog\/virtualization-with-vagrant\/","og_locale":"en_US","og_type":"article","og_title":"Virtualization with Vagrant\u2026!!! - Cloudkul","og_description":"Vagrant is also a part of virtualization, we get a base machine using vagrant in a virtual box and it's up to you to handle it from the CLI or GUI.","og_url":"https:\/\/cloudkul.com\/blog\/virtualization-with-vagrant\/","og_site_name":"Cloudkul","article_published_time":"2023-01-04T06:48:03+00:00","article_modified_time":"2024-12-24T10:54:53+00:00","og_image":[{"width":848,"height":422,"url":"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2015\/11\/Virtualization-With-Vagrant.png","type":"image\/png"}],"author":"Prashant Arora","twitter_card":"summary_large_image","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/cloudkul.com\/blog\/virtualization-with-vagrant\/","url":"https:\/\/cloudkul.com\/blog\/virtualization-with-vagrant\/","name":"Virtualization with Vagrant\u2026!!! - Cloudkul","isPartOf":{"@id":"https:\/\/cloudkul.com\/blog\/#website"},"datePublished":"2023-01-04T06:48:03+00:00","dateModified":"2024-12-24T10:54:53+00:00","author":{"@id":"https:\/\/cloudkul.com\/blog\/#\/schema\/person\/0f130d5c45f7a843f035c2b26dfd8822"},"description":"Vagrant is also a part of virtualization, we get a base machine using vagrant in a virtual box and it's up to you to handle it from the CLI or GUI.","breadcrumb":{"@id":"https:\/\/cloudkul.com\/blog\/virtualization-with-vagrant\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/cloudkul.com\/blog\/virtualization-with-vagrant\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/cloudkul.com\/blog\/virtualization-with-vagrant\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/cloudkul.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Virtualization with Vagrant\u2026!!!"}]},{"@type":"WebSite","@id":"https:\/\/cloudkul.com\/blog\/#website","url":"https:\/\/cloudkul.com\/blog\/","name":"Cloudkul","description":"Host your eCommerce Store on AWS with Optimized Performance","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/cloudkul.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/cloudkul.com\/blog\/#\/schema\/person\/0f130d5c45f7a843f035c2b26dfd8822","name":"Prashant Arora","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/cloudkul.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/ffd3d12ef1ac706011cfd6f835707402?s=96&d=https%3A%2F%2Fs.gravatar.com%2Favatar%2F6148c37469011bc2f8e491ca8f5de495%3Fs%3D80&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/ffd3d12ef1ac706011cfd6f835707402?s=96&d=https%3A%2F%2Fs.gravatar.com%2Favatar%2F6148c37469011bc2f8e491ca8f5de495%3Fs%3D80&r=g","caption":"Prashant Arora"},"url":"https:\/\/cloudkul.com\/blog\/author\/prashant089\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/posts\/160"}],"collection":[{"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/comments?post=160"}],"version-history":[{"count":30,"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/posts\/160\/revisions"}],"predecessor-version":[{"id":19230,"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/posts\/160\/revisions\/19230"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/media\/325"}],"wp:attachment":[{"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/media?parent=160"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/categories?post=160"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/tags?post=160"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}