* Lucas Meneghel Rodrigues <lmr@xxxxxxxxxx> [2009-10-09 15:41]: > In order to make it possible to prepare the environment > for the guests installation, we have to: > > > +class UnattendedInstall(object): > + """ > + Creates a floppy disk image that will contain a config file for unattended > + OS install. Optionally, sets up a PXE install server using qemu built in > + TFTP and DHCP servers to install a particular operating system. The > + parameters to the script are retrieved from environment variables. > + """ > + def __init__(self): > + """ > + Gets params from environment variables and sets class attributes. > + """ > + script_dir = os.path.dirname(sys.modules[__name__].__file__) > + kvm_test_dir = os.path.abspath(os.path.join(script_dir, "..")) > + images_dir = os.path.join(kvm_test_dir, 'images') > + self.deps_dir = os.path.join(kvm_test_dir, 'deps') > + self.unattended_dir = os.path.join(kvm_test_dir, 'unattended') > + > + try: > + tftp_root = os.environ['KVM_TEST_tftp'] > + self.tftp_root = os.path.join(images_dir, tftp_root) Testing this out, the directory is just slightly wrong. My tftp_root value ends up being: /home/rharper/work/git/autotest/client/tests/kvm/images/images/tftpboot The tftp param is built in kvm_vm.py by combining root_dir (/home/rharper/work/git/autotest/client/tests/kvm) + the tftp value from kvm_tests.cfg (defaults to 'images/tftpboot'). So if we want to keep the relative tftp path in kvm_tests.cfg, then I think we need update the unattended script. I think want we want instead is: self.tftp_root = os.path.join(kvm_test_dir, tftp_root) I made this small change and I can now run the fc11 unattended install. diff --git a/client/tests/kvm/scripts/unattended.py b/client/tests/kvm/scripts/unattended.py index 6ceeef1..febea6e 100755 --- a/client/tests/kvm/scripts/unattended.py +++ b/client/tests/kvm/scripts/unattended.py @@ -33,7 +33,7 @@ class UnattendedInstall(object): try: tftp_root = os.environ['KVM_TEST_tftp'] - self.tftp_root = os.path.join(images_dir, tftp_root) + self.tftp_root = os.path.join(kvm_test_dir, tftp_root) if not os.path.isdir(self.tftp_root): os.makedirs(self.tftp_root) except KeyError: -- Ryan Harper Software Engineer; Linux Technology Center IBM Corp., Austin, Tx ryanh@xxxxxxxxxx -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html