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 638962 - [6.0] 'virsh start' succeeds even if an invalid domain is configured to an xml file.
Summary: [6.0] 'virsh start' succeeds even if an invalid domain is configured to an xm...
Keywords:
Status: CLOSED DUPLICATE of bug 639599
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.0
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Osier Yang
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-09-30 13:54 UTC by Sadique Puthen
Modified: 2011-09-29 19:23 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-03-01 16:42:23 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Sadique Puthen 2010-09-30 13:54:59 UTC
Description of problem:

"virsh start" succeeds even if an invalid guest name is configured to an xml
file. Assume an invalid "#" is specified as a domain name, "virsh start" should report an error message like "invalid domain name", but the guest is started successfully without any errors.

# is an illegal name. When I try to name a guest as # via virt-manager, it says.

"Invalid system name, Guest name can only contain alphanumeric, '-', '.' or '-'  characters."

So virsh would report an error message and should not start the guest.

Version-Release number of selected component:

Red Hat Enterprise Linux Version Number: 6
Release Number: snapshot13
Architecture: x86_64
Kernel Version: kernel-2.6.32-70.el6.x86_64
Related Package Version: libvirt-client-0.8.1-27.el6.x86_64

How reproducible:

Always.

Steps to Reproduce:
1. Edit the xml file and change the name of the guest to #

<domain type='kvm'>
  <name>#</name>
  <uuid>92ae9226-70ca-d0e8-ab41-2ebfe2edbf3c</uuid>
  <memory>1048576</memory>

2.start the guest

# virsh start \#
Domain # started 

# virsh dumpxml \#
<domain type='kvm' id='1'>
  <name>#</name>
  <uuid>92ae9226-70ca-d0e8-ab41-2ebfe2edbf3c</uuid>
  <memory>1048576</memory>
  <currentMemory>1048576</currentMemory>

 # virsh list
 Id Name                 State
----------------------------------
  1 #                    running
 
Actual results:

virsh is able to start the guest if an invalid name is specified in the guest xml file.

Expected results:

virsh should report an error and should not start the guest.

Additional info:

Comment 2 Dave Allan 2011-03-01 16:42:23 UTC
virsh does not enforce the XML schema for permissible domain names.  However, the XML schema needs to be very broad to encompass all possible valid names across all hypervisors, and the validity of the name should be enforced by the hypervisor driver or the hypervisor.  IMO, the bug is that the domain.rng is too restrictive, as "#" may be a valid name for some hypervisors.  I'm closing this bz as a duplicate of 639599, and we can discuss the proper behavior there.  BTW, it's perfectly correct for virt-manager to enforce a stricter definition of what's a valid name.

*** This bug has been marked as a duplicate of bug 639599 ***


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