If you have already used a Virtualizor trial and are now encountering the error “No NBD device passed to disconnect – disconnect_nbd()” when trying to install Virtualizor again, this post will guide you through the steps to resolve the issue.
Problem
After trying to install Virtualizor for the second time, you might encounter an error message like:
No NBD device passed to disconnect - disconnect_nbd()
This error typically occurs when there is a problem with the installation files, specifically with the sfdisk utility.
Solution
Here’s how you can solve the problem:
Step 1: Check Virtualizor Logs
Start by checking the logs to confirm that there’s an issue with the sfdisk
installation. Run the following command to view the virtualizor.log
file:
cat /var/log/virtualizor.log
You should see an error similar to this:
--2025-04-13 23:27:12-- http://files.virtualizor.com/utility/sfdisk
Resolving files.virtualizor.com (files.virtualizor.com)... 190.2.135.87
Connecting to files.virtualizor.com (files.virtualizor.com)|190.2.135.87|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2025-04-13 23:27:12 ERROR 404: Not Found.
This indicates that sfdisk was not installed properly, which is causing the issue.
Step 2: Verify the Presence of sfdisk
Next, you can verify that the sfdisk
binary is either missing or corrupted. Run this command:
ls -lh /sbin/sfdisk
If you see something like:
-rw-r--r-- 1 root root 0 Apr 14 16:01 /sbin/sfdisk
This means that the sfdisk
binary is present but its size is 0 KB, indicating it’s corrupted.
Step 3: Fix the Corrupted sfdisk
Now, let’s fix the issue by replacing the corrupted sfdisk
binary. Follow these steps:
- Rename the corrupted
sfdisk
file:
mv /sbin/sfdisk /sbin/sfdisk_new
- Download the correct version of
sfdisk
from Virtualizor’s official website:
wget http://files.virtualizor.com/utility/sfdisk
Note: The wget
command might not work directly due to server issues, so you may need to manually download the sfdisk
file and upload it to the /sbin/
directory.
- Once the file is uploaded, change the file permissions to ensure it’s executable:
chmod 755 /sbin/sfdisk
Now, you’ve successfully replaced the corrupted sfdisk
file and set the correct permissions.
Final Step: Restart Virtualizor
After replacing the sfdisk
binary, restart the Virtualizor service:
service virtualizor restart
This should resolve the “No NBD device passed to disconnect” error and allow you to proceed with your Virtualizor installation.
Conclusion
By following these steps, you should be able to fix the No NBD device passed to disconnect – disconnect_nbd() error and successfully complete your Virtualizor installation. If you continue to face issues, check your logs for additional details and verify the integrity of all necessary files.