6505c36ecc
virtman-netstats-fix.diff virtman-finish-button-fix.diff virtman-shutoff-fix.diff virtman-set-has-window-fix.diff virtman-grep-fix.diff virtman-no-cd-present-fix.diff virtman-resize-menu-fix.diff virtman-vcpu-count-fix.diff virtman-storage-pool-fix.diff virtman-domain-name-fix.diff virtman-unapplied-changes-fix.diff virtman-details-fix.diff virtman-delete-fix.diff virtman-collidelist-fix.diff virtman-char-device-mode-fix.diff virtinst-hv-version-fix.diff virtinst-initrd-inject-fix.diff virtinst-initrd-inject2-fix.diff virtinst-no-volume-fix.diff virtinst-prompts-fix.diff virtinst-cpu-model-name-fix.diff virtinst-xml-clear-fix.diff virtinst-remote-storage-fix.diff virtinst-error-message-fix.diff virtinst-typo-fix.diff virtinst-cdrom.diff virtinst-storage-ocfs2.diff OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=63
51 lines
2.1 KiB
Diff
51 lines
2.1 KiB
Diff
|
|
Subject: virt-install: Fix --initrd-inject
|
|
From: Cole Robinson crobinso@redhat.com Tue Aug 23 15:35:32 2011 -0400
|
|
Date: Tue Aug 23 15:35:32 2011 -0400:
|
|
Git: b7054426336929abb0ab0d822ad208a11d418904
|
|
|
|
And add unit tests for it!
|
|
|
|
Index: virtinst-0.600.0/tests/clitest.py
|
|
===================================================================
|
|
--- virtinst-0.600.0.orig/tests/clitest.py
|
|
+++ virtinst-0.600.0/tests/clitest.py
|
|
@@ -265,6 +265,11 @@ args_dict = {
|
|
"--arch i486 --pxe",
|
|
# Directory tree URL install
|
|
"--hvm --location %(TREEDIR)s",
|
|
+ # initrd-inject
|
|
+ "--hvm --location %(TREEDIR)s --initrd-inject virt-install --extra-args ks=file:/virt-install",
|
|
+ # initrd-inject with manual kernel/initrd
|
|
+ "--hvm --location %(TREEDIR)s --initrd-inject virt-install --extra-args ks=file:/virt-install",
|
|
+ # Directory tree URL install with extra-args
|
|
# Directory tree URL install with extra-args
|
|
"--hvm --location %(TREEDIR)s --extra-args console=ttyS0",
|
|
# Directory tree CDROM install
|
|
Index: virtinst-0.600.0/virtinst/DistroInstaller.py
|
|
===================================================================
|
|
--- virtinst-0.600.0.orig/virtinst/DistroInstaller.py
|
|
+++ virtinst-0.600.0/virtinst/DistroInstaller.py
|
|
@@ -270,11 +270,10 @@ class DistroInstaller(Installer.Installe
|
|
transient=transient)
|
|
self.install_devices.append(disk)
|
|
|
|
- def _perform_initrd_injections(self):
|
|
+ def _perform_initrd_injections(self, initrd):
|
|
"""
|
|
Insert files into the root directory of the initial ram disk
|
|
"""
|
|
- initrd = self._install_bootconfig.initrd
|
|
tempdir = tempfile.mkdtemp(dir=self.scratchdir)
|
|
os.chmod(tempdir, 0775)
|
|
|
|
@@ -379,7 +378,7 @@ class DistroInstaller(Installer.Installe
|
|
self._tmpfiles.append(initrdfn)
|
|
|
|
if self._initrd_injections:
|
|
- self._perform_initrd_injections()
|
|
+ self._perform_initrd_injections(initrdfn)
|
|
|
|
# If required, upload media to an accessible guest location
|
|
kernelfn, initrdfn = self._upload_media(guest, meter,
|