def _test_distro(distro): os.system("clear") print("\n") if distro.warntype == WARN_RHEL4: print("RHEL4: Makes its way to the text installer, then chokes ") print("on our bogus URI http://HEY-THIS-IS-OUR-BAD-KICKSTART-URL.com/") elif distro.warntype == WARN_RHEL5: print("RHEL5, RHEL6, Fedora < 17: You'll get an error about a ") print("bogus bootproto ITREADTHEKICKSTART. This means anaconda ") print("read our busted kickstart.") else: print("RHEL7, Fedora >= 17: Chokes on the bogus URI in the early ") print("console screen when fetching the installer squashfs image.") originitrd = distro.initrd kernel = distro.kernel newinitrd = originitrd + ".copy" injectfile = distro.ks os.system("cp -f %s %s" % (originitrd, newinitrd)) cleanup.append(newinitrd) perform_initrd_injections(newinitrd, [injectfile], ".") nic = distro.virtio and "virtio" or "rtl8139" append = "-append \"ks=file:/%s\"" % os.path.basename(injectfile) cmd = ("sudo qemu-kvm -enable-kvm -name %s " "-cpu host -m 1500 -display gtk " "-net bridge,br=virbr0 -net nic,model=%s " "-kernel %s -initrd %s %s" % (distro.name, nic, kernel, newinitrd, append)) print("\n\n" + cmd) os.system(cmd)
def _test_distro(distro): os.system("clear") print "\n" if distro.warntype == WARN_RHEL4: print "RHEL4: Makes its way to the text installer, then chokes " print "on our bogus URI http://HEY-THIS-IS-OUR-BAD-KICKSTART-URL.com/" elif distro.warntype == WARN_RHEL5: print "RHEL5, RHEL6, Fedora < 17: You'll get an error about a " print "bogus bootproto ITREADTHEKICKSTART. This means anaconda " print "read our busted kickstart." else: print "RHEL7, Fedora >= 17: Chokes on the bogus URI in the early " print "console screen when fetching the installer squashfs image." originitrd = distro.initrd kernel = distro.kernel newinitrd = originitrd + ".copy" injectfile = distro.ks os.system("cp -f %s %s" % (originitrd, newinitrd)) cleanup.append(newinitrd) perform_initrd_injections(newinitrd, [injectfile], ".") nic = distro.virtio and "virtio" or "rtl8139" append = "-append \"ks=file:/%s\"" % os.path.basename(injectfile) cmd = ("sudo qemu-kvm -enable-kvm -name %s " "-cpu host -m 1500 -display gtk " "-net bridge,br=virbr0 -net nic,model=%s " "-kernel %s -initrd %s %s" % (distro.name, nic, kernel, newinitrd, append)) print "\n\n" + cmd os.system(cmd)