canonical/multipass

[virtualbox@macOS] Purge-uninstall leaves VMs behind

Open

#3,571 创建于 2024年7月9日

在 GitHub 查看
 (3 评论) (0 反应) (1 负责人)C++ (6,956 star) (634 fork)batch import
buggood first issuelowmedium

描述

Describe the bug VMs remain registered in VirtualBox after running the uninstall script and requesting that all data and VMs be removed. The reason is that the uninstall script needs to be run as root, but root is usually not authenticated with the Multipass daemon and so cannot ask to remove VMs.

The deletion command fails with QEMU too, but removing the directories is enough to get rid of the VMs in that case.

To Reproduce

$ /Library/Application\ Support/com.canonical.multipass/uninstall.sh
-bash: /Library/Application Support/com.canonical.multipass/uninstall.sh: Permission denied
$ bash /Library/Application\ Support/com.canonical.multipass/uninstall.sh
This script needs to run as root
$ sudo bash /Library/Application\ Support/com.canonical.multipass/uninstall.sh
Are you sure you want to remove Multipass from your system? [Y/N] y
Do you want to delete all your Multipass VMs and daemon data too? [Y/N] y
Removing VMs:
delete failed: The client is not authenticated with the Multipass service.
Please use 'multipass authenticate' before proceeding.
Failed to delete multipass VMs from underlying driver
[...]

Additional info

  • OS: macOS 14
  • multipass version: 1.13.1
  • multipass get local.driver: virtualbox

Additional context We should probably revisit the uninstall method altogether. That will probably be necessary for future work.

贡献者指南