FAI going to the cloud

Thomas Lange lange at informatik.uni-koeln.de
Fri Jul 29 16:27:23 CEST 2016


A new beta version of FAI is available. It now includes a new command
for creating cloud^Wdisk images. fai-diskimage can create a raw or
qcow2 disk image without starting a virtual machine. This image is
ready-to-boot for your VM or cloud instance. Currently it has no man
page, but a help is printed when calling with -h.

I plan to release FAI 5.2 in september, so any feedback is welcome.

Here's a log from a call of fai-diskimage:

# fai-diskimage -u cloudhost -S900M -cDEFAULT,DEBIAN,AMD64,FAIBASE,DEMO,GRUB_PC,CLOUD /tmp/disk
Formatting '/tmp/disk.raw', fmt=raw size=943718400 
             -------------------------------------------------
                   Fully Automatic Installation  -  FAI

                   5.2~beta11   (c) 1999-2016
               Thomas Lange  <lange at informatik.uni-koeln.de>
             -------------------------------------------------
Starting FAI execution - 20160729_153848
Hostname set to cloudhost

Using configuration files from /etc/fai
Calling task_confdir
FAI_FLAGS: 
Setting SERVER=. Value extracted from FAI_CONFIG_SRC.
No monitor daemon defined.
FAI_CONFIG_SRC is set to file:///srv/fai/config
Using local path /srv/fai/config as config space.
Source hook: setup.DEFAULT.sh
setup.DEFAULT.sh     OK.
Calling task_setup
FAI_FLAGS: 
Calling task_defclass
List of all classes:  DEFAULT DEBIAN AMD64 FAIBASE DEMO GRUB_PC CLOUD
Calling task_defvar
++ CONSOLEFONT=
++ KEYMAP=us-latin1
++ MODULESLIST='usbhid psmouse'
++ FAI_RAMDISKS='/tmp/fai-diskimage.Di5gWk/var/lib/dpkg /tmp/fai-diskimage.Di5gWk/var/cache'
++ FAI_ALLOW_UNSIGNED=1
++ UTC=yes
++ TIMEZONE=Europe/Berlin
++ ROOTPW=XXXXXXXXXXXXX
++ STOP_ON_ERROR=700
++ MAXPACKAGES=800
Calling task_action
FAI_ACTION: install
Performing FAI installation. All data may be overwritten!
Calling task_install
Calling task_partition
Starting setup-storage 2.0
Using config file: /srv/fai/config/disk_config/CLOUD
Parted could not read a disk label (new disk?)
Executing: parted -s /dev/loop0 mklabel msdos
    DEGRADED MODE. Incomplete RAID LVs will be processed.
    Finding all volume groups
  No volume groups found
Executing: parted -s /dev/loop0 mklabel msdos
Executing: parted -s /dev/loop0 mkpart primary "ext3" 1048576B 854589439B
Executing: parted -s /dev/loop0 set 1 boot on
Executing: parted -s /dev/loop0 mkpart primary "ext3" 854589440B 943718399B
Executing: mkfs.ext4  /dev/loop0p1
Executing: tune2fs -c 0 -i 0 /dev/loop0p1
Executing: mkfs.ext4 -L home -m 1 /dev/loop0p2
Executing: tune2fs -c 0 -i 0 /dev/loop0p2
/dev/loop0p2 UUID=300fd2ca-7363-4b74-a41d-969dd722894b
/dev/loop0p2 LABEL=home
/dev/loop0p1 UUID=138cf8b3-bb1d-426b-bdfc-7e27fbedcf2a
Calling task_mountdisks
Calling task_extrbase
Unpacking distro base archive
ftar: extracting /srv/fai/config/basefiles/CLOUD.tar.xz to /tmp/fai-diskimage.Di5gWk/
Calling task_debconf
Calling task_repository
'/etc/resolv.conf' -> '/tmp/fai-diskimage.Di5gWk/etc/resolv.conf'
'/etc/hosts' -> '/tmp/fai-diskimage.Di5gWk/etc/hosts' (backup: '/tmp/fai-diskimage.Di5gWk/etc/hosts.orig')
fcopy: no matching file for any class for etc/apt/sources.list defined.
'/etc/fai/apt/sources.list' -> '/tmp/fai-diskimage.Di5gWk/etc/apt/sources.list'
fcopy: no matching file for any class for etc/apt/sources.list defined.
fcopy: copied /srv/fai/config/files/etc/apt/apt.conf.d/force_confdef/DEBIAN to /tmp/fai-diskimage.Di5gWk/etc/apt/apt.conf.d/force_confdef
Loading APT key from DEBIAN.asc OK
Calling hook: updatebase.DEBIAN
updatebase.DEBIAN    OK.
Calling task_updatebase
Calling hook: instsoft.DEBIAN
fcopy: destination etc/apt/apt.conf.d/force_confdef remains unchanged
instsoft.DEBIAN      OK.
Calling task_instsoft
Installing software may take a while
Calling task_configure
Executing    shell: DEBIAN/10-rootpw
DEBIAN/10-rootpw     OK.
Executing    shell: DEBIAN/20-capabilities
DEBIAN/20-capabilities OK.
Executing    shell: DEBIAN/30-interface
DEBIAN/30-interface  OK.
Executing    shell: DEBIAN/40-misc
DEBIAN/40-misc       OK.
Executing    shell: FAIBASE/10-misc
FAIBASE/10-misc      OK.
Executing    shell: FAIBASE/20-removable_media
FAIBASE/20-removable_media OK.
Executing    shell: DEMO/10-misc
DEMO/10-misc         OK.
Executing    shell: GRUB_PC/10-setup
GRUB_PC/10-setup     OK.
Executing    shell: CLOUD/99-cleanup
CLOUD/99-cleanup     OK.
Calling task_tests
Calling task_finish
Filesystem          Type      Size  Used Avail Use% Mounted on
/dev/loop0p1        ext4      786M  627M  103M  86% /tmp/fai-diskimage.Di5gWk
/dev/loop0p2        ext4       79M  1.6M   75M   3% /tmp/fai-diskimage.Di5gWk/home
Fri Jul 29 15:39:29 CEST 2016
The install took 41 seconds.
Calling task_chboot
Calling task_savelog
$LOGUSER is undefined. Not saving log files to remote.
Calling task_faiend
End of /usr/sbin/fai
Size of disk image and filename: 649M   /tmp/disk.raw
Image created by: /usr/sbin/fai-diskimage -u cloudhost -S900M -cDEFAULT,DEBIAN,AMD64,FAIBASE,DEMO,GRUB_PC,CLOUD /tmp/disk
-- 
regards Thomas (Mrfai)


More information about the linux-fai mailing list