CentOS / sig-cloud-instance-build

CentOS Cloud Instance SIG: Metadata to build & release instances
362 stars 167 forks source link

new value non-existent xfs filesystem is not valid as a default fs type #133

Open shirishk opened 6 years ago

shirishk commented 6 years ago

Hi, We have tied "The easy way" to create 'centos-7-docker.tar.xz', but getting following error on ./containerbuild.sh centos-7.ks

Note: We are running the command inside centos container.

sh-4.2# ./containerbuild.sh centos-7.ks
2018-06-28 10:45:00,465: livemedia-creator 19.6.104-1
2018-06-28 10:45:00,502: disk_size = 3GB
2018-06-28 10:45:00,503: disk_img = /var/tmp/centos-7-docker.tar.xz
Starting installer, one moment...
anaconda argparse: terminal size detection failed, using default width
[Errno 25] Inappropriate ioctl for device
anaconda 21.48.22.134-1 for CentOS 7 Docker 7 (pre-release) started.
10:45:02 Running pre-installation scripts
10:45:03 Not asking for VNC because we don't have Xvnc
Traceback (most recent call last):
  File "/usr/sbin/anaconda", line 1255, in <module>
    setupDisplay(anaconda, opts, addon_paths)
  File "/usr/sbin/anaconda", line 733, in setupDisplay
    anaconda.initInterface(addons)
  File "/usr/lib64/python2.7/site-packages/pyanaconda/anaconda.py", line 242, in initInterface
    self._intf = TextUserInterface(self.storage, self.payload,
  File "/usr/lib64/python2.7/site-packages/pyanaconda/anaconda.py", line 175, in storage
    self._setDefaultFSType(self._storage)
  File "/usr/lib64/python2.7/site-packages/pyanaconda/anaconda.py", line 191, in _setDefaultFSType
    storage.setDefaultFSType(fstype)
  File "/usr/lib/python2.7/site-packages/blivet/__init__.py", line 1761, in setDefaultFSType
    self._check_valid_fstype(newtype)
  File "/usr/lib/python2.7/site-packages/blivet/__init__.py", line 1736, in _check_valid_fstype
    raise ValueError("new value %s is not valid as a default fs type" % fmt)
ValueError: new value non-existent xfs filesystem is not valid as a default fs type
2018-06-28 10:45:10,144: Install failed: novirt_install failed
2018-06-28 10:45:10,144: Removing bad disk image
Traceback (most recent call last):
  File "/usr/sbin/livemedia-creator", line 1295, in <module>
    disk_img = make_image(opts, ks)
  File "/usr/sbin/livemedia-creator", line 914, in make_image
    os.unlink(disk_img)
OSError: [Errno 2] No such file or directory: '/var/tmp/centos-7-docker.tar.xz'

real    0m9.888s
user    0m4.681s
sys 0m4.887s
mv: cannot stat '/var/tmp/centos-7-docker.tar.xz': No such file or directory
shirishk commented 6 years ago

Dockerfile.txt

shirishk commented 6 years ago

We have also tied "The hard way" to create 'centos-7-docker.tar.xz', getting following error on livemedia-creator --make-tar --no-virt --iso=/tmp/boot7.iso --ks=centos-7.ks --image-name=centos-7-docker.tar.xz

sh-4.2# livemedia-creator --make-tar --no-virt --iso=/tmp/boot7.iso --ks=centos-7.ks --image-name=centos-7-docker.tar.xz
2018-06-28 10:49:50,295: livemedia-creator 19.6.104-1
2018-06-28 10:49:50,333: disk_size = 3GB
2018-06-28 10:49:50,333: disk_img = /var/tmp/centos-7-docker.tar.xz
Starting installer, one moment...
anaconda argparse: terminal size detection failed, using default width
[Errno 25] Inappropriate ioctl for device
anaconda 21.48.22.134-1 for Red Hat Enterprise Linux 7 (pre-release) started.
10:49:52 Running pre-installation scripts
10:49:53 Not asking for VNC because we don't have Xvnc
Traceback (most recent call last):
  File "/usr/sbin/anaconda", line 1255, in <module>
    setupDisplay(anaconda, opts, addon_paths)
  File "/usr/sbin/anaconda", line 733, in setupDisplay
    anaconda.initInterface(addons)
  File "/usr/lib64/python2.7/site-packages/pyanaconda/anaconda.py", line 242, in initInterface
    self._intf = TextUserInterface(self.storage, self.payload,
  File "/usr/lib64/python2.7/site-packages/pyanaconda/anaconda.py", line 175, in storage
    self._setDefaultFSType(self._storage)
  File "/usr/lib64/python2.7/site-packages/pyanaconda/anaconda.py", line 191, in _setDefaultFSType
    storage.setDefaultFSType(fstype)
  File "/usr/lib/python2.7/site-packages/blivet/__init__.py", line 1761, in setDefaultFSType
    self._check_valid_fstype(newtype)
  File "/usr/lib/python2.7/site-packages/blivet/__init__.py", line 1736, in _check_valid_fstype
    raise ValueError("new value %s is not valid as a default fs type" % fmt)
ValueError: new value non-existent xfs filesystem is not valid as a default fs type
2018-06-28 10:49:59,747: Install failed: novirt_install failed
2018-06-28 10:49:59,747: Removing bad disk image
Traceback (most recent call last):
  File "/usr/sbin/livemedia-creator", line 1295, in <module>
    disk_img = make_image(opts, ks)
  File "/usr/sbin/livemedia-creator", line 914, in make_image
    os.unlink(disk_img)
OSError: [Errno 2] No such file or directory: '/var/tmp/centos-7-docker.tar.xz'
jperrin commented 6 years ago

You're running into issues with anaconda in a containerized environment. I've not ever tested this to be run in a containerized environment. You may need to run it as a trusted container, and/or pass in /sys/ devices.