On 02/27/2014 03:23 PM, Lin Ma wrote:
For unattended_install.url and unattended_install.nfs,
autoyast.iso will be mounted as 1st cdrom.
Follow Paolo's suggestion, Add code to handle kernel_params
in unattended_install.py
Signed-off-by: Lin Ma <[email protected]>
---
shared/cfg/guest-os/Linux/OpenSUSE.cfg | 2 ++
shared/cfg/guest-os/Linux/SLES.cfg | 2 ++
virttest/tests/unattended_install.py | 7 +++++++
3 files changed, 11 insertions(+)
diff --git a/shared/cfg/guest-os/Linux/OpenSUSE.cfg
b/shared/cfg/guest-os/Linux/OpenSUSE.cfg
index 487b9b5..043d196 100644
--- a/shared/cfg/guest-os/Linux/OpenSUSE.cfg
+++ b/shared/cfg/guest-os/Linux/OpenSUSE.cfg
@@ -4,3 +4,5 @@
unattended_install, svirt_install:
kernel_params = "autoyast=device://sr1/autoinst.xml console=ttyS0,115200
console=tty0"
wait_no_ack = yes
+ unattended_install.url, unattended_install.nfs:
+ kernel_params = "autoyast=device://sr0/autoinst.xml console=ttyS0,115200
console=tty0"
diff --git a/shared/cfg/guest-os/Linux/SLES.cfg
b/shared/cfg/guest-os/Linux/SLES.cfg
index 4ba65f7..f11040d 100644
--- a/shared/cfg/guest-os/Linux/SLES.cfg
+++ b/shared/cfg/guest-os/Linux/SLES.cfg
@@ -5,6 +5,8 @@
kernel = linux
initrd = initrd
wait_no_ack = yes
+ unattended_install.url, unattended_install.nfs:
+ kernel_params = "autoyast=device://scd0/autoinst.xml console=ttyS0,115200
console=tty0"
boot:
# As SLES need to perform firstboot to finish the installation,
Extending the boot login_timeout
login_timeout = 720
diff --git a/virttest/tests/unattended_install.py
b/virttest/tests/unattended_install.py
index 85ae18d..82b583f 100644
--- a/virttest/tests/unattended_install.py
+++ b/virttest/tests/unattended_install.py
@@ -850,6 +850,9 @@ class UnattendedInstallConfig(object):
self.kernel_params = re.sub('repo\=[\:\w\d\/]*',
'repo=%s' % self.url,
self.kernel_params)
+ elif 'autoyast=' in self.kernel_params:
+ # SUSE
+ self.kernel_params = self.kernel_params + " ip=dhcp
install=" + self.url
^ This indentation is off
elif self.vm_type == 'libvirt':
logging.info("Not downloading vmlinuz/initrd.img from %s, "
@@ -880,6 +883,10 @@ class UnattendedInstallConfig(object):
utils.run(initrd_fetch_cmd, verbose=DEBUG)
finally:
utils_disk.cleanup(self.nfs_mount)
+ if 'autoyast=' in self.kernel_params:
+ # SUSE
+ self.kernel_params = self.kernel_params + " ip=dhcp
install=nfs://" \
+ + self.nfs_server + ":" + self.nfs_dir
^ Here you could use implicit line continuation rather than the
backslash (\). This is what I mean:
if 'autoyast=' in self.kernel_params:
# SUSE
self.kernel_params = (self.kernel_params + " ip=dhcp
install=nfs://" +
self.nfs_server + ":" + self.nfs_dir)
def setup_import(self):
self.unattended_file = None
Please fix those and re-send. Also, on future patches, would you
consider using github pull requests? I know it is a bit less convenient,
but it helps us a lot to keep track of the work that needs to be done.
Thanks!
_______________________________________________
Virt-test-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/virt-test-devel