Alan Pevec
2008-Apr-15 21:22 UTC
[Ovirt-devel] [PATCH] use Fedora9 for building oVirt host images
use Fedora9 for building oVirt host images - http://ovirt.org/repos/ovirt/9/ yum repo (incoming) contains only collectd for now - livecd-creator --skip-minimize to avoid osmin.img - not needed for oVirt host - network service is not enabled by default in F9 - add serial console, workaround for F9 livecd KVM guest dying with standard console only. VNC console will go blank but node will continue to boot and it's accessible via ssh or libvirt RPC. You can also access it via ttyS0 mini-howto: access serial console of a KVM guest (thanks Gerd and Chris): # cat > /usr/bin/qemu-kvm-serial <<EOF #!/bin/sh exec /usr/bin/qemu-kvm -serial telnet:localhost:10057,server,nowait "$@" EOF # chmod +x /usr/bin/qemu-kvm-serial then change <emulator> to /usr/bin/qemu-kvm-serial redefine and restart guest. telnet localhost 10057 to access guest's ttyS0 diff --git a/ovirt-host-creator/common-install.ks b/ovirt-host-creator/common-install.ks index bb6b317..752f837 100644 --- a/ovirt-host-creator/common-install.ks +++ b/ovirt-host-creator/common-install.ks @@ -5,12 +5,9 @@ auth --useshadow --enablemd5 selinux --disabled firewall --disabled part / --size 450 -services --enabled=ntpd,collectd,iptables +services --enabled=ntpd,collectd,iptables,network bootloader --timeout=1 rootpw --iscrypted Xa8QeYfWrtscM -repo --name=f8 --mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-8&arch=$basearch -repo --name=f8-updates --mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-f8&arch=$basearch -# Not using rawhide currently -#repo --name=rawhide --mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=rawhide&arch=$basearch -repo --name=ovirt-host --baseurl=http://ovirt.et.redhat.com/repos/ovirt-host-repo/$basearch/ +repo --name=f9 --mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=rawhide&arch=$basearch +repo --name=ovirt-host --baseurl=http://ovirt.org/repos/ovirt/9/$basearch/ diff --git a/ovirt-host-creator/ovirt-common.sh b/ovirt-host-creator/ovirt-common.sh index 8dfd365..2ada16e 100644 --- a/ovirt-host-creator/ovirt-common.sh +++ b/ovirt-host-creator/ovirt-common.sh @@ -2,10 +2,10 @@ create_iso() { KICKSTART=ovirt-`uname -i`.ks if [ $# -eq 0 ]; then LABEL=ovirt-`date +%Y%m%d%H%M` - /usr/bin/livecd-creator -c $KICKSTART -f $LABEL 1>&2 && + /usr/bin/livecd-creator --skip-minimize -c $KICKSTART -f $LABEL 1>&2 && echo $LABEL.iso elif [ $# -eq 1 ]; then - /usr/bin/livecd-creator -c $KICKSTART -b $1 1>&2 && + /usr/bin/livecd-creator --skip-minimize -c $KICKSTART -b $1 1>&2 && echo $1 else return 1 diff --git a/ovirt-host-creator/ovirt-pxe.sh b/ovirt-host-creator/ovirt-pxe.sh index 8db83bf..6bdc540 100755 --- a/ovirt-host-creator/ovirt-pxe.sh +++ b/ovirt-host-creator/ovirt-pxe.sh @@ -31,3 +31,7 @@ fi ISO=`create_iso $ISO` || exit 1 /usr/bin/livecd-iso-to-pxeboot $ISO + +# workaround for console=tty dying during start_udev in F9 KVM guest +sed -i -e 's/ *console=[a-zA-Z0-9,]*//g;s/ *APPEND.*/& console=tty console=ttyS0,115200/' tftpboot/pxelinux.cfg/default +
Perry N. Myers
2008-Apr-15 22:03 UTC
[Ovirt-devel] [PATCH] use Fedora9 for building oVirt host images
Alan Pevec wrote:> use Fedora9 for building oVirt host images > > - http://ovirt.org/repos/ovirt/9/ yum repo (incoming) contains only > collectd for now > - livecd-creator --skip-minimize to avoid osmin.img - not needed for > oVirt host > - network service is not enabled by default in F9 > - add serial console, workaround for F9 livecd KVM guest dying with > standard console only. > VNC console will go blank but node will continue to boot and it's > accessible via ssh or libvirt RPC. > You can also access it via ttyS0There is still the 180s delay problem with udev in this though right? Is there any workaround for that yet? Perry
Ian Main
2008-Apr-15 23:22 UTC
[Ovirt-devel] [PATCH] use Fedora9 for building oVirt host images
I just put the repo up, for those who want to try it. Ian On Tue, 15 Apr 2008 23:22:07 +0200 Alan Pevec <apevec at redhat.com> wrote:> use Fedora9 for building oVirt host images > > - http://ovirt.org/repos/ovirt/9/ yum repo (incoming) contains only collectd for now > - livecd-creator --skip-minimize to avoid osmin.img - not needed for oVirt host > - network service is not enabled by default in F9 > - add serial console, workaround for F9 livecd KVM guest dying with standard console only. > VNC console will go blank but node will continue to boot and it's accessible via ssh or libvirt RPC. > You can also access it via ttyS0 > > mini-howto: access serial console of a KVM guest (thanks Gerd and Chris): > # cat > /usr/bin/qemu-kvm-serial <<EOF > #!/bin/sh > > exec /usr/bin/qemu-kvm -serial telnet:localhost:10057,server,nowait "$@" > > EOF > # chmod +x /usr/bin/qemu-kvm-serial > then change <emulator> to /usr/bin/qemu-kvm-serial > redefine and restart guest. telnet localhost 10057 to access guest's ttyS0 > > diff --git a/ovirt-host-creator/common-install.ks b/ovirt-host-creator/common-install.ks > index bb6b317..752f837 100644 > --- a/ovirt-host-creator/common-install.ks > +++ b/ovirt-host-creator/common-install.ks > @@ -5,12 +5,9 @@ auth --useshadow --enablemd5 > selinux --disabled > firewall --disabled > part / --size 450 > -services --enabled=ntpd,collectd,iptables > +services --enabled=ntpd,collectd,iptables,network > bootloader --timeout=1 > rootpw --iscrypted Xa8QeYfWrtscM > > -repo --name=f8 --mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-8&arch=$basearch > -repo --name=f8-updates --mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-f8&arch=$basearch > -# Not using rawhide currently > -#repo --name=rawhide --mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=rawhide&arch=$basearch > -repo --name=ovirt-host --baseurl=http://ovirt.et.redhat.com/repos/ovirt-host-repo/$basearch/ > +repo --name=f9 --mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=rawhide&arch=$basearch > +repo --name=ovirt-host --baseurl=http://ovirt.org/repos/ovirt/9/$basearch/ > > diff --git a/ovirt-host-creator/ovirt-common.sh b/ovirt-host-creator/ovirt-common.sh > index 8dfd365..2ada16e 100644 > --- a/ovirt-host-creator/ovirt-common.sh > +++ b/ovirt-host-creator/ovirt-common.sh > @@ -2,10 +2,10 @@ create_iso() { > KICKSTART=ovirt-`uname -i`.ks > if [ $# -eq 0 ]; then > LABEL=ovirt-`date +%Y%m%d%H%M` > - /usr/bin/livecd-creator -c $KICKSTART -f $LABEL 1>&2 && > + /usr/bin/livecd-creator --skip-minimize -c $KICKSTART -f $LABEL 1>&2 && > echo $LABEL.iso > elif [ $# -eq 1 ]; then > - /usr/bin/livecd-creator -c $KICKSTART -b $1 1>&2 && > + /usr/bin/livecd-creator --skip-minimize -c $KICKSTART -b $1 1>&2 && > echo $1 > else > return 1 > diff --git a/ovirt-host-creator/ovirt-pxe.sh b/ovirt-host-creator/ovirt-pxe.sh > index 8db83bf..6bdc540 100755 > --- a/ovirt-host-creator/ovirt-pxe.sh > +++ b/ovirt-host-creator/ovirt-pxe.sh > @@ -31,3 +31,7 @@ fi > ISO=`create_iso $ISO` || exit 1 > > /usr/bin/livecd-iso-to-pxeboot $ISO > + > +# workaround for console=tty dying during start_udev in F9 KVM guest > +sed -i -e 's/ *console=[a-zA-Z0-9,]*//g;s/ *APPEND.*/& console=tty console=ttyS0,115200/' tftpboot/pxelinux.cfg/default > + > > _______________________________________________ > Ovirt-devel mailing list > Ovirt-devel at redhat.com > https://www.redhat.com/mailman/listinfo/ovirt-devel
Jim Meyering
2008-Apr-16 12:04 UTC
[Ovirt-devel] [PATCH] use Fedora9 for building oVirt host images
Alan Pevec <apevec at redhat.com> wrote: ...> diff --git a/ovirt-host-creator/ovirt-pxe.sh b/ovirt-host-creator/ovirt-pxe.sh > index 8db83bf..6bdc540 100755 > --- a/ovirt-host-creator/ovirt-pxe.sh > +++ b/ovirt-host-creator/ovirt-pxe.sh > @@ -31,3 +31,7 @@ fi > ISO=`create_iso $ISO` || exit 1 > > /usr/bin/livecd-iso-to-pxeboot $ISO > + > +# workaround for console=tty dying during start_udev in F9 KVM guest > +sed -i -e 's/ *console=[a-zA-Z0-9,]*//g;s/ *APPEND.*/& console=tty console=ttyS0,115200/' tftpboot/pxelinux.cfg/default > +Hi Alan, That looks good. ACK. One nit: the " *" parts before "console=" and "APPEND". If you use two spaces, " *", or "\<", then it won't mistakenly match things like an imaginary noconsole=something_else option or "DO_NOT_APPEND". And it'd be nice for reviewers and overall readability to keep line length < 80, e.g.,: sed -i -e 's/ *console=[a-zA-Z0-9,]*//g' \ -e 's/ *APPEND.*/& console=tty console=ttyS0,115200/' \ tftpboot/pxelinux.cfg/default