Bug 848403 - don't allow underscore "_" in new Windows VM names
Summary: don't allow underscore "_" in new Windows VM names
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine
Version: 3.1.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: 3.5.0
Assignee: Shahar Havivi
QA Contact: Pavel Stehlik
URL:
Whiteboard: virt
Depends On: 906243
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-08-15 13:46 UTC by David Jaša
Modified: 2014-04-22 20:10 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-04-22 20:10:19 UTC
oVirt Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description David Jaša 2012-08-15 13:46:04 UTC
Description of problem:
don't allow underscore "_" in new Windows VM names

Windows VM names have special restrictions so that they're usable as AD Host Names as well without modification. AD's DNS Host Names do however disallow underscore "_" character [1] so it should be disallowed from Windows VM names, too.

[1] http://support.microsoft.com/kb/909264

Version-Release number of selected component (if applicable):
si13.2 / 3.1.0-11.el6ev

How reproducible:
always

Steps to Reproduce:
1. create a new VM with underscore in its name and OS type set to Windows
2.
3.
  
Actual results:
VM is created

Expected results:
RHEV-M should complain about disallowed character

Additional info:

Comment 1 Simon Grinberg 2012-10-07 09:23:50 UTC
Did you check all other and only underscore is a problem? 

If not then we should probably change this bug to - 'Windows computer name' must follow the supported names by Microsoft:  http://support.microsoft.com/kb/909264

On the other hand there was a request for machine names not to restrict anything and give responsibility to the user (don't nanny the user). User that isn't using the RHEV Syspreping mechanism may wish to provide any name he likes to the VM (example use an alias and not the real machine name) 

I'll raise the above on RHEV-devel. ATM leaving the restriction since this is the current definition of the product, and any mismatch should be fixed.

Comment 2 David Jaša 2012-12-04 19:32:33 UTC
(In reply to comment #1)
> Did you check all other and only underscore is a problem? 
> 
> If not then we should probably change this bug to - 'Windows computer name'
> must follow the supported names by Microsoft: 
> http://support.microsoft.com/kb/909264

Yes, we should block union of these groups of characters (and drop netbios group if/when we'll support only OSs that won't know netbios names anymore):

Disallowed characters
NetBIOS computer names cannot contain the following characters:

    backslash (\)
    slash mark (/)
    colon (:)
    asterisk (*)
    question mark (?)
    quotation mark (")
    less than sign (<)
    greater than sign (>)
    vertical bar (|)

...

DNS host names cannot contain the following characters:

    comma (,)
    tilde (~)
    colon (:)
    exclamation point (!)
    at sign (@)
    number sign (#)
    dollar sign ($)
    percent (%)
    caret (^)
    ampersand (&)
    apostrophe (')
    period (.)
    parentheses (())
    braces ({})
    underscore (_)
    white space (blank)

> 
> On the other hand there was a request for machine names not to restrict
> anything and give responsibility to the user (don't nanny the user). User
> that isn't using the RHEV Syspreping mechanism may wish to provide any name
> he likes to the VM (example use an alias and not the real machine name) 

There are three ways to tackle this:

1) just warn if name contain one of the characters above (in non-intrusive way, something similar to warning about impossible migration with USB policy: Native in 3.1)

2) detect if the VM is going to be sysprep'd, prevent disallowed characters in VM name then, don't warn about them otherwise.

3) combine 1) and 2), the warning could be of just a footnote-like prominency then.

If 2) is semi-manual (have a on-by-default checkbox that would enable/disable sysprep options; mount sysprep floppy when it is enabled and disable it when info received from rhev-agent suggests that the VM was successfully sysprep'd), it shouldn't be as hard as it seems on first sight.

Comment 4 Eli Mesika 2014-02-09 10:45:57 UTC
Arthur , please specify which approach should be implemented from comment 2 in order to resolve this issue

Comment 6 Arthur Berezin 2014-04-02 23:43:56 UTC
moving needinfo on Scott Herold/Virt PM

Comment 7 Scott Herold 2014-04-22 20:10:19 UTC
Agree with Comment 5.  When BZ 906243 is implemented, the VM Server name will be independent of Windows Host name, so we will not have the restrictions that currently exist.  We will need to ensure 906243 implements the proper filters from Comment 2 when configuring netbios name.

Move to CLOSED-NEXTRELEASE once 906243 moves to verified


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