请在下面找到我的 dom xml 示例。我正在运行命令 virsh create 并收到此错误:
Unable to open file <json file located inside install_dir>
这个文件的权限都很好。
qemu:commandline
标签下的参数是否需要特殊权限?无论我在本节中提到的参数和文件如何,我都会收到错误消息。
<domain type='qemu' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
<name>my_instance</name>
<uuid>35615c44-b004-4b3f-9f42-da182b9662ee</uuid>
<memory unit='KiB'>786432</memory>
<currentMemory unit='KiB'>786432</currentMemory>
<vcpu placement='static'>1</vcpu>
<os>
<type arch='armv7l' machine='my_machine'>hvm</type>
<kernel>/home/user/KernelPath/zImage</kernel>
<dtb>/home/user/DTPPath/emmc.dtb</dtb>
</os>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<emulator>/usr/bin/qemu-system-arm</emulator>
<disk type='file' device='disk'>
<driver name='qemu' type='raw'/>
<source file='/home/user/Install_Dir/emmc.dat'/>
<target dev='sd' bus='scsi'/>
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk>
<controller type='usb' index='0'/>
<controller type='scsi' index='0'/>
<serial type='pty'>
<target port='0'/>
</serial>
<serial type='pty'>
<target port='1'/>
</serial>
<serial type='pty'>
<target port='2'/>
</serial>
<serial type='pty'>
<target port='3'/>
</serial>
<console type='pty'>
<target type='serial' port='0'/>
</console>
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
<graphics type='vnc' port='60316' autoport='no' websocket='60381' listen=''>
<listen type='address' address=''/>
</graphics>
<graphics type='sdl'/>
<video>
<model type='qxl'/>
</video>
<memballoon model='none'/>
</devices>
<qemu:commandline>
<qemu:arg value='-spdir'/>
<qemu:arg value='/home/user/Install_Dir'/>
<qemu:arg value='-show-cursor'/>
</qemu:commandline>
</domain>