RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1948433 - GDBus.Error:org.freedesktop.DBus.Error.InvalidArgs: Invalid machine name
Summary: GDBus.Error:org.freedesktop.DBus.Error.InvalidArgs: Invalid machine name
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: libvirt
Version: 9.0
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: beta
: ---
Assignee: Michal Privoznik
QA Contact: zhentang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-04-12 07:33 UTC by Xiaodai Wang
Modified: 2021-12-07 22:02 UTC (History)
12 users (show)

Fixed In Version: libvirt-7.6.0-1.el9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-12-07 21:57:54 UTC
Type: Bug
Target Upstream Version: 7.6.0
Embargoed:


Attachments (Terms of Use)

Description Xiaodai Wang 2021-04-12 07:33:39 UTC
Description of problem:
GDBus.Error:org.freedesktop.DBus.Error.InvalidArgs: Invalid machine name

Version-Release number of selected component (if applicable):
dbus-1.12.20-3.el9.x86_64
libvirt-client-7.0.0-4.el9.x86_64
libvirt-daemon-7.0.0-4.el9.x86_64
qemu-kvm-5.2.0-11.el9.x86_64

How reproducible:
100%

Steps to Reproduce:
# virt-v2v -i libvirt -ic vpx://xxx -o libvirt -of raw -os default 'Auto-esx7.0-rhel7.9-special-characters~!@#$%^&*_=+,?><:;|."[]()`\-m' -it vddk -io vddk-libdir=/root/vddk_libdir/latest -io vddk-thumbprint=xxx -on 'Auto-esx7.0-rhel7.9-special-characters~!@#$%^&*_=+,?><:;|."[]()`\\-mpJWE' -ip /root/v2v_vpx_passwd
[   0.0] Opening the source -i libvirt -ic vpx://xxx Auto-esx7.0-rhel7.9-special-characters~!@#$%^&*_=+,?><:;|."[]()`\-m -it vddk  -io vddk-libdir=/root/vddk_libdir/latest -io vddk-thumbprint=xxx
[   1.7] Creating an overlay to protect the source from being modified
[   2.5] Opening the overlay
[   7.0] Inspecting the overlay
[  23.2] Checking for sufficient free disk space in the guest
[  23.2] Estimating space required on target for each disk
[  23.2] Converting Red Hat Enterprise Linux Server 7.9 (Maipo) to run on KVM
virt-v2v: This guest has virtio drivers installed.
[ 107.7] Mapping filesystem data to avoid copying unused and blank areas
[ 108.2] Closing the overlay
[ 108.5] Assigning disks to buses
[ 108.5] Checking if the guest needs BIOS or UEFI to boot
[ 108.5] Initializing the target -o libvirt -os default
[ 108.5] Copying disk 1/1 to /var/lib/libvirt/images/Auto-esx7.0-rhel7.9-special-characters~!@#$%^&*_=+,?><:;|."[]()`\\-mpJWE-sda (raw)
    (100.00/100%)
[ 383.3] Creating output metadata
[ 383.4] Finishing off
[root@ibm-x3250m6-10 ~]# virsh list --all
 Id   Name                                                                       State
-------------------------------------------------------------------------------------------
 -    Auto-esx7.0-rhel7.9-special-characters~!@#$%^&*_=+,?><:;|."[]()`\\-mpJWE   shut off

[root@ibm-x3250m6-10 ~]# virsh dumpxml 'Auto-esx7.0-rhel7.9-special-characters~!@#$%^&*_=+,?><:;|."[]()`\\-mpJWE'
<domain type='kvm'>
  <name>Auto-esx7.0-rhel7.9-special-characters~!@#$%^&amp;*_=+,?&gt;&lt;:;|.&quot;[]()`\\-mpJWE</name>
  <uuid>401570ea-1bd1-4f46-907d-38dc8ed6bd3c</uuid>
  <metadata>
    <libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0">
      <libosinfo:os id="http://redhat.com/rhel/7.9"/>
    </libosinfo:libosinfo>
  </metadata>
  <memory unit='KiB'>2097152</memory>
  <currentMemory unit='KiB'>2097152</currentMemory>
  <vcpu placement='static'>1</vcpu>
  <os>
    <type arch='x86_64' machine='pc-q35-rhel8.4.0'>hvm</type>
    <boot dev='hd'/>
  </os>
  <features>
    <acpi/>
    <apic/>
  </features>
  <cpu mode='custom' match='exact' check='none'>
    <model fallback='forbid'>qemu64</model>
  </cpu>
  <clock offset='utc'/>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>
    <emulator>/usr/libexec/qemu-kvm</emulator>
    <disk type='volume' device='disk'>
      <driver name='qemu' type='raw'/>
      <source pool='default' volume='Auto-esx7.0-rhel7.9-special-characters~!@#$%^&amp;*_=+,?&gt;&lt;:;|.&quot;[]()`\\-mpJWE-sda'/>
      <target dev='vda' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
    </disk>
    ......
  </devices>
</domain>
# virsh start 'Auto-esx7.0-rhel7.9-special-characters~!@#$%^&*_=+,?><:;|."[]()`\\-mpJWE'
error: Failed to start domain 'Auto-esx7.0-rhel7.9-special-characters~!@#$%^&*_=+,?><:;|."[]()`\\-mpJWE'
error: GDBus.Error:org.freedesktop.DBus.Error.InvalidArgs: Invalid machine name

Actual results:
GDbus error happens and vm starts failure.

Expected results:
VM should start successfully.

Additional info:
1) The same VM name can be started successfully on rhel8.
2) The bug can be reproduced by a simpler name '|.-m'.

Comment 1 Michal Privoznik 2021-06-25 14:11:18 UTC
Patch proposed upstream:

https://listman.redhat.com/archives/libvir-list/2021-June/msg00758.html

Comment 3 Michal Privoznik 2021-07-07 14:26:34 UTC
Merged upstream as:

cda47bac25 virDomainMachineNameAppendValid: Handle special characters better

v7.5.0-29-gcda47bac25

Comment 5 zhentang 2021-07-20 06:53:13 UTC
Tested on libvirt v7.5.0-128-g8ad2882cb6 and it works as expected.

Comment 10 zhentang 2021-08-18 03:08:48 UTC
Verified
libvirt libvirt-7.6.0-2.el9
dbus-1.12.20-4.el9
qemu-kvm-6.0.0-11.el9.1





# virsh destroy '|.-m'
Domain '|.-m' destroyed

# virsh start '|.-m'
Domain '|.-m' started

# virsh list
 Id   Name       State
--------------------------
 2    fedora34   running
 4    |.-m       running


# virsh dumpxml '|.-m'
<domain type='kvm' id='4'>
  <name>|.-m</name>
  <uuid>d081192c-e9ea-40e6-ac1e-88491e3584e4</uuid>
  <memory unit='KiB'>1048576</memory>
  <currentMemory unit='KiB'>1048576</currentMemory>
  <vcpu placement='static'>1</vcpu>
  <resource>
    <partition>/machine</partition>
  </resource>
......


Note You need to log in before you can comment on or make changes to this bug.