我正在尝试使用libvirt使用以下命令创建虚拟机:
virsh create file
Run Code Online (Sandbox Code Playgroud)
内容"file":
<domain type='qemu' id='3'>
<name>testvm</name>
<memory>100</memory>
<vcpu>1</vcpu>
<os>
<type arch='i686'>hvm</type>
</os>
<devices>
<disk type='file' device='disk'>
<source file='/libtmp/VM-linux.0.2.img'/>
<target dev='hdc'/>
</disk>
</devices>
<on_reboot>restart</on_reboot>
<on_poweroff>preserve</on_poweroff>
<on_crash>restart</on_crash>
</domain>
Run Code Online (Sandbox Code Playgroud)
这是发生的错误。
error: Failed to create domain from file
error: internal error cannot load AppArmor profile 'libvirt-9cb01efc-ed3b-ff8e-4de5-7227d311dd15'
Run Code Online (Sandbox Code Playgroud)
我无需加载映像文件即可创建虚拟机。
每次配置文件名称不断更改。我试图停止它并创建虚拟机,但出现了同样的错误。
任何指针将非常有帮助。