diff --git a/qubes/vm/__init__.py b/qubes/vm/__init__.py index a71a40243..accee85a5 100644 --- a/qubes/vm/__init__.py +++ b/qubes/vm/__init__.py @@ -52,13 +52,13 @@ def validate_name(holder, prop, value): raise qubes.exc.QubesValueError( 'VM name must be shorter than 32 characters') - if re.match(r"\A[0-9_-].*\Z", value) is not None: + if re.match(r"\A[0-9_.-].*\Z", value) is not None: if holder is not None and prop is not None: raise qubes.exc.QubesPropertyValueError(holder, prop, value, - '{} cannot start with hyphen, underscore or numbers'.format( - prop.__name__)) + '{} cannot start with hyphen, underscore, dot ' \ + 'or numbers'.format(prop.__name__)) raise qubes.exc.QubesValueError( - 'VM name cannot start with hyphen, underscore or numbers') + 'VM name cannot start with hyphen, underscore, dot or numbers') # this regexp does not contain '+'; if it had it, we should specifically # disallow 'lost+found' #1440