bddf99c876259b9cea3934e3c92b8eca4a6e495f
[genesis.git] / fuel / build / f_isoroot / f_kscfg / ks.cfg.orig
1 install
2 text
3 %include /tmp/source.ks
4 reboot --eject
5 lang en_US.UTF-8
6 keyboard us
7 rootpw r00tme
8 timezone --utc Etc/UTC
9 firewall --disabled
10 selinux --disabled
11 # ignore unsupported hardware warning
12 unsupported_hardware
13 # SKIP CONFIGURING X
14 skipx
15 # NEVER ever place zerombr here, it breaks automated installation
16 %include /tmp/bootloader.ks
17 %include /tmp/partition.ks
18
19 # PREINSTALL SECTION
20 # HERE ARE COMMANDS THAT WILL BE LAUNCHED BEFORE
21 # INSTALLATION PROCESS ITSELF
22 %pre
23 #!/bin/sh
24
25 # hard drives
26 drives=""
27 removable_drives=""
28 for drv in `ls -1 /sys/block | grep "sd\|hd\|vd\|cciss"`; do
29     if (grep -q 0 /sys/block/${drv}/removable); then
30         drives="${drives} ${drv}"
31     else
32         removable_drives="${removable_drives} ${drv}"
33     fi
34 done
35 default_drive=`echo ${drives} ${removable_drives} | awk '{print $1}'`
36
37 installdrive="undefined"
38 forceformat="no"
39 for I in `cat /proc/cmdline`; do case "$I" in *=*) eval $I;; esac ; done
40
41 set ${drives} ${removable_drives}
42 numdrives=`echo $#`
43
44 tgtdrive="${installdrive}"
45
46 function confirm_format {
47   check_drive="$1"
48   local confirm_format="no"
49
50   if [[ "$forceformat" == "yes" ]] ; then
51     return 0
52   fi
53
54   if parted -s /dev/$check_drive print &>/dev/null ; then
55     echo
56     echo "$check_drive drive contains partition table:"
57     parted -s /dev/$check_drive print
58     echo
59     read -p "Are you sure you want to erase ALL data on disk $check_drive? (y/N)" confirm_format
60     if [[ "$confirm_format" == "y" ]] || [[ "$confirm_format" == "Y" ]] || [[ "$forceformat" == "yes" ]]; then
61       return 0
62     else
63       return 1
64     fi
65   else
66     return 0
67   fi
68 }
69
70 format_confirmed="no"
71
72 if [ $numdrives -lt 1 ]; then
73     exec < /dev/tty3 > /dev/tty3 2>&1
74     chvt 3
75     clear
76     echo
77     echo '********************************************************************'
78     echo '*                            E R R O R                             *'
79     echo '*                                                                  *'
80     echo '*      There is no suitable media available for installation.      *'
81     echo '*                Please attach a drive and try again.              *'
82     echo '*                                                                  *'
83     echo '********************************************************************'
84     echo
85     read -p "Press Enter to shut down the system: " _
86     poweroff
87 fi
88
89 if [ ${numdrives} -gt 1 ] || [ `echo ${drives} | wc -w` -eq 0 ] ; then
90     exec < /dev/tty3 > /dev/tty3 2>&1
91     chvt 3
92     while [ "${tgtdrive}" = "undefined" ]; do
93         clear
94         echo
95         echo '********************************************************************************'
96         echo '*                                 W A R N I N G                                *'
97         echo '*                                                                              *'
98         echo '*  Which of the detected hard drives do you want to be used as                 *'
99         echo '*  the installation target?                                                    *'
100         echo '*                                                                              *'
101         echo '********************************************************************************'
102         echo
103         echo "Possible choices"
104         echo "Persistent drives: ${drives}"
105         echo "Removable drives: ${removable_drives}"
106         echo
107         if [ `echo ${drives} | wc -w` -eq 1 ] ; then
108             read -t 30 -p "Choose hard drive: " tgtdrive || tgtdrive=$default_drive
109         else
110             read -p "Choose hard drive: " tgtdrive
111         fi
112         match="no"
113         for drive in ${drives[@]} ${removable_drives[@]}; do
114           if [[ "$drive" == "$tgtdrive" ]] && match="yes" ; then
115             if confirm_format $tgtdrive ; then
116               format_confirmed="yes"
117               break
118             else
119               tgtdrive="undefined"
120               read -p "You may select another disk. Press Enter to continue." _
121             fi
122           fi
123         done
124         if [[ "$match" == "no" ]]; then
125           tgtdrive="undefined"
126           read -p "Invalid choice. Press Enter to continue." _
127         fi
128     done
129     clear
130     chvt 1
131 else
132     tgtdrive=`echo ${drives} | sed -e "s/^\s*//" -e "s/\s*$//"`
133 fi
134
135 if [ "$format_confirmed" != "yes" ] ; then
136   exec < /dev/tty3 > /dev/tty3 2>&1
137   chvt 3
138   if ! confirm_format $tgtdrive ; then
139       clear
140       echo
141       echo '********************************************************************'
142       echo '*                            E R R O R                             *'
143       echo '*                                                                  *'
144       echo '*           Disk $tgtdrive contains active partition(s).           *'
145       echo '*        Installation cannot continue without confirmation.        *'
146       echo '*                                                                  *'
147       echo '********************************************************************'
148       echo
149       read -p "Press Enter to restart: " _
150       reboot
151   fi
152   chvt 1
153 fi
154
155 # verify tgtdrive is at least 30GB
156 tgtdrivesize=$(( $(cat "/sys/class/block/${tgtdrive}/size") / 2 / 1024 ))
157 if [ $tgtdrivesize -lt 30720 ]; then
158     exec < /dev/tty3 > /dev/tty3 2>&1
159     chvt 3
160     clear
161     echo
162     echo '********************************************************************'
163     echo '*                            E R R O R                             *'
164     echo '*                                                                  *'
165     echo '*  Your disk is under 30GB in size. Installation cannot continue.  *'
166     echo '*             Restart installation with a larger disk.             *'
167     echo '*                                                                  *'
168     echo '********************************************************************'
169     echo
170     read -p "Press Enter to restart: " _
171     reboot
172 fi
173
174 # paths in /dev have "/" instead of "!" for cciss devices
175 tgtdrive=$(echo $tgtdrive | sed -e 's/!/\//')
176
177 # source
178 if test -e /dev/disk/by-uuid/will_be_substituted_with_actual_uuid; then
179     echo "harddrive --partition=UUID=will_be_substituted_with_actual_uuid --dir=/" > /tmp/source.ks
180 else
181     echo "cdrom" > /tmp/source.ks
182 fi
183
184 vgremove -ff os
185 dd if=/dev/zero of=/dev/${tgtdrive} bs=10M count=10
186 sleep 3
187 hdparm -z /dev/${tgtdrive}
188 parted -s /dev/${tgtdrive} mklabel gpt
189 parted -a none -s /dev/${tgtdrive} unit MiB mkpart primary 0 24
190 parted -s /dev/${tgtdrive} set 1 bios_grub on
191 parted -a none -s /dev/${tgtdrive} unit MiB mkpart primary fat16 24 224
192 parted -s /dev/${tgtdrive} set 2 boot on
193 parted -a none -s /dev/${tgtdrive} unit MiB mkpart primary 224 424
194 sleep 3
195 hdparm -z /dev/${tgtdrive}
196
197 # partition
198
199 # This adds support for the p seperator required for cciss devices
200 if echo ${tgtdrive} | grep -q -e cciss ; then
201     bootdev=${tgtdrive}p
202 else
203     bootdev=${tgtdrive}
204 fi
205 echo > /tmp/partition.ks
206 echo "partition /boot --onpart=/dev/${bootdev}3" >> /tmp/partition.ks
207 echo "partition pv.001 --ondisk=${tgtdrive} --size=30000 --grow" >> /tmp/partition.ks
208 echo "volgroup os pv.001" >> /tmp/partition.ks
209 echo "logvol swap --vgname=os --recommended --name=swap" >> /tmp/partition.ks
210 echo "logvol / --vgname=os --size=10000 --name=root --fstype=ext4" >> /tmp/partition.ks
211 echo "logvol /var --vgname=os --size=10000 --percent 60 --grow --name=var --fstype=ext4" >> /tmp/partition.ks
212 echo "logvol /var/log --vgname=os --size=4096 --percent 40 --grow --name=varlog --fstype=ext4" >> /tmp/partition.ks
213
214
215 # bootloader
216 echo "bootloader --location=mbr --driveorder=${tgtdrive} --append=' biosdevname=0 crashkernel=none'" > /tmp/bootloader.ks
217
218 # Anaconda can not install grub 0.97 on disks which are >4T.
219 # The reason is that grub does not support such large geometries
220 # and it simply thinks that the cylinder number has negative value.
221 # Here we just set geometry manually so that grub thinks that disk
222 # size is equal to 1G.
223 # 130 cylinders * (16065 * 512 = 8225280 bytes) = 1G
224 echo "%post --nochroot --log=/mnt/sysimage/root/anaconda-post-partition.log" > /tmp/post_partition.ks
225 echo "echo \"device (hd0) /dev/${tgtdrive}\" >> /tmp/grub.script" >> /tmp/post_partition.ks
226 echo "echo \"geometry (hd0) 130 255 63\" >> /tmp/grub.script" >> /tmp/post_partition.ks
227 echo "echo \"root (hd0,2)\" >> /tmp/grub.script" >> /tmp/post_partition.ks
228 echo "echo \"install /grub/stage1 (hd0) /grub/stage2 p /grub/grub.conf\" >> /tmp/grub.script" >> /tmp/post_partition.ks
229 echo "echo quit >> /tmp/grub.script" >> /tmp/post_partition.ks
230 echo "cat /tmp/grub.script | chroot /mnt/sysimage /sbin/grub --no-floppy --batch" >> /tmp/post_partition.ks
231
232 %end
233
234 %packages --nobase --excludedocs
235 @Core
236 authconfig
237 bind-utils
238 cronie
239 crontabs
240 curl
241 daemonize
242 dhcp
243 docker-io
244 fuelmenu
245 gdisk
246 lrzip
247 lsof
248 man
249 mlocate
250 nmap-ncat
251 ntp
252 openssh-clients
253 policycoreutils
254 rsync
255 ruby21-puppet
256 ruby21-rubygem-netaddr
257 ruby21-rubygem-openstack
258 selinux-policy-targeted
259 strace
260 subscription-manager
261 sysstat
262 system-config-firewall-base
263 tcpdump
264 telnet
265 vim-enhanced
266 virt-what
267 wget
268 yum
269
270 %include /tmp/post_partition.ks
271
272 # POSTINSTALL SECTION
273 # HERE ARE COMMANDS THAT WILL BE LAUNCHED JUST AFTER
274 # INSTALLATION ITSELF COMPLETED
275 %post
276 echo -e "modprobe nf_conntrack_ipv4\nmodprobe nf_conntrack_ipv6\nmodprobe nf_conntrack_tftp\nmodprobe nf_nat_tftp" >> /etc/rc.modules
277 chmod +x /etc/rc.modules
278 echo -e "net.nf_conntrack_max=1048576" >> /etc/sysctl.conf
279 mkdir -p /var/log/coredump
280 echo -e "kernel.core_pattern=/var/log/coredump/core.%e.%p.%h.%t" >> /etc/sysctl.conf
281 chmod 777 /var/log/coredump
282 echo -e "* soft core unlimited\n* hard core unlimited" >> /etc/security/limits.conf
283
284 # Mount installation media in chroot
285 %post --nochroot --log=/mnt/sysimage/root/anaconda-post-before-chroot.log
286 #!/bin/sh
287
288 SOURCE="/mnt/sysimage/tmp/source"
289
290 for I in `cat /proc/cmdline`; do case "$I" in *=*) eval $I;; esac ; done
291
292 mkdir -p "${SOURCE}"
293
294 case "${repo}" in
295   nfs:*)
296     nfs_url="${repo#nfs:}"
297     mount -t nfs "${nfs_url}" "${SOURCE}"
298   ;;
299   *)
300     if [ -d "/mnt/source" ]; then
301       mount -o bind "/mnt/source" "${SOURCE}"
302     fi
303   ;;
304 esac
305
306 %post --log=/root/anaconda-post-after-chroot.log
307 #!/bin/bash
308
309 set -x
310
311 function save_cfg {
312     scrFile="/etc/sysconfig/network-scripts/ifcfg-$device"
313     search="domain $domain\nsearch $domain"
314     sed -i -e 's#^\(HOSTNAME=\).*$#\1'"$hostname"'#' /etc/sysconfig/network
315     grep -q "^\s*$ip\s+$hostname" /etc/hosts || echo "$ip $hostname" >> /etc/hosts
316     echo "${search}\nnameserver 127.0.0.1" > /etc/resolv.conf
317     [ $dns1 ] && echo -e "${search}\nnameserver $dns1" > /etc/resolv.conf
318     [ $dns1 ] && echo -e "${search}\nnameserver $dns1" > /etc/dnsmasq.upstream
319     [ $dns2 ] && echo "nameserver $dns2" >> /etc/resolv.conf
320     [ $dns2 ] && echo "nameserver $dns2" >> /etc/dnsmasq.upstream
321
322     echo DEVICE=$device > $scrFile
323     echo ONBOOT=yes >> $scrFile
324     echo NM_CONTROLLED=no >> $scrFile
325     echo HWADDR=$hwaddr >> $scrFile
326     echo USERCTL=no >> $scrFile
327     echo PEERDNS=no >> $scrFile
328     if [ $ip ]; then
329         echo BOOTPROTO=static >> $scrFile
330         echo IPADDR=$ip >> $scrFile
331         echo NETMASK=$netmask >> $scrFile
332     else
333         echo BOOTPROTO=dhcp >> $scrFile
334     fi
335     scrDHCPFile="/etc/sysconfig/network-scripts/ifcfg-$dhcp_interface"
336     #Ignore gateway and set up DHCP if it is used, otherwise apply it
337     if [ $dhcp_interface ] && [ "$dhcp_interface" != "$device" ]; then
338         echo "DEVICE=$dhcp_interface" > $scrDHCPFile
339         echo "BOOTPROTO=dhcp" >> $scrDHCPFile
340         echo "ONBOOT=yes" >> $scrDHCPFile
341         echo "USERCTL=no" >> $scrDHCPFile
342     else
343         echo GATEWAY=$gw >> /etc/sysconfig/network
344     fi
345 }
346
347 # Default FQDN
348 hostname="nailgun.mirantis.com"
349
350 for I in `cat /proc/cmdline`; do case "$I" in *=*) eval $I;; esac ; done
351 hostname=$hostname
352 domain=${hostname#*.}
353 ip=$ip
354 netmask=$netmask
355 gw=$gw
356 device="eth0"
357 hwaddr=`ifconfig $device | grep -i hwaddr | sed -e 's#^.*hwaddr[[:space:]]*##I'`
358 dhcp_interface=$dhcp_interface
359 save_cfg
360
361 # Mounting installation source
362 SOURCE=/tmp/source
363 FS=/tmp/fs
364
365 echo
366 mkdir -p ${SOURCE}
367 mkdir -p ${FS}
368
369 if test -e /dev/disk/by-uuid/will_be_substituted_with_actual_uuid; then
370     mount /dev/disk/by-uuid/will_be_substituted_with_actual_uuid ${FS}
371     mount -o loop ${FS}/nailgun.iso ${SOURCE}
372 fi
373
374 OPENSTACK_VERSION=`cat ${SOURCE}/openstack_version`
375
376 # ----------------------
377 # UNPACKING REPOSITORIES
378 # ----------------------
379
380 wwwdir="/var/www/nailgun"
381 repodir="${wwwdir}/${OPENSTACK_VERSION}"
382
383 # Copying Centos files
384 mkdir -p ${repodir}/centos/x86_64
385 cp -r ${SOURCE}/images ${repodir}/centos/x86_64
386 cp -r ${SOURCE}/isolinux ${repodir}/centos/x86_64
387 cp -r ${SOURCE}/repodata ${repodir}/centos/x86_64
388 cp -r ${SOURCE}/Packages ${repodir}/centos/x86_64
389 cp ${SOURCE}/.treeinfo ${repodir}/centos/x86_64
390
391 # Copying Ubuntu files
392 mkdir -p ${repodir}/ubuntu/x86_64/images
393 cp -r ${SOURCE}/ubuntu/conf ${repodir}/ubuntu/x86_64
394 cp -r ${SOURCE}/ubuntu/db ${repodir}/ubuntu/x86_64
395 cp -r ${SOURCE}/ubuntu/dists ${repodir}/ubuntu/x86_64
396 cp -r ${SOURCE}/ubuntu/indices ${repodir}/ubuntu/x86_64
397 cp -r ${SOURCE}/ubuntu/pool ${repodir}/ubuntu/x86_64
398 cp -r ${SOURCE}/ubuntu/installer-amd64/current/images/netboot/ubuntu-installer/amd64/linux ${repodir}/ubuntu/x86_64/images
399 cp -r ${SOURCE}/ubuntu/installer-amd64/current/images/netboot/ubuntu-installer/amd64/initrd.gz ${repodir}/ubuntu/x86_64/images
400
401 # make links for backward compatibility
402 ln -s ${repodir}/centos ${wwwdir}/centos
403 ln -s ${repodir}/ubuntu ${wwwdir}/ubuntu
404
405 # Copying bootstrap image
406 mkdir -p ${wwwdir}/bootstrap
407 cp -r ${SOURCE}/bootstrap/initramfs.img ${wwwdir}/bootstrap
408 cp -r ${SOURCE}/bootstrap/linux ${wwwdir}/bootstrap
409
410 # Copying target images
411 cp -r ${SOURCE}/targetimages ${wwwdir}
412
413 mkdir -p /root/.ssh
414 chmod 700 /root/.ssh
415 cp ${SOURCE}/bootstrap/bootstrap.rsa /root/.ssh
416 chmod 600 /root/.ssh/bootstrap.rsa
417
418 # --------------------------
419 # UNPACKING PUPPET MANIFESTS
420 # --------------------------
421
422 # create folders
423 mkdir -p /etc/puppet/${OPENSTACK_VERSION}/manifests/
424 mkdir -p /etc/puppet/${OPENSTACK_VERSION}/modules/
425 rm -rf /etc/puppet/modules/
426
427 # TODO(ikalnitsky): investigate why we need this
428 cp ${SOURCE}/puppet-slave.tgz ${wwwdir}/
429
430 # place modules and manifests
431 tar zxf ${SOURCE}/puppet-slave.tgz -C /etc/puppet/${OPENSTACK_VERSION}/modules
432 cp /etc/puppet/${OPENSTACK_VERSION}/modules/osnailyfacter/examples/site.pp /etc/puppet/${OPENSTACK_VERSION}/manifests/site.pp
433 cp ${SOURCE}/centos-versions.yaml ${SOURCE}/ubuntu-versions.yaml /etc/puppet/${OPENSTACK_VERSION}/manifests/
434
435 # make links for backward compatibility
436 pushd /etc/puppet
437 ln -s ${OPENSTACK_VERSION}/manifests/ /etc/puppet/manifests
438 ln -s ${OPENSTACK_VERSION}/modules/ /etc/puppet/modules
439 popd
440
441 cp ${SOURCE}/send2syslog.py /bin/send2syslog.py
442 mkdir -p /var/lib/hiera
443 touch /var/lib/hiera/common.yaml /etc/puppet/hiera.yaml
444
445 # Deploy docker images and ctl tools if we built ISO with docker containers support
446 [ -d "${SOURCE}/docker" ] && cp -r ${SOURCE}/docker ${wwwdir}/docker
447
448 # Prepare local repository specification
449 rm /etc/yum.repos.d/CentOS*.repo
450 cat > /etc/yum.repos.d/nailgun.repo << EOF
451 [nailgun]
452 name=Nailgun Local Repo
453 baseurl=file:/var/www/nailgun/${OPENSTACK_VERSION}/centos/x86_64
454 gpgcheck=0
455 EOF
456
457 # Disable subscription-manager plugins
458 sed -i 's/^enabled.*/enabled=0/' /etc/yum/pluginconf.d/product-id.conf || :
459 sed -i 's/^enabled.*/enabled=0/' /etc/yum/pluginconf.d/subscription-manager.conf || :
460
461 # Disable GSSAPI in ssh server config
462 sed -i -e "/^\s*GSSAPICleanupCredentials yes/d" -e "/^\s*GSSAPIAuthentication yes/d" /etc/ssh/sshd_config
463
464 # Copying bootstrap_admin_node.sh, chmod it and
465 # adding /etc/init/bootstrap_admin_node.conf
466 cp ${SOURCE}/bootstrap_admin_node.sh /usr/local/sbin/bootstrap_admin_node.sh
467 chmod 0777 /usr/local/sbin/bootstrap_admin_node.sh
468 cp ${SOURCE}/bootstrap_admin_node.conf /etc/init/bootstrap_admin_node.conf
469 echo "ENABLED=1" > /etc/sysconfig/bootstrap_admin_node
470
471 # Copying version.yaml file. It contains COMMIT_SHA of last commit.
472 RELEASE=$(awk '/release/{gsub(/"/, "");print $2}' ${SOURCE}/version.yaml)
473 mkdir -p /etc/nailgun /etc/fuel/${RELEASE} /etc/fuel/release_versions
474 cp ${SOURCE}/version.yaml /etc/nailgun/version.yaml
475 cp ${SOURCE}/version.yaml /etc/fuel/${RELEASE}/version.yaml
476 ln -s /etc/fuel/${RELEASE}/version.yaml /etc/fuel/version.yaml
477 cp ${SOURCE}/version.yaml /etc/fuel/release_versions/`cat  ${SOURCE}/openstack_version`.yaml
478
479 # Generete Fuel UUID
480 uuidgen > /etc/fuel/fuel-uuid
481
482 ###Run fuel menu
483 [ -z "$showmenu" ] && showmenu="no"
484 cat > /root/.showfuelmenu << EOF
485 #Set to yes to run Fuel Setup
486 #Set to no to accept default settings
487 showmenu=$showmenu
488 EOF
489
490 # Prepare custom /etc/issue logon banner and script for changing IP in it
491 cat > /etc/issue << EOF
492 #########################################
493 #       Welcome to the Fuel server      #
494 #########################################
495 Server is running on \m platform
496
497 Fuel UI is available on:
498 http://:8000
499
500 Default administrator login:    root
501 Default administrator password: r00tme
502
503 Default Fuel UI login: admin
504 Default Fuel UI password: admin
505
506 Please change root password on first login.
507
508 EOF
509
510
511 cat >> '/etc/rc.local' << EOF
512 first=yes
513 for ip in \$(ip -o -4 addr | grep "eth." | awk '{print \$4 }' | cut -d/ -f1); do
514 if [ "\$first" = "yes" ]; then
515   ipstr="Fuel UI is available on: http://\$ip:8000"
516   first=no
517 else
518   ipstr=\$(printf "%s\n%25s%s" "\$ipstr" " " "http://\$ip:8000")
519 fi
520 done
521 tmpissue=\$(mktemp)
522 while read -r line; do
523   if [[ "\$line" =~ "Fuel UI is available on" ]]; then
524     echo -e "\$ipstr" >> \$tmpissue
525   elif [[ "\$line" =~ :8000$ ]]; then
526     :
527   else
528     echo -e "\$line" >> \$tmpissue
529   fi
530 done < /etc/issue
531 mv "\$tmpissue" /etc/issue
532
533 EOF
534
535
536 # Unmounting source
537 umount -f ${SOURCE}
538 rm -rf ${SOURCE}
539
540 umount -f ${FS} || true
541 rm -rf ${FS}
542
543 # Enabling/configuring NTPD and ntpdate services
544 echo "server 127.127.1.0"            >> /etc/ntp.conf
545 echo "fudge  127.127.1.0 stratum 10" >> /etc/ntp.conf
546 echo "tos    orphan 7"               >> /etc/ntp.conf
547
548 # Do not show error message on ntpdate failure. Customers should not be confused
549 # if admin node does not have access to the internet time servers.
550 sed -i /etc/rc.d/init.d/ntpdate -e 's/\([ $RETVAL -eq 0 ] && success || \)failure/\1success/'
551
552 # Disabling splash
553 sed -i --follow-symlinks -e '/^\skernel/ s/rhgb//' /etc/grub.conf
554 sed -i --follow-symlinks -e '/^\skernel/ s/quiet//' /etc/grub.conf
555
556 # Disabling console clearing
557 sed -i 's/getty/getty --noclear/' /etc/init/tty.conf
558
559 # Disabling starting first console from start-ttys service
560 sed -i --follow-symlinks -e 's/ACTIVE_CONSOLES=.*/ACTIVE_CONSOLES=\/dev\/tty\[2-6\]/' /etc/sysconfig/init
561
562 # Copying default bash settings to the root directory
563 cp -f /etc/skel/.bash* /root/
564
565 # Blacklist i2c_piix4 module for VirtualBox so it does not create kernel errors
566 [[ $(virt-what) = "virtualbox" ]] && echo "blacklist i2c_piix4" > /etc/modprobe.d/blacklist-i2c-piix4.conf
567
568 %end