mirror of
https://github.com/vagrant-libvirt/vagrant-libvirt.git
synced 2025-02-25 18:55:27 -06:00
2 lines
9.5 KiB
HTML
2 lines
9.5 KiB
HTML
<!DOCTYPE html> <html lang="en-US"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=Edge"> <title>Troubleshooting - Vagrant Libvirt Documentation</title> <link rel="shortcut icon" href="/vagrant-libvirt/favicon.ico" type="image/x-icon"> <link rel="stylesheet" href="/vagrant-libvirt/assets/css/just-the-docs-default.css"> <script type="text/javascript" src="/vagrant-libvirt/assets/js/vendor/lunr.min.js"></script> <script type="text/javascript" src="/vagrant-libvirt/assets/js/just-the-docs.js"></script> <meta name="viewport" content="width=device-width, initial-scale=1"> <!-- Begin Jekyll SEO tag v2.8.0 --> <title>Troubleshooting | Vagrant Libvirt Documentation</title> <meta name="generator" content="Jekyll v3.9.3" /> <meta property="og:title" content="Troubleshooting" /> <meta property="og:locale" content="en_US" /> <meta name="description" content="Create and manage Vagrant machines using Libvirt/QEMU" /> <meta property="og:description" content="Create and manage Vagrant machines using Libvirt/QEMU" /> <link rel="canonical" href="https://vagrant-libvirt.github.io/vagrant-libvirt/troubleshooting.html" /> <meta property="og:url" content="https://vagrant-libvirt.github.io/vagrant-libvirt/troubleshooting.html" /> <meta property="og:site_name" content="Vagrant Libvirt Documentation" /> <meta property="og:type" content="website" /> <meta name="twitter:card" content="summary" /> <meta property="twitter:title" content="Troubleshooting" /> <script type="application/ld+json"> {"@context":"https://schema.org","@type":"WebPage","description":"Create and manage Vagrant machines using Libvirt/QEMU","headline":"Troubleshooting","publisher":{"@type":"Organization","logo":{"@type":"ImageObject","url":"https://vagrant-libvirt.github.io/vagrant-libvirt/assets/images/logo.png"}},"url":"https://vagrant-libvirt.github.io/vagrant-libvirt/troubleshooting.html"}</script> <!-- End Jekyll SEO tag --> <link rel="stylesheet" href="/vagrant-libvirt/assets/css/just-the-docs-light.css" media="(prefers-color-scheme: light)"> <link rel="stylesheet" href="/vagrant-libvirt/assets/css/just-the-docs-dark.css" media="(prefers-color-scheme: dark)"> </head> <body> <svg xmlns="http://www.w3.org/2000/svg" style="display: none;"> <symbol id="svg-link" viewBox="0 0 24 24"> <title>Link</title> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link"> <path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path> </svg> </symbol> <symbol id="svg-search" viewBox="0 0 24 24"> <title>Search</title> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-search"> <circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line> </svg> </symbol> <symbol id="svg-menu" viewBox="0 0 24 24"> <title>Menu</title> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-menu"> <line x1="3" y1="12" x2="21" y2="12"></line><line x1="3" y1="6" x2="21" y2="6"></line><line x1="3" y1="18" x2="21" y2="18"></line> </svg> </symbol> <symbol id="svg-arrow-right" viewBox="0 0 24 24"> <title>Expand</title> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-right"> <polyline points="9 18 15 12 9 6"></polyline> </svg> </symbol> <symbol id="svg-doc" viewBox="0 0 24 24"> <title>Document</title> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-file"> <path d="M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z"></path><polyline points="13 2 13 9 20 9"></polyline> </svg> </symbol> </svg> <div class="side-bar"> <div class="site-header"> <a href="https://vagrant-libvirt.github.io/vagrant-libvirt/" class="site-title lh-tight"> <div class="site-logo"></div> Vagrant Libvirt Documentation </a> <a href="#" id="menu-button" class="site-button"> <svg viewBox="0 0 24 24" class="icon"><use xlink:href="#svg-menu"></use></svg> </a> </div> <nav role="navigation" aria-label="Main" id="site-nav" class="site-nav"> <ul class="nav-list"><li class="nav-list-item"><a href="https://vagrant-libvirt.github.io/vagrant-libvirt/" class="nav-list-link">Quickstart</a> </li><li class="nav-list-item"><a href="https://vagrant-libvirt.github.io/vagrant-libvirt/installation.html" class="nav-list-link">Installation</a> </li><li class="nav-list-item"><a href="https://vagrant-libvirt.github.io/vagrant-libvirt/configuration.html" class="nav-list-link">Configuration</a> </li><li class="nav-list-item"><a href="https://vagrant-libvirt.github.io/vagrant-libvirt/boxes.html" class="nav-list-link">Boxes</a> </li><li class="nav-list-item"><a href="https://vagrant-libvirt.github.io/vagrant-libvirt/examples.html" class="nav-list-link">Examples</a> </li><li class="nav-list-item"><a href="https://vagrant-libvirt.github.io/vagrant-libvirt/packaging.html" class="nav-list-link">Packaging</a> </li><li class="nav-list-item active"><a href="https://vagrant-libvirt.github.io/vagrant-libvirt/troubleshooting.html" class="nav-list-link active">Troubleshooting</a> <ul id="toc" class="section-nav"> </ul> </li><li class="nav-list-item"><a href="https://vagrant-libvirt.github.io/vagrant-libvirt/about/" class="nav-list-link">About</a> </li></ul> </nav> <footer class="site-footer"> This site uses <a href="https://github.com/pmarsceill/just-the-docs">Just the Docs</a>, a documentation theme for Jekyll. </footer> </div> <div class="main" id="top"> <div id="main-header" class="main-header"> <div class="search"> <div class="search-input-wrap"> <input type="text" id="search-input" class="search-input" tabindex="0" placeholder="Search Vagrant Libvirt Documentation" aria-label="Search Vagrant Libvirt Documentation" autocomplete="off"> <label for="search-input" class="search-label"><svg viewBox="0 0 24 24" class="search-icon"><use xlink:href="#svg-search"></use></svg></label> </div> <div id="search-results" class="search-results"></div> </div> <script src="/vagrant-libvirt/assets/js/site_constants-e1ac483f8cbbb2d44940348129b4f096317606c1e27aa57fe14734259e395fe6.js"></script> <div id="plugin-version-menu" class="site-footer"></div> <script src="/vagrant-libvirt/assets/js/plugin_versions_menu.js"></script> </div> <div id="main-content-wrap" class="main-content-wrap"> <div id="main-content" class="main-content" role="main"> <p>The first step for troubleshooting a VM image that appears to not boot correctly, or hangs waiting to get an IP, is to check it with a VNC viewer. A key thing to remember is that if the VM doesn’t get an IP, then vagrant can’t communicate with it to configure anything, so a problem at this stage is likely to come from the VM, but we’ll outline the tools and common problems to help you troubleshoot that.</p> <p>By default, when you create a new VM, a vnc server will listen on <code class="language-plaintext highlighter-rouge">127.0.0.1</code> on port <code class="language-plaintext highlighter-rouge">TCP5900</code>. If you connect with a vnc viewer you can see the boot process. If your VM isn’t listening on <code class="language-plaintext highlighter-rouge">5900</code> by default;</p> <ul> <li>Check the create domain details outputted to the console, or</li> <li>Use <code class="language-plaintext highlighter-rouge">virsh dumpxml</code> to find out which port it’s listening on, or</li> <li>Explicitly configure it with <code class="language-plaintext highlighter-rouge">graphics_port</code> and <code class="language-plaintext highlighter-rouge">graphics_ip</code> (see <a href="/vagrant-libvirt/configuration#domain-specific-options">‘Domain Specific Options’</a>).</li> </ul> <p>Note: Connecting with the console (<code class="language-plaintext highlighter-rouge">virsh console</code>) requires additional config, so some VMs may not show anything on the console at all, instead displaying it in the VNC console. The issue with the text console is that you also need to build the image used to tell the kernel to output to the console during boot, and typically most do not have this built in.</p> <p>Problems we’ve seen in the past include:</p> <ul> <li>Forgetting to remove <code class="language-plaintext highlighter-rouge">/etc/udev/rules.d/70-persistent-net.rules</code> before packaging the VM</li> <li>VMs expecting a specific disk device to be connected</li> </ul> <p>If you’re still confused, check the Github Issues for this repo for anything that looks similar to your problem.</p> <p><a href="https://github.com/vagrant-libvirt/vagrant-libvirt/issues/1032">Github Issue #1032</a> contains some historical troubleshooting for VMs that appeared to hang.</p> <p>Did you hit a problem that you’d like to note here to save time in the future? Please do!</p> <hr> <footer> <div class="d-flex mt-2"> <p class="text-small text-grey-dk-000 mb-0"> <a href="https://github.com/vagrant-libvirt/vagrant-libvirt/tree/main/docs/troubleshooting.markdown" id="edit-this-page">Edit this page on GitHub</a> </p> </div> </footer> </div> </div> <div class="search-overlay"></div> </div> </body> </html>
|