Description of problem: [RFE]Add parameter to specify guest's id, name and uuid in virt-xml Otherwise guest with pure number as its name will not be found since its name will only be viewed as guest id Version-Release number of selected component (if applicable): For rhel 7 kernel-3.10.0-957.el7.x86_64 qemu-kvm-rhev-2.12.0-19.el7_6.2.x86_64 libvirt-python-4.5.0-1.el7.x86_64 libvirt-4.5.0-10.el7_6.4.x86_64 virt-install-1.5.0-1.el7.noarch virt-manager-1.5.0-1.el7.noarch For rhel8 kernel-4.18.0-60.el8.x86_64 python3-libvirt-4.5.0-1.module+el8+2529+a9686a4d.x86_64 virt-install-2.0.0-2.el8.noarch libvirt-4.5.0-18.module+el8+2691+dc742e5d.x86_64 qemu-kvm-2.12.0-57.module+el8+2683+02b3b955.x86_64 virt-manager-2.0.0-2.el8.noarch How reproducible 100% Steps to Reproduce 1. Create a guest with name 123 2. virt-xml 123 --edit name=usb_2_1_8 --hostdev rom_bar=off Actual results: ERROR Could not find domain '123': Domain not found: no domain with matching id 123 Expected results: the guest called 123 can be edited Additionally info: some libvirt components can specify parameter's character like --id, --uuid, --domain-name In virt-xml, the pure number parameter will only be treated as guest id
Thanks for the report. I'd rather not have to add and test explicit options unless there's a really compelling reason. We can probably tweak the lookup logic a bit to check if the string is a VM name first before assuming it's an ID just because it's an integer
I fixed this upstream: commit 7afbb90b4ddfa449e4efc2d57e726d477f96637b (HEAD -> master) Author: Cole Robinson <crobinso> Date: Thu Mar 21 13:34:52 2019 -0400 virt-xml: Handle VM names that look like id/uuid (bz 1679025) However this is a very much a corner case. I don't think we need to explicitly track it through the RHEL process. It will be fixed in 8.1 when we rebase. So I'm moving this to the upstream tracker and closing it UPSTREAM
*** Bug 1679026 has been marked as a duplicate of this bug. ***