Bug 1808499
Summary: | Improve VM name validation | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux Advanced Virtualization | Reporter: | Michal Privoznik <mprivozn> |
Component: | libvirt | Assignee: | Michal Privoznik <mprivozn> |
Status: | CLOSED ERRATA | QA Contact: | jiyan <jiyan> |
Severity: | low | Docs Contact: | |
Priority: | medium | ||
Version: | 8.2 | CC: | gveitmic, jdenemar, jsuchane, lmen, mavital, michal.skrivanek, mprivozn, msekleta, mtessun, rbarry, srosenbe, virt-maint, xuzhang |
Target Milestone: | rc | Keywords: | Upstream |
Target Release: | 8.0 | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | libvirt-6.0.0-11.el8 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | 1721804 | Environment: | |
Last Closed: | 2020-05-05 09:57:51 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 1721804 |
Description
Michal Privoznik
2020-02-28 16:35:16 UTC
Pushed as: 2695191a44 conf: Don't generate machine names with a dot v6.1.0-85-g2695191a44 Reproduced this bug with libvirt-6.0.0-10.module+el8.2.0+5984+dce93708.x86_64. Version: kernel-4.18.0-187.el8.x86_64 qemu-kvm-4.2.0-15.module+el8.2.0+6029+618ef2ec.x86_64 libvirt-6.0.0-10.module+el8.2.0+5984+dce93708.x86_64 Steps: #### 1: Create a VM which has . in its name # cat vm1.xml | grep "<name>" <name>vm1.</name> # virsh create vm1.xml error: Failed to create domain from vm1.xml error: Invalid machine name #### 2: Rename a VM with . in the new name # cat vm1.xml | grep "<name>" <name>vm1</name> # virsh define vm1.xml Domain vm1 defined from vm1.xml # virsh domrename vm1 vm1. Domain successfully renamed # virsh domstate vm1. shut off # virsh start vm1. error: Failed to start domain vm1. error: Invalid machine name #### 3: Start a VM which has . in its name # cat vm1.xml | grep "<name>" <name>vm1.</name> # virsh define vm1.xml Domain vm1. defined from vm1.xml # virsh start vm1. error: Failed to start domain vm1. error: Invalid machine name Verified this bug with libvirt-6.0.0-14.module+el8.2.0+6069+78a1cb09.x86_64. Steps: 1: Update libvirt # yum update libvirt* -y # rpm -qa libvirt libvirt-6.0.0-14.module+el8.2.0+6069+78a1cb09.x86_64 # systemctl restart libvirt #### 2: Create a VM which has . in its name # cat vm1.xml | grep "<name>" <name>vm1.</name> # virsh create vm1.xml Domain vm1. created from vm1.xml # virsh list --all Id Name State ---------------------- 3 vm1. running # machinectl list MACHINE CLASS SERVICE OS VERSION ADDRESSES qemu-3-vm1 vm libvirt-qemu - - - 1 machines listed. #### 3: Rename a VM with . in the new name # cat vm1.xml | grep "<name>" <name>vm1</name> # virsh define vm1.xml Domain vm1 defined from vm1.xml # virsh domrename vm1 vm1. Domain successfully renamed # virsh start vm1. Domain vm1. started # virsh list --all Id Name State ---------------------- 2 vm1. running # machinectl list MACHINE CLASS SERVICE OS VERSION ADDRESSES qemu-2-vm1 vm libvirt-qemu - - - 1 machines listed. #### 4: Start a VM which has . in its name # cat vm1.xml | grep "<name>" <name>vm1.</name> # virsh define vm1.xml Domain vm1. defined from vm1.xml # virsh start vm1. Domain vm1. started # virsh list --all Id Name State ---------------------- 4 vm1. running # machinectl list MACHINE CLASS SERVICE OS VERSION ADDRESSES qemu-4-vm1 vm libvirt-qemu - - - 1 machines listed. All the test results are as expected, move this bug to be verified. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2020:2017 |