Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Just upgraded our XenServer testmachine from 5.6 to 6.0, one of the vms' (ubuntu-server 10.04 LTS) will no longer boot. Error in XenCenter;

9/11/2011 3:48:23 PM Error: Starting VM 'TestDom-Ubuntu' - Traceback (most recent call last):

File "/usr/bin/pygrub", line 873, in ? - data = fs.open_file(chosencfg["kernel"]).read() - IOError: [Errno 2] No such file or directory

Anyone come across the issue before?

edit; I've updated the boot related parameters in xen, still receiving the issue;

[root@xenserver02 ~]# xe-edit-bootloader -u e38aac4e-4117-b3cc-9f8b-c9d45074cd02 -p 3
[root@xenserver02 ~]# xe vm-param-set uuid=e38aac4e-4117-b3cc-9f8b-c9d45074cd02 PV-bootloader-args="--kernel=/vmlinuz-2.6.32-28-server --ramdisk=/initrd.img-2.6.32-28-server"
[root@xenserver02 ~]# xe vm-param-set uuid=e38aac4e-4117-b3cc-9f8b-c9d45074cd02 PV-args="root=UUID=86eeeb35-6678-4228-a7bc-aae8f27a6baf ro quiet"
[root@xenserver02 ~]# xe vm-param-set uuid=e38aac4e-4117-b3cc-9f8b-c9d45074cd02 HVM-boot-policy=
[root@xenserver02 ~]# xe vm-param-set uuid=e38aac4e-4117-b3cc-9f8b-c9d45074cd02 PV-bootloader=pygrub

if relevant;

tail -n 120 /usr/bin/pygrub ;

# We always boot the "default" kernel if it exists, rather than 
# parsing the grub menu
initrd_path = None
if fs.file_exists("/xenkernel"):
    incfg["kernel"] = "/xenkernel"
    incfg["args"] = default_args
    if fs.file_exists("/xeninitrd"):
        incfg["ramdisk"] = "/xeninitrd"
elif fs.file_exists("/boot/xenkernel"):
    incfg["kernel"] = "/boot/xenkernel"
    incfg["args"] = default_args
    if fs.file_exists("/boot/xeninitrd"):
        incfg["ramdisk"] = "/boot/xeninitrd"

for offset in part_offs:
    try:
        fs = fsimage.open(file, offset, bootfsoptions)

        chosencfg = sniff_solaris(fs, incfg)

        if not chosencfg["kernel"]:
            chosencfg = sniff_netware(fs, incfg)

        if not chosencfg["kernel"]:
            chosencfg = run_grub(file, entry, fs, incfg["args"])

        # Break as soon as we've found the kernel so that we continue
        # to use this fsimage object
        if chosencfg["kernel"]:
            break
        fs = None

    except:
        # IOErrors raised by fsimage.open
        # RuntimeErrors raised by run_grub if no menu.lst present
        fs = None
        continue

# Did looping through partitions find us a kernel?
if not fs:
    raise RuntimeError, "Unable to find partition containing kernel"

if not_really:
    bootcfg["kernel"] = "<kernel:%s>" % chosencfg["kernel"]
    try:
        data = fs.open_file(chosencfg["kernel"]).read()
    except:
        raise RuntimeError, "The chosen kernel does not exist"
else:
        # Append any extra arguments we were given
        if extra_args:
            if chosencfg["args"] == None:
                chosencfg["args"] = extra_args
            else:
                chosencfg["args"] += " " + extra_args

        if not_really:
            bootcfg["kernel"] = "<kernel:%s>" % chosencfg["kernel"]
            try:
                data = fs.open_file(chosencfg["kernel"]).read()
            except:
                raise RuntimeError, "The chosen kernel does not exist"
        else:
            data = fs.open_file(chosencfg["kernel"]).read()
            (tfd, bootcfg["kernel"]) = tempfile.mkstemp(prefix="boot_kernel.",
                                                        dir="/var/run/xend/boot")
            os.write(tfd, data)
            os.close(tfd)

if chosencfg["ramdisk"]:
    if not_really:
        bootcfg["ramdisk"] = "<ramdisk:%s>" % chosencfg["ramdisk"]
    else:
        data = fs.open_file(chosencfg["ramdisk"],).read()
        (tfd, bootcfg["ramdisk"]) = tempfile.mkstemp(
            prefix="boot_ramdisk.", dir="/var/run/xend/boot")
        os.write(tfd, data)
        os.close(tfd)
else:
    initrd = None

args = None
if chosencfg["args"]:
    zfsinfo = fsimage.getbootstring(fs)
    if zfsinfo is not None:
        e = re.compile("zfs-bootfs=[\w\-\.\:@/]+" )
        (chosencfg["args"],count) = e.subn(zfsinfo, chosencfg["args"])
        if count == 0:
           chosencfg["args"] += " -B %s" % zfsinfo
    args = chosencfg["args"]

if output_format == "sxp":
    ostring = format_sxp(bootcfg["kernel"], bootcfg["ramdisk"], args)
elif output_format == "simple":
    ostring = format_simple(bootcfg["kernel"], bootcfg["ramdisk"], args, "\n")
elif output_format == "simple0":
    ostring = format_simple(bootcfg["kernel"], bootcfg["ramdisk"], args, "\0")

sys.stdout.flush()
os.write(fd, ostring)
share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.