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:
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.
(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.
Arthur , please specify which approach should be implemented from comment 2 in order to resolve this issue
moving needinfo on Scott Herold/Virt PM
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