Files
tldr/pages.zh/linux/virt-xml.md

29 lines
895 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# virt-xml
> 使用明确的命令行选项编辑libvirt域XML文件。
> 注意:'域'指的是现有虚拟机的名称、UUID或ID参见tldr virsh
> 更多信息:<https://github.com/virt-manager/virt-manager/blob/main/man/virt-xml.rst>。
- 列出特定选项的所有子选项:
`virt-xml --{{option}}=?`
- 列出磁盘、网络和引导的所有子选项:
`virt-xml --disk=? --network=? --boot=?`
- 编辑特定域的值:
`virt-xml {{domain}} --edit --{{option}} {{suboption}}={{new_value}}`
- 更改特定域的描述:
`virt-xml {{domain}} --edit --metadata description="{{new_description}}"`
- 启用/禁用特定域的引导设备菜单:
`virt-xml {{domain}} --edit --boot bootmenu={{on|off}}`
- 将主机USB集线器连接到正在运行的虚拟机参见tldr lsusb
`virt-xml {{domain}} --update --add-device --hostdev {{bus}}.{{device}}`