<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Virtualbox on Shafiq Alibhai</title>
    <link>https://www.shafiq.in/tags/virtualbox/</link>
    <description>Recent content in Virtualbox on Shafiq Alibhai</description>
    <generator>Hugo</generator>
    <language>en-GB</language>
    <copyright>2009-2026 All rights reserved.</copyright>
    <lastBuildDate>Tue, 01 Feb 2022 09:05:56 +0000</lastBuildDate>
    <atom:link href="https://www.shafiq.in/tags/virtualbox/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>How to Resolve &#34;Cannot Unregister the Machine While It Is Locked&#34; Error in Vagrant</title>
      <link>https://www.shafiq.in/blog/how-to-resolve-cannot-unregister-the-machine-while-it-is-locked-error-in-vagrant/</link>
      <pubDate>Tue, 01 Feb 2022 09:05:56 +0000</pubDate>
      <guid>https://www.shafiq.in/blog/how-to-resolve-cannot-unregister-the-machine-while-it-is-locked-error-in-vagrant/</guid>
      <description>&lt;p&gt;Running &lt;code&gt;vagrant destroy&lt;/code&gt; sometimes fails with:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;VBoxManage: error: Cannot unregister the machine &amp;#39;CnC_default_1643660523119_45689&amp;#39; while it is locked
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The VM is locked because a VirtualBox process is still holding onto it. Kill the headless process and try again:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;killall -9 VBoxHeadless &lt;span class=&#34;o&#34;&gt;&amp;amp;&amp;amp;&lt;/span&gt; vagrant destroy
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;code&gt;killall -9 VBoxHeadless&lt;/code&gt; force-kills any running VirtualBox headless instances. The &lt;code&gt;&amp;amp;&amp;amp;&lt;/code&gt; runs &lt;code&gt;vagrant destroy&lt;/code&gt; only if that succeeds.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
