Bug 17062 - xen-create-image schlägt fehl
Summary: xen-create-image schlägt fehl
Status: CLOSED WONTFIX
Alias: None
Product: UCS
Classification: Unclassified
Component: Virtualization - Xen
Version: UCS 2.3
Hardware: Other Linux
: P5 normal
Target Milestone: ---
Assignee: Bugzilla Mailingliste
QA Contact:
URL: http://www.debian.org/doc/FAQ/ch-pkg_...
Keywords:
Depends on:
Blocks:
 
Reported: 2009-12-16 09:18 CET by Philipp Hahn
Modified: 2023-06-28 10:46 CEST (History)
1 user (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Customer ID:
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philipp Hahn univentionstaff 2009-12-16 09:18:46 CET
Versuch der Installation einer UCS_2.3 als domU unter Xen (ohne Anpassung des Iso-Images oder der InitRd):

# xen-create-image --hostname ucs23guest --mac 00:16:3e:b1:54:19 --dir /var/lib/xen --dhcp
### Teile Console-Ausgabe ###
WARNING
-------
  You appear to have a missing vif-script, or network-script, in the
 Xen configuration file /etc/xen/xend-config.sxp.

  Please fix this and restart Xend, or your guests will not be able
 to use any networking!
...
Installation method: debootstrap
Done
System installation failed.  Aborting

Logfile produced at:
         /var/log/xen-tools/ucs23guest.log
Please select one and only one of the installation methods:
 --dir
 --evms
 --lvm

### Logfile ###
Installation method: debootstrap
Falling back to default debootstrap command

Copying files from host to image.
Copying files from /var/cache/apt/archives -> /tmp/Cdu4NoTjIe/var/cache/apt/archives
Done
Done
I: Retrieving Packages.gz
I: Retrieving Packages
I: Resolving dependencies of required packages...
I: Resolving dependencies of base packages...
W: Failure trying to run: chroot /tmp/Cdu4NoTjIe mount -t proc proc /proc
...
The installation of the new system has failed.

The system is missing the common file: /bin/ls
Done
System installation failed.  Aborting
Comment 1 Philipp Hahn univentionstaff 2009-12-16 10:45:59 CET
xen-create-image ruft folgendes auf:
xt-install-image --hostname=ucs23-amd64 --location=/tmp/5QwnfJFs9F --dist=univention --install-method=debootstrap --mirror=file:///var/lib/univention-repository --cache=yes --verbose

das wiederum ruft folgendes auf:
/usr/sbin/debootstrap  --verbose univention /tmp/5QwnfJFs9F file:///var/lib/univention-repository

das wiederum führt folgendes aus:
chroot /tmp/5QwnfJFs9F mount -t proc proc /proc

/tmp/5QwnfJFs9F ist zu dem Zeitpunkt so gut wie leer:
root@xen1:/var/lib/xen# find /tmp/5QwnfJFs9F/ -type f
/tmp/5QwnfJFs9F/var/cache/apt/archives/univention-debmirror_3.0.0-1.53.200910051028_all.deb
/tmp/5QwnfJFs9F/var/lib/dpkg/info/dpkg.list
/tmp/5QwnfJFs9F/var/lib/dpkg/available
/tmp/5QwnfJFs9F/var/lib/dpkg/status
/tmp/5QwnfJFs9F/debootstrap/debootstrap.log
/tmp/5QwnfJFs9F/debootstrap/debpaths
/tmp/5QwnfJFs9F/etc/hostname
/tmp/5QwnfJFs9F/etc/fstab
/tmp/5QwnfJFs9F/etc/resolv.conf
/tmp/5QwnfJFs9F/etc/apt/sources.list

Wir scheinbar derzeit so nicht unterstütz, wie es unter https://billy.knut.univention.de/uniwiki/index.php/Xen beschrieben wird.
Comment 2 Philipp Hahn univentionstaff 2009-12-16 14:42:12 CET
Das Problem an der Stelle war die "fehlerhaft" gesetzte UCR-Variable xen/repository. Mit folgender Änderung geht es:
ucr set xen/repository="http://127.0.0.1/univention-repository/2.3/maintained/2.3-0"

Zusätzlich muß auch noch die Datei /var/lib/univention-repository/mirror/univention-repository/2.3/maintained/2.3-0/sources.list mit folgendem Inhalt angelegt werden:
 deb http://127.0.0.1/univention-repository/2.3/maintained/2.3-0 univention main

# file:///... funktioniert wegen der chroot-Ungebung nicht
# localhost kann zum Zeitpunkt /usr/lib/xen-tools/univention.d/20-setup-apt noch nicht aufgelöst werden, da /etc/hosts noch nicht existiert.


Im Logfile stehen noch ein paar Fehlermeldungen:
W: Failure while configuring base packages.
W: Failure while configuring base packages.
W: Failure while configuring base packages.
W: Failure while configuring base packages.
W: Failure while configuring base packages.
Finished : /usr/sbin/debootstrap  --verbose univention /tmp/hqSatQlBkr http://127.0.0.1/univention-repository/2.3/maintained/2.3-0 2>&1 | tee --append /var/log/xen-tools/ucs23-amd64.log

 /usr/lib/xen-tools/univention.d/55-create-dev: line 39: ./MAKEDEV: No such file or directory
 /usr/lib/xen-tools/univention.d/55-create-dev: line 40: ./MAKEDEV: No such file or directory
 /usr/lib/xen-tools/univention.d/55-create-dev: line 41: ./MAKEDEV: No such file or directory

Running hook 70-install-ssh ['/usr/lib/xen-tools/univention.d/70-install-ssh /tmp/0hQJM4xSaD']
...
The following packages have unmet dependencies:
  at: Depends: mail-transport-agent

Running hook 80-install-modules ['/usr/lib/xen-tools/univention.d/80-install-modules /tmp/0hQJM4xSaD']
...
The following packages have unmet dependencies:
  at: Depends: mail-transport-agent but it is not installable

Running hook 95-configure-locales ['/usr/lib/xen-tools/univention.d/95-configure-locales /tmp/0hQJM4xSaD']
...
The following packages have unmet dependencies:
  at: Depends: mail-transport-agent


1. debootstrap lädt die Package-Datei herunter
2. Er werden alle Pakete mit "Priority: required" und "Priority: important" installiert.
3. "at" benötigend zwingend einen "mail-transport-agent".
4. Dieses virtuelle Paket wird von "exim4" oder "postfix" bereitgestellt.
5. apt/dpkg/debootstrap können diese Entscheidung nicht selbständig auflösen und installieren deswegen keinen MTA.

Lösungsvorschlag:
1. "at" hat in debian-Lenny nur "Priority: standard". Ändert man das "per Hand" in der Package-Datei, läuft die Installation ohne Probleme durch.
2. Statt ./MAKEDEV sollte ggf. auf /sbin/MAKEDEV zurückgegriffen werden.
  for MAKEDEV in /dev/MAKEDEV /sbin/MAKEDEV /bin/true; do test -x "$MAKEDEV" && break ; done
  ...
  "$MAKEDEV" std hda sda
  ...
  "$MAKEDEV" generic std
3. ucs-test sollte überprüfen, ob die Pakete die richtige Priorität haben, d.h. die Prioritätenreihenfolge "required" > "important" > "standard" > "optional" > "extra" eingehalten wird.
4. Wegen util-linux-locale, siehe Bug #17073
Comment 3 Stefan Gohmann univentionstaff 2013-02-16 10:31:24 CET
Dafür müssten aktuell die Installer Skripte durchgeführt werden, da nicht alle Operationen in den Paketen gemacht werden. Einfacher dürfte es aktuell sein ein Appliance Image zu verwenden und dies per System Setup Appliance automatisiert einzurichten:
 http://wiki.univention.de/index.php?title=UCS_Appliance#Automatic_configuration