{
    "componentChunkName": "component---src-templates-blog-post-js",
    "path": "/docs/trouble-shooting-and-advanced-usages/",
    "result": {"data":{"site":{"siteMetadata":{"title":"Linuxdev Documentation","social":{"disqusShortName":"kennyyeoyounet"}}},"markdownRemark":{"id":"3983e6bf-1b00-5cf5-ae9e-62d291660e87","excerpt":"Trouble shooting and advanced usages Want to change the host only network IP  is hardcoded in  so you can edit Want to destroy the VM but use the docker lib…","html":"<h1 id=\"trouble-shooting-and-advanced-usages\" style=\"position:relative;\" class=\"title\"><a href=\"#trouble-shooting-and-advanced-usages\" aria-label=\"trouble shooting and advanced usages permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Trouble shooting and advanced usages</h1>\n<h2 id=\"want-to-change-the-host-only-network-ip\" style=\"position:relative;\" class=\"subtitle\"><a href=\"#want-to-change-the-host-only-network-ip\" aria-label=\"want to change the host only network ip permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Want to change the host only network IP</h2>\n<p><code class=\"language-text\">192.168.99.123</code> is hardcoded in <code class=\"language-text\">Vagrantfile</code> so you can edit</p>\n<div class=\"gatsby-highlight\" data-language=\"ruby\"><pre class=\"language-ruby\"><code class=\"language-ruby\">  config<span class=\"token punctuation\">.</span>vm<span class=\"token punctuation\">.</span>network <span class=\"token string\">\"private_network\"</span><span class=\"token punctuation\">,</span> ip<span class=\"token punctuation\">:</span> <span class=\"token string\">\"192.168.99.123\"</span></code></pre></div>\n<h2 id=\"want-to-destroy-the-vm-but-use-the-docker-lib-storage-in-the-new-vm\" style=\"position:relative;\" class=\"subtitle\"><a href=\"#want-to-destroy-the-vm-but-use-the-docker-lib-storage-in-the-new-vm\" aria-label=\"want to destroy the vm but use the docker lib storage in the new vm permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Want to destroy the VM but use the docker lib storage in the new VM</h2>\n<p><code class=\"language-text\">vagrant destory</code> will remove all the VM storage attached.</p>\n<p>To avoid deletion of the storage attached,</p>\n<ol>\n<li>Shutdown the VM first with <code class=\"language-text\">vagrant halt</code></li>\n<li>dettach the disk using Virtualbox\n<ol>\n<li>Open Oracle VM VirtualBox</li>\n</ol>\n</li>\n</ol>\n<p><img src=\"https://user-images.githubusercontent.com/5399854/137492415-55e4939a-e0fc-4b2c-9310-0c80cc0a4835.png\" alt=\"image\">\n2. In Tools > Media, identify docker.xx.vdi in the right pane, which is used in the VM\n3. right click and click Release\n<img src=\"https://user-images.githubusercontent.com/5399854/137492552-765d1f06-52e9-4c98-b7ed-8b153c3fd7db.png\" alt=\"image\">\n3. destroy the VM running <code class=\"language-text\">./destroy.sh</code> in linuxdev dir\n4. bootstrap.sh\n5. run <code class=\"language-text\">sudo /root/docker.disk.sh /dev/sdb1</code> to attach the storage</p>\n<h2 id=\"want-to-create-another-vm\" style=\"position:relative;\" class=\"subtitle\"><a href=\"#want-to-create-another-vm\" aria-label=\"want to create another vm permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Want to create another VM</h2>\n<p>Clone this repo in the other directory and use different machine name during <code class=\"language-text\">bootstrap.sh</code></p>\n<p>You will need to manage DOCKER_xxx variables manually</p>\n<h2 id=\"creating-machine-failed\" style=\"position:relative;\" class=\"subtitle\"><a href=\"#creating-machine-failed\" aria-label=\"creating machine failed permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Creating machine failed</h2>\n<p>Find <code class=\"language-text\">%USERPROFILE%\\VirualBox VMs\\&lt;machine_name>\\Logs</code> and try to delete.\nIf it cannot be deleted, see the Task Manager and</p>\n<p><img src=\"https://user-images.githubusercontent.com/5399854/137558547-1dc16fcf-6484-4482-bb4b-abd27bde586e.png\" alt=\"image\"></p>\n<p>End tasks for <code class=\"language-text\">VirtualBox Headless Frontend</code> and try to remove the Logs directory and try again.</p>\n<h2 id=\"osx-big-sur\" style=\"position:relative;\" class=\"subtitle\"><a href=\"#osx-big-sur\" aria-label=\"osx big sur permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>OSX Big Sur</h2>\n<p>VirtualBox fails to add host-only network when it’s not allowed in the <code class=\"language-text\">Security &amp; Privacy</code></p>\n<p><img src=\"https://user-images.githubusercontent.com/5399854/137605674-07023bcc-cd73-4159-9c9c-bcd3220611e1.png\" alt=\"image\"></p>\n<p>Without this, creating VM using Vagrant won’t work.</p>\n<h3 id=\"version-114\" style=\"position:relative;\"><a href=\"#version-114\" aria-label=\"version 114 permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Version 11.4?</h3>\n<p>I had some issue with granting the Virtualbox kernel extension, which was keep asking the permission after rebooting. Allowing actually was not working.</p>\n<p>The issue was fixed I upgrade OSX to 16.</p>\n<p>If you have 11.4, please consider upgrade to 11.6 or the latest.</p>\n<h2 id=\"use-ext4-partition-on-windows-10\" style=\"position:relative;\" class=\"subtitle\"><a href=\"#use-ext4-partition-on-windows-10\" aria-label=\"use ext4 partition on windows 10 permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Use ext4 partition on Windows 10</h2>\n<p>This would be just an instace how to use ext4 partitions</p>\n<p>USB external disks can be mounted directly to the Linux on VM and if you have VirtualBox Extension pack, USB3 is also supported.</p>\n<p>The following instruction is mounting external disk to VirtualBox without the extension pack.</p>\n<h3 id=\"mount-entire-system-disk-to-virutalbox\" style=\"position:relative;\"><a href=\"#mount-entire-system-disk-to-virutalbox\" aria-label=\"mount entire system disk to virutalbox permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Mount entire system disk to Virutalbox</h3>\n<h4 id=\"create-vmdk-file-for-the-physical-drive\" style=\"position:relative;\"><a href=\"#create-vmdk-file-for-the-physical-drive\" aria-label=\"create vmdk file for the physical drive permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>create vmdk file for the physical drive</h4>\n<p>Windows Disk Management will show the external disks with the number like 0, 1, 2</p>\n<p>if you have the only system drive, it will be 0. so the find the number of the disk which you want to mount.</p>\n<p>And run following command in Powershell (admin)\nwith modifying the number <code class=\"language-text\">2</code> to the number of your disk</p>\n<div class=\"gatsby-highlight\" data-language=\"powershell\"><pre class=\"language-powershell\"><code class=\"language-powershell\">VBoxManage internalcommands createrawvmdk <span class=\"token operator\">-</span>filename <span class=\"token string\">\"<span class=\"token variable\">$env</span>:USERPROFILE\\VirtualBox VMs\\external-disk-2.vmdk\"</span> <span class=\"token operator\">-</span>rawdisk \\\\<span class=\"token punctuation\">.</span>\\PhysicalDrive2</code></pre></div>\n<p>add the vmdk to your virtualbox.</p>\n<div class=\"gatsby-highlight\" data-language=\"ruby\"><pre class=\"language-ruby\"><code class=\"language-ruby\">  config<span class=\"token punctuation\">.</span>vm<span class=\"token punctuation\">.</span>provider <span class=\"token string\">\"virtualbox\"</span> <span class=\"token keyword\">do</span> <span class=\"token operator\">|</span>vb<span class=\"token operator\">|</span>\n<span class=\"token punctuation\">.</span><span class=\"token punctuation\">.</span><span class=\"token punctuation\">.</span>\n    disk_filename <span class=\"token operator\">=</span> <span class=\"token punctuation\">(</span><span class=\"token constant\">ENV</span><span class=\"token punctuation\">[</span><span class=\"token string\">'USERPROFILE'</span><span class=\"token punctuation\">]</span> <span class=\"token operator\">||</span> <span class=\"token string\">\"\"</span><span class=\"token punctuation\">)</span> <span class=\"token operator\">+</span> <span class=\"token string\">\"/VirtualBox VMs/ext4t2.vmdk\"</span>\n    vb<span class=\"token punctuation\">.</span>customize <span class=\"token punctuation\">[</span><span class=\"token string\">'storageattach'</span><span class=\"token punctuation\">,</span> <span class=\"token symbol\">:id</span><span class=\"token punctuation\">,</span> <span class=\"token string\">'--storagectl'</span><span class=\"token punctuation\">,</span> <span class=\"token string\">'SATA Controller'</span><span class=\"token punctuation\">,</span> <span class=\"token string\">'--port'</span><span class=\"token punctuation\">,</span> <span class=\"token number\">3</span><span class=\"token punctuation\">,</span> <span class=\"token string\">'--type'</span><span class=\"token punctuation\">,</span> <span class=\"token string\">'hdd'</span><span class=\"token punctuation\">,</span> <span class=\"token string\">'--medium'</span><span class=\"token punctuation\">,</span> disk_filename<span class=\"token punctuation\">]</span>\n  <span class=\"token keyword\">end</span></code></pre></div>\n<p>You will need Administrator privileges to starth the VM.</p>\n<p>Shutdown all the running VirtualBox VM and kill close Virtualbox and kill all running VBox related tasks. and runt <code class=\"language-text\">vagrant reload</code> command as Admnistrator.</p>\n<p>When the VM is running, you can check the partitions by</p>\n<div class=\"gatsby-highlight\" data-language=\"bash\"><pre class=\"language-bash\"><code class=\"language-bash\"><span class=\"token function\">ls</span> -la /dev/disk/by-uuid/</code></pre></div>\n<p>or by root (<code class=\"language-text\">sudo su -</code>)</p>\n<div class=\"gatsby-highlight\" data-language=\"bash\"><pre class=\"language-bash\"><code class=\"language-bash\"><span class=\"token function\">fdisk</span> -l</code></pre></div>\n<p>mount the partition by <code class=\"language-text\">mount /dev/disk/by-uuid/4fcc4aba-dd74-4212-b6f0-154c49c69242 /mnt/external-disk-2</code>\nor add that to <code class=\"language-text\">/etc/fstab</code></p>\n<p>And you can use <code class=\"language-text\">startup_as_admin.bat</code> in the scripts directory to start the VM as administrator</p>","fields":{"slug":"/docs/trouble-shooting-and-advanced-usages/","language":""},"frontmatter":{"title":"Trouble shooting and advanced usages","date":"October 15, 2021","description":null}},"previous":{"fields":{"slug":"/docs/configuring-vm/"},"frontmatter":{"title":"Configuring VM"}},"next":{"fields":{"slug":"/README/"},"frontmatter":{"title":""}}},"pageContext":{"id":"3983e6bf-1b00-5cf5-ae9e-62d291660e87","previousPostId":"bdeda9f4-e066-5cbb-8d3e-d5bc814c0e13","nextPostId":"353110f7-3eab-5001-afc4-9591e38db8e5","language":"en","i18n":{"language":"en","languages":["en","ko","ja"],"defaultLanguage":"en","generateDefaultLanguagePage":false,"routed":false,"originalPath":"/docs/trouble-shooting-and-advanced-usages/","path":"/docs/trouble-shooting-and-advanced-usages/"}}},
    "staticQueryHashes": ["2355076697","3347749741"]}