[已解决]Cannot attach medium ‘/Applications/VirtualBox.app/Contents/MacOS/VBoxGuestAdditions.iso’

macos 下virtualbox虚拟机不可用错误提示:

Cannot attach medium '/Applications/VirtualBox.app/Contents/MacOS/VBoxGuestAdditions.iso'
{6af0f199-5a79-4a13-9679-f9421ed66ff9}: medium is already associated with the current state of machine uuid

解决方案:
打开虚拟机文件存储找到<VMNAME>.vbox(这个文件夹同时存在<VMNAME>.vbox-pre,<VMNAME>.vdi)用文本编辑器打开<VMNAME>.vbox,翻到文件底部
 找到类似这样的描述
<AttachedDevice passthrough="false" type="DVD" port="1" device="0">
          <Image uuid="{0a87233c-485f-4827-bcd5-e5f0ad6306b6}"/>
        </AttachedDevice>
将这一行删除
<Image uuid="{0a87233c-485f-4827-bcd5-e5f0ad6306b6}"/>
切忌不要删除其他的,然后保存文件,重启VB,哦了