Bug 848403 - don't allow underscore "_" in new Windows VM names
don't allow underscore "_" in new Windows VM names
Status: CLOSED NEXTRELEASE
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine (Show other bugs)
3.1.0
Unspecified Unspecified
unspecified Severity unspecified
: ---
: 3.5.0
Assigned To: Shahar Havivi
Pavel Stehlik
virt
:
Depends On: 906243
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-15 09:46 EDT by David Jaša
Modified: 2014-04-22 16:10 EDT (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-04-22 16:10:19 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description David Jaša 2012-08-15 09:46:04 EDT
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 05:23:50 EDT
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 14:32:33 EST
(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 05:45:57 EST
Arthur , please specify which approach should be implemented from comment 2 in order to resolve this issue
Comment 6 Arthur Berezin 2014-04-02 19:43:56 EDT
moving needinfo on Scott Herold/Virt PM
Comment 7 Scott Herold 2014-04-22 16:10:19 EDT
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.