Hello, I am having trouble with creating a guest domain with a modified kernel. I used the xen-create-image command with following arguments: xen-create-image --boot --force --install=1 --keep --arch=x86_64 --dhcp --passwd \ --kernel=/boot/vmlinuz-3.11.0-guest --initrd=/boot/initrd-3.11.0-guest \ --modules=/lib/modules/3.11.0-guest --size=20G --swap=512M --memory=128M \ --hostname=ubuntu-3.11.0-guest1 However, it fails and here is the partial log: <snip> Done Installation method: debootstrap Using /usr/sbin/debootstrap as debootstrap command Copying files from host to image. Copying files from /var/cache/apt/archives/ -> /tmp/UxsUPuN66R/var/cache/apt/archives Done Done I: Retrieving Release I: Retrieving Release.gpg I: Checking Release signature I: Valid Release signature (key id 630239CC130E1A7FD81A27B140976EAF437D05B5) E: Invalid Release file, no entry for main/binary-x86_64/Packages WARNING (/usr/bin/xt-install-image): The installed system at /tmp/UxsUPuN66R doesn''t seem to be a full system. WARNING (/usr/bin/xt-install-image): The installed system is missing the common file: /bin/ls. WARNING (/usr/bin/xt-install-image): The installed system at /tmp/UxsUPuN66R doesn''t seem to be a full system. WARNING (/usr/bin/xt-install-image): The installed system is missing the common file: /bin/cp. Copying files from new installation to host. Copying files from /tmp/UxsUPuN66R/var/cache/apt/archives -> /var/cache/apt/archives/ Done Done Done System installation failed. Aborting umount: /tmp/UxsUPuN66R/proc: not found Running command ''umount /tmp/UxsUPuN66R/proc 2>&1'' failed with exit code 256. Aborting </snip> I also tried to download a precise image from mirror and then use the modified kernel and ramdisk image from above. In this case, I see the following error while trying to do: # xl create /etc/xen/precise.cfg [56369.665439] init: Failed to spawn network-interface (vif1.0) pre-start process: unable to change root directory: No such file or directory [56369.677040] init: Failed to spawn network-interface-security (network-interface/vif1.0) pre-start process: unable to change root directory: No such file or directory [56369.683333] init: Failed to spawn network-interface (vif1.0) post-stop process: unable to change root directory: No such file or directory [56369.696917] IPv6: ADDRCONF(NETDEV_UP): vif1.0: link is not ready [56369.822639] device vif1.0 entered promiscuous mode [56369.826883] IPv6: ADDRCONF(NETDEV_UP): vif1.0: link is not ready [56369.973214] xenbr0: port 3(vif1.0) entered disabled state [56369.973420] device vif1.0 left promiscuous mode [56369.973424] xenbr0: port 3(vif1.0) entered disabled state Can someone point out where the problem is? Thanks a lot -- Aastha Mehta MPI-SWS, Germany E-mail: aasthakm@mpi-sws.org <aasthakm@gmail.com> _______________________________________________ Xen-users mailing list Xen-users@lists.xen.org http://lists.xen.org/xen-users
On Fri, Sep 27, 2013 at 02:18:45PM +0200, Aastha Mehta wrote:> Hello, > > I am having trouble with creating a guest domain with a modified kernel. > > I used the xen-create-image command with following arguments: > xen-create-image --boot --force --install=1 --keep --arch=x86_64 --dhcp > --passwd \ > --kernel=/boot/vmlinuz-3.11.0-guest --initrd=/boot/initrd-3.11.0-guest \ > --modules=/lib/modules/3.11.0-guest --size=20G --swap=512M --memory=128M \ > --hostname=ubuntu-3.11.0-guest1 > > However, it fails and here is the partial log: > <snip> > Done > Installation method: debootstrap > Using /usr/sbin/debootstrap as debootstrap command > > Copying files from host to image. > Copying files from /var/cache/apt/archives/ -> > /tmp/UxsUPuN66R/var/cache/apt/archives > Done > Done > I: Retrieving Release > I: Retrieving Release.gpg > I: Checking Release signature > I: Valid Release signature (key id 630239CC130E1A7FD81A27B140976EAF437D05B5) > E: Invalid Release file, no entry for main/binary-x86_64/PackagesSomething went wrong when debootstrap tried to build your image. It has nothing to do with your customized kernel (yet). You need to fix debootstrap first. It could be something wrong with your mirror. I believe xen-create-image has an option to speicify which mirror to use -- you can try other working mirrors.> WARNING (/usr/bin/xt-install-image): The installed system at > /tmp/UxsUPuN66R doesn''t seem to be a full system. > WARNING (/usr/bin/xt-install-image): The installed system is missing the > common file: /bin/ls. > WARNING (/usr/bin/xt-install-image): The installed system at > /tmp/UxsUPuN66R doesn''t seem to be a full system. > WARNING (/usr/bin/xt-install-image): The installed system is missing the > common file: /bin/cp. > > Copying files from new installation to host. > Copying files from /tmp/UxsUPuN66R/var/cache/apt/archives -> > /var/cache/apt/archives/ > Done > Done > Done > System installation failed. Aborting > umount: /tmp/UxsUPuN66R/proc: not found > Running command ''umount /tmp/UxsUPuN66R/proc 2>&1'' failed with exit code > 256. > Aborting > </snip> > > I also tried to download a precise image from mirror and then use the > modified kernel and ramdisk image from above. In this case, I see the > following error while trying to do: > # xl create /etc/xen/precise.cfg > [56369.665439] init: Failed to spawn network-interface (vif1.0) pre-start > process: unable to change root directory: No such file or directory > [56369.677040] init: Failed to spawn network-interface-security > (network-interface/vif1.0) pre-start process: unable to change root > directory: No such file or directory > [56369.683333] init: Failed to spawn network-interface (vif1.0) post-stop > process: unable to change root directory: No such file or directory > [56369.696917] IPv6: ADDRCONF(NETDEV_UP): vif1.0: link is not ready > [56369.822639] device vif1.0 entered promiscuous mode > [56369.826883] IPv6: ADDRCONF(NETDEV_UP): vif1.0: link is not ready > [56369.973214] xenbr0: port 3(vif1.0) entered disabled state > [56369.973420] device vif1.0 left promiscuous mode > [56369.973424] xenbr0: port 3(vif1.0) entered disabled state >How did you install Xen? Do you have the hotplug scripts in /etc/xen? What''s the content of your guest config file? Wei.> Can someone point out where the problem is? > > Thanks a lot > > -- > Aastha Mehta > MPI-SWS, Germany > E-mail: aasthakm@mpi-sws.org <aasthakm@gmail.com>> _______________________________________________ > Xen-users mailing list > Xen-users@lists.xen.org > http://lists.xen.org/xen-users
Thanks for the prompt response. Please find answers inline On 27 September 2013 15:00, Wei Liu <wei.liu2@citrix.com> wrote:> On Fri, Sep 27, 2013 at 02:18:45PM +0200, Aastha Mehta wrote: > > Hello, > > > > I am having trouble with creating a guest domain with a modified kernel. > > > > I used the xen-create-image command with following arguments: > > xen-create-image --boot --force --install=1 --keep --arch=x86_64 --dhcp > > --passwd \ > > --kernel=/boot/vmlinuz-3.11.0-guest --initrd=/boot/initrd-3.11.0-guest \ > > --modules=/lib/modules/3.11.0-guest --size=20G --swap=512M --memory=128M > \ > > --hostname=ubuntu-3.11.0-guest1 > > > > However, it fails and here is the partial log: > > <snip> > > Done > > Installation method: debootstrap > > Using /usr/sbin/debootstrap as debootstrap command > > > > Copying files from host to image. > > Copying files from /var/cache/apt/archives/ -> > > /tmp/UxsUPuN66R/var/cache/apt/archives > > Done > > Done > > I: Retrieving Release > > I: Retrieving Release.gpg > > I: Checking Release signature > > I: Valid Release signature (key id > 630239CC130E1A7FD81A27B140976EAF437D05B5) > > E: Invalid Release file, no entry for main/binary-x86_64/Packages > > Something went wrong when debootstrap tried to build your image. It has > nothing to do with your customized kernel (yet). > > You need to fix debootstrap first. It could be something wrong with your > mirror. I believe xen-create-image has an option to speicify which > mirror to use -- you can try other working mirrors. > > Here is the top of the log for the guest1 that I tried to create usingcustom kernel: <Guest1-log> General Information -------------------- Hostname : ubuntu-3.11.0-guest1 Distribution : precise Mirror : http://de.archive.ubuntu.com/ubuntu/ Partitions : swap 512M (swap) / 20G (ext3) Image type : sparse Memory size : 128M Kernel path : /boot/vmlinuz-3.11.0-guest Module path : /lib/modules/3.11.0-guest/ Initrd path : /boot/initrd.img-3.11.0-guest ... </Guest1-log> This is the same mirror which I used in the second case, where I managed to create the image using the mirror: <Precise-log> General Information -------------------- Hostname : precise-guest Distribution : precise Mirror : http://de.archive.ubuntu.com/ubuntu/ Partitions : swap 128M (swap) / 20G (ext3) Image type : sparse Memory size : 512mb ... Done Installation method: debootstrap Using /usr/sbin/debootstrap as debootstrap command Copying files from host to image. Copying files from /var/cache/apt/archives/ -> /tmp/Jk_qr78n4J/var/cache/apt/archives Done Done I: Retrieving Release I: Retrieving Release.gpg I: Checking Release signature I: Valid Release signature (key id 630239CC130E1A7FD81A27B140976EAF437D05B5) I: Retrieving Packages I: Validating Packages I: Resolving dependencies of required packages... I: Resolving dependencies of base packages... I: Checking component main on http://de.archive.ubuntu.com/ubuntu... I: Validating adduser I: Validating apt I: Validating apt-utils I: Validating base-files ... </Precise-log> What do I need to checkout about the debootstrap?> > WARNING (/usr/bin/xt-install-image): The installed system at > > /tmp/UxsUPuN66R doesn''t seem to be a full system. > > WARNING (/usr/bin/xt-install-image): The installed system is missing the > > common file: /bin/ls. > > WARNING (/usr/bin/xt-install-image): The installed system at > > /tmp/UxsUPuN66R doesn''t seem to be a full system. > > WARNING (/usr/bin/xt-install-image): The installed system is missing the > > common file: /bin/cp. > > > > Copying files from new installation to host. > > Copying files from /tmp/UxsUPuN66R/var/cache/apt/archives -> > > /var/cache/apt/archives/ > > Done > > Done > > Done > > System installation failed. Aborting > > umount: /tmp/UxsUPuN66R/proc: not found > > Running command ''umount /tmp/UxsUPuN66R/proc 2>&1'' failed with exit code > > 256. > > Aborting > > </snip> > > > > I also tried to download a precise image from mirror and then use the > > modified kernel and ramdisk image from above. In this case, I see the > > following error while trying to do: > > # xl create /etc/xen/precise.cfg > > [56369.665439] init: Failed to spawn network-interface (vif1.0) pre-start > > process: unable to change root directory: No such file or directory > > [56369.677040] init: Failed to spawn network-interface-security > > (network-interface/vif1.0) pre-start process: unable to change root > > directory: No such file or directory > > [56369.683333] init: Failed to spawn network-interface (vif1.0) post-stop > > process: unable to change root directory: No such file or directory > > [56369.696917] IPv6: ADDRCONF(NETDEV_UP): vif1.0: link is not ready > > [56369.822639] device vif1.0 entered promiscuous mode > > [56369.826883] IPv6: ADDRCONF(NETDEV_UP): vif1.0: link is not ready > > [56369.973214] xenbr0: port 3(vif1.0) entered disabled state > > [56369.973420] device vif1.0 left promiscuous mode > > [56369.973424] xenbr0: port 3(vif1.0) entered disabled state > > > > How did you install Xen? Do you have the hotplug scripts in /etc/xen? > What''s the content of your guest config file? >Xen (4.4-unstable) is also custom built. I have following hotplug scripts in /etc/xen/scripts: hotplugpath.sh hotplugpath.sh.dpkg-dist xen-hotplug-common.sh xen-hotplug-common.sh.dpkg-dist vtpm-hotplug-common.sh xen-hotplug-cleanup Below is the content of the guest1 config file: <begin-config> kernel = ''/boot/vmlinuz-3.11.0-guest'' ramdisk = ''/boot/initrd-3.11.0-guest'' vcpus = ''1'' memory = ''2048'' root = ''/dev/xvda2 ro'' disk = [ ''file:/home/domains/ubuntu-3.11.0-guest1/disk.img,xvda2,w'', ''file:/home/domains/ubuntu-3.11.0-guest1/swap.img,xvda1,w'', ] name = ''ubuntu-3.11.0-guest1'' dhcp = ''dhcp'' vif = [ ''mac=00:16:35:46:82:E4'' ] on_reboot = ''restart'' <end-config>> Wei. > > > Can someone point out where the problem is? > > > > Thanks a lot > > > > -- > > Aastha Mehta > > MPI-SWS, Germany > > E-mail: aasthakm@mpi-sws.org <aasthakm@gmail.com> > > > _______________________________________________ > > Xen-users mailing list > > Xen-users@lists.xen.org > > http://lists.xen.org/xen-users > >Thanks -- Aastha Mehta MPI-SWS, Germany E-mail: aasthakm@mpi-sws.org <aasthakm@gmail.com> _______________________________________________ Xen-users mailing list Xen-users@lists.xen.org http://lists.xen.org/xen-users
On Fri, Sep 27, 2013 at 03:21:23PM +0200, Aastha Mehta wrote: [...]> > > I: Checking Release signature > > > I: Valid Release signature (key id > > 630239CC130E1A7FD81A27B140976EAF437D05B5) > > > E: Invalid Release file, no entry for main/binary-x86_64/Packages > > > > Something went wrong when debootstrap tried to build your image. It has > > nothing to do with your customized kernel (yet). > > > > You need to fix debootstrap first. It could be something wrong with your > > mirror. I believe xen-create-image has an option to speicify which > > mirror to use -- you can try other working mirrors. > > > > Here is the top of the log for the guest1 that I tried to create using > custom kernel: > <Guest1-log> > General Information > -------------------- > Hostname : ubuntu-3.11.0-guest1 > Distribution : precise > Mirror : http://de.archive.ubuntu.com/ubuntu/ > Partitions : swap 512M (swap) > / 20G (ext3) > Image type : sparse > Memory size : 128M > Kernel path : /boot/vmlinuz-3.11.0-guest > Module path : /lib/modules/3.11.0-guest/ > Initrd path : /boot/initrd.img-3.11.0-guest > ... > </Guest1-log> > > This is the same mirror which I used in the second case, where I managed to > create the image using the mirror: > <Precise-log> > General Information > -------------------- > Hostname : precise-guest > Distribution : precise > Mirror : http://de.archive.ubuntu.com/ubuntu/ > Partitions : swap 128M (swap) > / 20G (ext3) > Image type : sparse > Memory size : 512mb > ... > Done > Installation method: debootstrap > Using /usr/sbin/debootstrap as debootstrap command > > Copying files from host to image. > Copying files from /var/cache/apt/archives/ -> > /tmp/Jk_qr78n4J/var/cache/apt/archives > Done > Done > I: Retrieving Release > I: Retrieving Release.gpg > I: Checking Release signature > I: Valid Release signature (key id 630239CC130E1A7FD81A27B140976EAF437D05B5) > I: Retrieving Packages > I: Validating Packages > I: Resolving dependencies of required packages... > I: Resolving dependencies of base packages... > I: Checking component main on http://de.archive.ubuntu.com/ubuntu... > I: Validating adduser > I: Validating apt > I: Validating apt-utils > I: Validating base-files > ... > </Precise-log> > What do I need to checkout about the debootstrap?I don''t really have any idea about that. Is it caused by intermittent network failure? Another thing to check is the delta between your two commands. Wei.
On 27 September 2013 15:28, Wei Liu <wei.liu2@citrix.com> wrote:> On Fri, Sep 27, 2013 at 03:21:23PM +0200, Aastha Mehta wrote: > [...] > > > > I: Checking Release signature > > > > I: Valid Release signature (key id > > > 630239CC130E1A7FD81A27B140976EAF437D05B5) > > > > E: Invalid Release file, no entry for main/binary-x86_64/Packages > > > > > > Something went wrong when debootstrap tried to build your image. It has > > > nothing to do with your customized kernel (yet). > > > > > > You need to fix debootstrap first. It could be something wrong with > your > > > mirror. I believe xen-create-image has an option to speicify which > > > mirror to use -- you can try other working mirrors. > > > > > > Here is the top of the log for the guest1 that I tried to create using > > custom kernel: > > <Guest1-log> > > General Information > > -------------------- > > Hostname : ubuntu-3.11.0-guest1 > > Distribution : precise > > Mirror : http://de.archive.ubuntu.com/ubuntu/ > > Partitions : swap 512M (swap) > > / 20G (ext3) > > Image type : sparse > > Memory size : 128M > > Kernel path : /boot/vmlinuz-3.11.0-guest > > Module path : /lib/modules/3.11.0-guest/ > > Initrd path : /boot/initrd.img-3.11.0-guest > > ... > > </Guest1-log> > > > > This is the same mirror which I used in the second case, where I managed > to > > create the image using the mirror: > > <Precise-log> > > General Information > > -------------------- > > Hostname : precise-guest > > Distribution : precise > > Mirror : http://de.archive.ubuntu.com/ubuntu/ > > Partitions : swap 128M (swap) > > / 20G (ext3) > > Image type : sparse > > Memory size : 512mb > > ... > > Done > > Installation method: debootstrap > > Using /usr/sbin/debootstrap as debootstrap command > > > > Copying files from host to image. > > Copying files from /var/cache/apt/archives/ -> > > /tmp/Jk_qr78n4J/var/cache/apt/archives > > Done > > Done > > I: Retrieving Release > > I: Retrieving Release.gpg > > I: Checking Release signature > > I: Valid Release signature (key id > 630239CC130E1A7FD81A27B140976EAF437D05B5) > > I: Retrieving Packages > > I: Validating Packages > > I: Resolving dependencies of required packages... > > I: Resolving dependencies of base packages... > > I: Checking component main on http://de.archive.ubuntu.com/ubuntu... > > I: Validating adduser > > I: Validating apt > > I: Validating apt-utils > > I: Validating base-files > > ... > > </Precise-log> > > What do I need to checkout about the debootstrap? > > I don''t really have any idea about that. Is it caused by intermittent > network failure? > > Another thing to check is the delta between your two commands. > > Wei. >No, it is not an intermitten failure, because I have another guest image that I am able to boot fine. I also tried to replace the kernel in the image that I created from the mirror. But I am seeing the networking error about the vif being not set up correctly. Any idea, why that might be happening and how to fix it? Thanks -- Aastha Mehta MPI-SWS, Germany E-mail: aasthakm@mpi-sws.org <aasthakm@gmail.com> _______________________________________________ Xen-users mailing list Xen-users@lists.xen.org http://lists.xen.org/xen-users
On Fri, Sep 27, 2013 at 04:05:55PM +0200, Aastha Mehta wrote: [...]> > > > Wei. > > > > No, it is not an intermitten failure, because I have another guest image > that I am able to boot fine. >What I meant is the debootstrap failure was due to intermittent failure of network. Did you check that? Did you run the same rune multiple times to rule that out? If it is not due to network failure, you need to check the delta between your runes and figure out why one worked but the other didn''t.> I also tried to replace the kernel in the image that I created from the > mirror. But I am seeing the networking error about the vif being not set up > correctly. Any idea, why that might be happening and how to fix it? >You didn''t answer my questions in first mail. How did you install Xen? Do you have hotplug scripts in /etc/xen? Does it boot fine with original kernel? Do you have necessary netfront module enabled in you modified kernel? What did you modify? Wei.> Thanks > > > > -- > Aastha Mehta > MPI-SWS, Germany > E-mail: aasthakm@mpi-sws.org <aasthakm@gmail.com>
I gave the answers inline. Here they are, again inline - On 27 September 2013 16:16, Wei Liu <wei.liu2@citrix.com> wrote:> On Fri, Sep 27, 2013 at 04:05:55PM +0200, Aastha Mehta wrote: > [...] > > > > > > Wei. > > > > > > > No, it is not an intermitten failure, because I have another guest image > > that I am able to boot fine. > > > > What I meant is the debootstrap failure was due to intermittent failure > of network. Did you check that? Did you run the same rune multiple times > to rule that out? > > If it is not due to network failure, you need to check the delta between > your runes and figure out why one worked but the other didn''t. >The differences are in the sizes provided for Swap, Disk, RAM. Additionally, I included flags like --keep, --install=1, --boot=1 in the case of the modified kernel.> > > I also tried to replace the kernel in the image that I created from the > > mirror. But I am seeing the networking error about the vif being not set > up > > correctly. Any idea, why that might be happening and how to fix it? > > > > You didn''t answer my questions in first mail. How did you install Xen? > Do you have hotplug scripts in /etc/xen?Xen (4.4-unstable) is also custom built. I have following hotplug scripts in /etc/xen/scripts: hotplugpath.sh hotplugpath.sh.dpkg-dist xen-hotplug-common.sh xen-hotplug-common.sh.dpkg-dist vtpm-hotplug-common.sh xen-hotplug-cleanup> Does it boot fine with original kernel? >I added the following line in the config file for original kernel: bootloader = ''/usr/local/lib/xen/bin/pygrub'' Everything else was the default generated - When I did xl create, I got the following error: Parsing config from /etc/xen/precise-guest.cfg libxl: error: libxl_bootloader.c:628:bootloader_finished: bootloader failed - consult logfile /var/log/xen/bootloader.17.log libxl: error: libxl_exec.c:118:libxl_report_child_exitstatus: bootloader [31933] exited with error status 1 libxl: error: libxl_create.c:900:domcreate_rebuild_done: cannot (re-)build domain: -3 And the log file says: File "/usr/local/lib/xen/bin/pygrub", line 885, in <module> raise RuntimeError, "Unable to find partition containing kernel" Do you have necessary netfront module enabled in you modified> kernel? What did you modify? >I do have the netfront module enabled in the modified kernel. I added a null system call which calls to a null hypercall (added in the Xen). Below is the content of the guest1 config file: <begin-config> kernel = ''/boot/vmlinuz-3.11.0-guest'' ramdisk = ''/boot/initrd-3.11.0-guest'' vcpus = ''1'' memory = ''2048'' root = ''/dev/xvda2 ro'' disk = [ ''file:/home/domains/ubuntu-3.11.0-guest1/disk.img,xvda2,w'', ''file:/home/domains/ubuntu-3.11.0-guest1/swap.img,xvda1,w'', ] name = ''ubuntu-3.11.0-guest1'' dhcp = ''dhcp'' vif = [ ''mac=00:16:35:46:82:E4'' ] on_reboot = ''restart'' <end-config>> > Wei. > > > Thanks > > > > > > > > -- > > Aastha Mehta > > MPI-SWS, Germany > > E-mail: aasthakm@mpi-sws.org <aasthakm@gmail.com> >Thanks for your time. -- Aastha Mehta MPI-SWS, Germany E-mail: aasthakm@mpi-sws.org <aasthakm@gmail.com> _______________________________________________ Xen-users mailing list Xen-users@lists.xen.org http://lists.xen.org/xen-users
On Fri, Sep 27, 2013 at 05:51:20PM +0200, Aastha Mehta wrote: [...]> > If it is not due to network failure, you need to check the delta between > > your runes and figure out why one worked but the other didn''t. > > > > The differences are in the sizes provided for Swap, Disk, RAM. > Additionally, I included flags like --keep, --install=1, --boot=1 in the > case of the modified kernel. >I don''t think these options can affect fetching package index... You need to check manpage of xen-image-create.> > > > > > I also tried to replace the kernel in the image that I created from the > > > mirror. But I am seeing the networking error about the vif being not set > > up > > > correctly. Any idea, why that might be happening and how to fix it? > > > > > > > You didn''t answer my questions in first mail. How did you install Xen? > > Do you have hotplug scripts in /etc/xen? > > > Xen (4.4-unstable) is also custom built. I have following hotplug scripts > in /etc/xen/scripts: > hotplugpath.sh > hotplugpath.sh.dpkg-dist > xen-hotplug-common.sh > xen-hotplug-common.sh.dpkg-dist > vtpm-hotplug-common.sh > xen-hotplug-cleanup >This doesn''t look right. There''re many other scripts in Xen''s source tarball. Make sure you install Xen properly first please.> > > > Does it boot fine with original kernel? > > > > I added the following line in the config file for original kernel: > bootloader = ''/usr/local/lib/xen/bin/pygrub'' > Everything else was the default generated - >I''m very confused. You seemed to introduce many variables all at once. Can you use something that works as baseline then gradually modify things to what you want? Wei.
On 27 September 2013 18:00, Wei Liu <wei.liu2@citrix.com> wrote:> On Fri, Sep 27, 2013 at 05:51:20PM +0200, Aastha Mehta wrote: > [...] > > > If it is not due to network failure, you need to check the delta > between > > > your runes and figure out why one worked but the other didn''t. > > > > > > > The differences are in the sizes provided for Swap, Disk, RAM. > > Additionally, I included flags like --keep, --install=1, --boot=1 in the > > case of the modified kernel. > > > > I don''t think these options can affect fetching package index... > You need to check manpage of xen-image-create. >I agree too. That''s why it doesn''t make sense to me.> > > > > > > > > I also tried to replace the kernel in the image that I created from > the > > > > mirror. But I am seeing the networking error about the vif being not > set > > > up > > > > correctly. Any idea, why that might be happening and how to fix it? > > > > > > > > > > You didn''t answer my questions in first mail. How did you install Xen? > > > Do you have hotplug scripts in /etc/xen? > > > > > > Xen (4.4-unstable) is also custom built. I have following hotplug scripts > > in /etc/xen/scripts: > > hotplugpath.sh > > hotplugpath.sh.dpkg-dist > > xen-hotplug-common.sh > > xen-hotplug-common.sh.dpkg-dist > > vtpm-hotplug-common.sh > > xen-hotplug-cleanup > > > > This doesn''t look right. There''re many other scripts in Xen''s source > tarball. Make sure you install Xen properly first please. > >Well this the complete list of scripts in /etc/xen/scripts/ blktap block-iscsi locking.sh network-nat vif2 vif-nat vif-setup vtpm-hotplug-common.sh xen-hotplug-common.sh.dpkg-dist block block-nbd locking.sh.dpkg-dist network-nat.dpkg-dist vif-bridge vif-nat.dpkg-dist vscsi vtpm-impl xen-network-common.sh block-common.sh external-device-migrate logging.sh network-route vif-bridge.dpkg-dist vif-openvswitch vtpm vtpm-migration.sh xen-script-common.sh block.dpkg-dist hotplugpath.sh network-bridge qemu-ifup vif-common.sh vif-route vtpm-common.sh xen-hotplug-cleanup block-enbd hotplugpath.sh.dpkg-dist network-bridge.dpkg-dist qemu-ifup.dpkg-dist vif-common.sh.dpkg-dist vif-route.dpkg-dist vtpm-delete xen-hotplug-common.sh> > > > > > > Does it boot fine with original kernel? > > > > > > > I added the following line in the config file for original kernel: > > bootloader = ''/usr/local/lib/xen/bin/pygrub'' > > Everything else was the default generated - > > > > I''m very confused. You seemed to introduce many variables all at once. > > Can you use something that works as baseline then gradually modify > things to what you want? > > Wei. >I first added the null hypercall in Xen hypervisor, and tested it through a simple test program in dom0 itself. That worked. I am now trying to get an application to make a syscall to the guest OS, and then the guest make hypercall to Xen. Thanks -- Aastha Mehta MPI-SWS, Germany E-mail: aasthakm@mpi-sws.org <aasthakm@gmail.com> _______________________________________________ Xen-users mailing list Xen-users@lists.xen.org http://lists.xen.org/xen-users
On Fri, Sep 27, 2013 at 06:15:28PM +0200, Aastha Mehta wrote: [...]> > > hotplugpath.sh > > > hotplugpath.sh.dpkg-dist > > > xen-hotplug-common.sh > > > xen-hotplug-common.sh.dpkg-dist > > > vtpm-hotplug-common.sh > > > xen-hotplug-cleanup > > > > > > > This doesn''t look right. There''re many other scripts in Xen''s source > > tarball. Make sure you install Xen properly first please. > > > > > Well this the complete list of scripts in /etc/xen/scripts/This looks OK to me.> > > > > > > Does it boot fine with original kernel? > > > > > > > > > > I added the following line in the config file for original kernel: > > > bootloader = ''/usr/local/lib/xen/bin/pygrub'' > > > Everything else was the default generated - > > > > > > > I''m very confused. You seemed to introduce many variables all at once. > > > > Can you use something that works as baseline then gradually modify > > things to what you want? > > > > Wei. > > > > I first added the null hypercall in Xen hypervisor, and tested it through a > simple test program in dom0 itself. That worked. I am now trying to get an > application to make a syscall to the guest OS, and then the guest make > hypercall to Xen. >What I meant is, if you want to use your kernel in a VM created by xen-create-image, you can start with building a VM with the in-stock kernel, verify that VM works as expected, then put your kernel in that VM. Wei.> > Thanks > > > > -- > Aastha Mehta > MPI-SWS, Germany > E-mail: aasthakm@mpi-sws.org <aasthakm@gmail.com>
On 27 September 2013 18:32, Wei Liu <wei.liu2@citrix.com> wrote:> On Fri, Sep 27, 2013 at 06:15:28PM +0200, Aastha Mehta wrote: > > > > > > > I first added the null hypercall in Xen hypervisor, and tested it > through a > > simple test program in dom0 itself. That worked. I am now trying to get > an > > application to make a syscall to the guest OS, and then the guest make > > hypercall to Xen. > > > > What I meant is, if you want to use your kernel in a VM created by > xen-create-image, you can start with building a VM with the in-stock > kernel, verify that VM works as expected, then put your kernel in that > VM. > > Wei. > > I agree. So, this is what I tried. Use xen-create-image to create an imagefrom a mirror. And the output looks briefly like the following - General Information -------------------- Hostname : precise-guest Distribution : precise Mirror : http://de.archive.ubuntu.com/ubuntu/ Partitions : swap 128M (swap) / 20G (ext3) Image type : sparse Memory size : 512M Networking Information ---------------------- IP Address : DHCP [MAC: 00:16:3E:46:82:E4] WARNING ------- Loopback module not loaded and you''re using loopback images Run the following to load the module: modprobe loop max_loop=255 Creating partition image: /home/domains/precise-guest/swap.img Done Creating swap on /home/domains/precise-guest/swap.img Done Creating partition image: /home/domains/precise-guest/disk.img Done Creating ext3 filesystem on /home/domains/precise-guest/disk.img Done Installation method: debootstrap Done Running hooks Done No role scripts were specified. Skipping Creating Xen configuration file Done Setting up root password Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully All done Installation Summary --------------------- Hostname : precise-guest Distribution : precise IP-Address(es) : dynamic RSA Fingerprint : Root Password : N/A This is successful and I have a config file that looks like this - <config> bootloader = ''/usr/local/lib/xen/bin/pygrub'' vcpus = ''1'' memory = ''512'' root = ''/dev/xvda2 ro'' disk = [ ''file:/home/domains/precise-guest/disk.img,xvda2,w'', ''file:/home/domains/precise-guest/swap.img,xvda1,w'', ] name = ''precise-guest'' dhcp = ''dhcp'' vif = [ ''mac=00:16:3E:46:82:E4'' ] on_reboot = ''restart'' on_crash = ''restart'' </config> Upon calling xl create /etc/xen/precise-guest.cfg, I get the following error: Parsing config from /etc/xen/precise-guest.cfg libxl: error: libxl_bootloader.c:628:bootloader_finished: bootloader failed - consult logfile /var/log/xen/bootloader.17.log libxl: error: libxl_exec.c:118:libxl_report_child_exitstatus: bootloader [31933] exited with error status 1 libxl: error: libxl_create.c:900:domcreate_rebuild_done: cannot (re-)build domain: -3 And the log file says: File "/usr/local/lib/xen/bin/pygrub", line 885, in <module> raise RuntimeError, "Unable to find partition containing kernel" This error confuses me, as the xen-create-image command shows that it is configuring ext3 on the given disk image: Thanks -- Aastha Mehta MPI-SWS, Germany E-mail: aasthakm@mpi-sws.org <aasthakm@gmail.com> _______________________________________________ Xen-users mailing list Xen-users@lists.xen.org http://lists.xen.org/xen-users
On Fri, Sep 27, 2013 at 06:46:06PM +0200, Aastha Mehta wrote: [...]> > > This is successful and I have a config file that looks like this - > <config> > bootloader = ''/usr/local/lib/xen/bin/pygrub''Why do you add this line? Why don''t you just use the generated config file? AIUI Pygrub expects a disk, while xen-create-image creates partitions. No wonder you sees something like "unable to find partition table". Wei.
On 27 September 2013 18:53, Wei Liu <wei.liu2@citrix.com> wrote:> On Fri, Sep 27, 2013 at 06:46:06PM +0200, Aastha Mehta wrote: > [...] > > > > > > This is successful and I have a config file that looks like this - > > <config> > > bootloader = ''/usr/local/lib/xen/bin/pygrub'' > > Why do you add this line? Why don''t you just use the generated config > file? AIUI Pygrub expects a disk, while xen-create-image creates > partitions. No wonder you sees something like "unable to find partition > table". > > Wei. >Because, without mentioning this, I get the error that I need to provide either a path to the kernel image or a bootloader. # xl create /etc/xen/precise-guest.cfg Parsing config from /etc/xen/precise-guest.cfg Neither kernel nor bootloader specified -- Aastha Mehta MPI-SWS, Germany E-mail: aasthakm@mpi-sws.org <aasthakm@gmail.com> _______________________________________________ Xen-users mailing list Xen-users@lists.xen.org http://lists.xen.org/xen-users
On Fri, Sep 27, 2013 at 07:03:48PM +0200, Aastha Mehta wrote:> On 27 September 2013 18:53, Wei Liu <wei.liu2@citrix.com> wrote: > > > On Fri, Sep 27, 2013 at 06:46:06PM +0200, Aastha Mehta wrote: > > [...] > > > > > > > > > This is successful and I have a config file that looks like this - > > > <config> > > > bootloader = ''/usr/local/lib/xen/bin/pygrub'' > > > > Why do you add this line? Why don''t you just use the generated config > > file? AIUI Pygrub expects a disk, while xen-create-image creates > > partitions. No wonder you sees something like "unable to find partition > > table". > > > > Wei. > > > > Because, without mentioning this, I get the error that I need to provide > either a path to the kernel image or a bootloader. >Then provide your modified kernel and initrd -- isn''t that exactly what you wanted? You''d better have a look at some example configs.> # xl create /etc/xen/precise-guest.cfg > Parsing config from /etc/xen/precise-guest.cfg > Neither kernel nor bootloader specified > > > -- > Aastha Mehta > MPI-SWS, Germany > E-mail: aasthakm@mpi-sws.org <aasthakm@gmail.com>
On 27 September 2013 19:07, Wei Liu <wei.liu2@citrix.com> wrote:> On Fri, Sep 27, 2013 at 07:03:48PM +0200, Aastha Mehta wrote: > > On 27 September 2013 18:53, Wei Liu <wei.liu2@citrix.com> wrote: > > > > > On Fri, Sep 27, 2013 at 06:46:06PM +0200, Aastha Mehta wrote: > > > [...] > > > > > > > > > > > > This is successful and I have a config file that looks like this - > > > > <config> > > > > bootloader = ''/usr/local/lib/xen/bin/pygrub'' > > > > > > Why do you add this line? Why don''t you just use the generated config > > > file? AIUI Pygrub expects a disk, while xen-create-image creates > > > partitions. No wonder you sees something like "unable to find partition > > > table". > > > > > > Wei. > > > > > > > Because, without mentioning this, I get the error that I need to provide > > either a path to the kernel image or a bootloader. > > > > Then provide your modified kernel and initrd -- isn''t that exactly what > you wanted? > > You''d better have a look at some example configs. > > > # xl create /etc/xen/precise-guest.cfg > > Parsing config from /etc/xen/precise-guest.cfg > > Neither kernel nor bootloader specified > > > > > > -- > > Aastha Mehta > > MPI-SWS, Germany > > E-mail: aasthakm@mpi-sws.org <aasthakm@gmail.com> >Sorry, I am going around in circles :( As you suggested to first try with stock kernel, I was trying to create a baseline VM. And I am missing something somewhere. I added path to modified kernel and initrd in the config file, and then this is what happens: root@wks-40-33:/home/aasthakm/bin# xl create /etc/xen/precise-guest.cfg Parsing config from /etc/xen/precise-guest.cfg Daemon running with PID 32204 root@wks-40-33:/home/aasthakm/bin# xl list Name ID Mem VCPUs State Time(s) Domain-0 0 5221 4 r----- 2288.5 root@wks-40-33:/home/aasthakm/bin# xl list Name ID Mem VCPUs State Time(s) Domain-0 0 5221 4 r----- 2288.6 precise-guest 21 0 0 --p--- 0.0 <<<<<<<< root@wks-40-33:/home/aasthakm/bin# xl list Name ID Mem VCPUs State Time(s) Domain-0 0 5221 4 r----- 2289.7 precise-guest 21 512 0 --p--- 0.0 root@wks-40-33:/home/aasthakm/bin# xl list Name ID Mem VCPUs State Time(s) Domain-0 0 5221 4 r----- 2291.0 precise-guest 21 512 1 --p--- 0.0 root@wks-40-33:/home/aasthakm/bin# xl list Name ID Mem VCPUs State Time(s) Domain-0 0 5221 4 r----- 2291.7 precise-guest 21 512 1 --psc- 0.0 root@wks-40-33:/home/aasthakm/bin# xl list Name ID Mem VCPUs State Time(s) Domain-0 0 5221 4 r----- 2291.9 root@wks-40-33:/home/aasthakm/bin# xl list Name ID Mem VCPUs State Time(s) Domain-0 0 5221 4 r----- 2292.4 precise-guest 22 512 0 --p--- 0.0 <<<<<<<< And this is what the dmesg shows: [74224.901083] xenbr0: port 3(vif20.0) entered disabled state [74233.958830] IPv6: ADDRCONF(NETDEV_UP): vif21.0: link is not ready [74233.964990] init: Failed to spawn network-interface (vif21.0) pre-start process: unable to change root directory: No such file or directory [74233.985132] init: Failed to spawn network-interface-security (network-interface/vif21.0) pre-start process: unable to change root directory: No such file or directory [74233.998930] init: Failed to spawn network-interface (vif21.0) post-stop process: unable to change root directory: No such file or directory [74234.015448] device vif21.0 entered promiscuous mode [74234.017308] IPv6: ADDRCONF(NETDEV_UP): vif21.0: link is not ready [74234.073060] xenbr0: port 3(vif21.0) entered disabled state [74234.073150] device vif21.0 left promiscuous mode [74234.073155] xenbr0: port 3(vif21.0) entered disabled state [74243.139149] IPv6: ADDRCONF(NETDEV_UP): vif22.0: link is not ready [74243.140978] init: Failed to spawn network-interface (vif22.0) pre-start process: unable to change root directory: No such file or directory [74243.157986] init: Failed to spawn network-interface-security (network-interface/vif22.0) pre-start process: unable to change root directory: No such file or directory [74243.166838] init: Failed to spawn network-interface (vif22.0) post-stop process: unable to change root directory: No such file or directory [74243.188519] device vif22.0 entered promiscuous mode [74243.190556] IPv6: ADDRCONF(NETDEV_UP): vif22.0: link is not ready [74243.251182] xenbr0: port 3(vif22.0) entered disabled state [74243.251474] device vif22.0 left promiscuous mode [74243.251486] xenbr0: port 3(vif22.0) entered disabled state -- Aastha Mehta MPI-SWS, Germany E-mail: aasthakm@mpi-sws.org <aasthakm@gmail.com> _______________________________________________ Xen-users mailing list Xen-users@lists.xen.org http://lists.xen.org/xen-users
On Fri, Sep 27, 2013 at 07:19:25PM +0200, Aastha Mehta wrote: [...]> > Sorry, I am going around in circles :( > As you suggested to first try with stock kernel, I was trying to create a > baseline VM. And I am missing something somewhere. >OK, does your baseline VM boot? Make sure it boots before using your kernel.> I added path to modified kernel and initrd in the config file, and then > this is what happens: >Looks like there''s something wrong with hotplug scripts. This page contains useful info on how to collect necessary info. http://wiki.xen.org/wiki/Reporting_Bugs_against_Xen Wei.
On 30 September 2013 14:50, Wei Liu <wei.liu2@citrix.com> wrote:> On Fri, Sep 27, 2013 at 07:19:25PM +0200, Aastha Mehta wrote: > [...] >> >> Sorry, I am going around in circles :( >> As you suggested to first try with stock kernel, I was trying to create a >> baseline VM. And I am missing something somewhere. >> > > OK, does your baseline VM boot? Make sure it boots before using your > kernel. > >> I added path to modified kernel and initrd in the config file, and then >> this is what happens: >> > > Looks like there''s something wrong with hotplug scripts. > > This page contains useful info on how to collect necessary info. > > http://wiki.xen.org/wiki/Reporting_Bugs_against_Xen > > Wei.No, I am not even able to boot my baseline VM (specifying only the mirror and no modified kernel). This is the error I get: Parsing config from /etc/xen/precise-guest.cfg libxl: error: libxl_bootloader.c:628:bootloader_finished: bootloader failed - consult logfile /var/log/xen/bootloader.3.log libxl: error: libxl_exec.c:118:libxl_report_child_exitstatus: bootloader [19273] exited with error status 1 libxl: error: libxl_create.c:900:domcreate_rebuild_done: cannot (re-)build domain: -3 And /var/log/xen/bootloader.3.log contains: File "/usr/lib/xen-default/bin/pygrub", line 763 in <module> raise RuntimeError, "Unable to find partition containing kernel" Thanks -- Aastha Mehta
On Mon, Sep 30, 2013 at 09:39:31PM +0200, Aastha Mehta wrote:> On 30 September 2013 14:50, Wei Liu <wei.liu2@citrix.com> wrote: > > On Fri, Sep 27, 2013 at 07:19:25PM +0200, Aastha Mehta wrote: > > [...] > >> > >> Sorry, I am going around in circles :( > >> As you suggested to first try with stock kernel, I was trying to create a > >> baseline VM. And I am missing something somewhere. > >> > > > > OK, does your baseline VM boot? Make sure it boots before using your > > kernel. > > > >> I added path to modified kernel and initrd in the config file, and then > >> this is what happens: > >> > > > > Looks like there''s something wrong with hotplug scripts. > > > > This page contains useful info on how to collect necessary info. > > > > http://wiki.xen.org/wiki/Reporting_Bugs_against_Xen > > > > Wei. > > No, I am not even able to boot my baseline VM (specifying only the > mirror and no modified kernel). This is the error I get: > Parsing config from /etc/xen/precise-guest.cfg > libxl: error: libxl_bootloader.c:628:bootloader_finished: bootloader > failed - consult logfile /var/log/xen/bootloader.3.log > libxl: error: libxl_exec.c:118:libxl_report_child_exitstatus: > bootloader [19273] exited with error status 1 > libxl: error: libxl_create.c:900:domcreate_rebuild_done: cannot > (re-)build domain: -3 > > And /var/log/xen/bootloader.3.log contains: > File "/usr/lib/xen-default/bin/pygrub", line 763 in <module> > raise RuntimeError, "Unable to find partition containing kernel" >I don''t think xen-create-image adds pygrub, does it? Make it work first before making any modification, please. There are tons of tutorials online teaching you how to create a PV guest. Wei.> Thanks > > -- > Aastha Mehta
On Tue, 2013-10-01 at 09:55 +0100, Wei Liu wrote:> On Mon, Sep 30, 2013 at 09:39:31PM +0200, Aastha Mehta wrote: > > On 30 September 2013 14:50, Wei Liu <wei.liu2@citrix.com> wrote: > > > On Fri, Sep 27, 2013 at 07:19:25PM +0200, Aastha Mehta wrote: > > > [...] > > >> > > >> Sorry, I am going around in circles :( > > >> As you suggested to first try with stock kernel, I was trying to create a > > >> baseline VM. And I am missing something somewhere. > > >> > > > > > > OK, does your baseline VM boot? Make sure it boots before using your > > > kernel. > > > > > >> I added path to modified kernel and initrd in the config file, and then > > >> this is what happens: > > >> > > > > > > Looks like there''s something wrong with hotplug scripts. > > > > > > This page contains useful info on how to collect necessary info. > > > > > > http://wiki.xen.org/wiki/Reporting_Bugs_against_Xen > > > > > > Wei. > > > > No, I am not even able to boot my baseline VM (specifying only the > > mirror and no modified kernel). This is the error I get: > > Parsing config from /etc/xen/precise-guest.cfg > > libxl: error: libxl_bootloader.c:628:bootloader_finished: bootloader > > failed - consult logfile /var/log/xen/bootloader.3.log > > libxl: error: libxl_exec.c:118:libxl_report_child_exitstatus: > > bootloader [19273] exited with error status 1 > > libxl: error: libxl_create.c:900:domcreate_rebuild_done: cannot > > (re-)build domain: -3 > > > > And /var/log/xen/bootloader.3.log contains: > > File "/usr/lib/xen-default/bin/pygrub", line 763 in <module> > > raise RuntimeError, "Unable to find partition containing kernel" > > > > I don''t think xen-create-image adds pygrub, does it?It seems to depend on the distro, from xen-create-image: # Lucid and probably all later Ubuntus, too, don''t work without pygrub # if ( $CONFIG{ ''dist'' } =~ /lucid|maverick|natty|oneiric|precise|quantal/ ) { $CONFIG{ ''pygrub'' } = 1; } xl -vvv create should give us the bootloader command line used, which will be helpful. Ian.
On 1 October 2013 11:07, Ian Campbell <Ian.Campbell@citrix.com> wrote:> On Tue, 2013-10-01 at 09:55 +0100, Wei Liu wrote: >> On Mon, Sep 30, 2013 at 09:39:31PM +0200, Aastha Mehta wrote: >> > On 30 September 2013 14:50, Wei Liu <wei.liu2@citrix.com> wrote: >> > > On Fri, Sep 27, 2013 at 07:19:25PM +0200, Aastha Mehta wrote: >> > > [...] >> > >> >> > >> Sorry, I am going around in circles :( >> > >> As you suggested to first try with stock kernel, I was trying to create a >> > >> baseline VM. And I am missing something somewhere. >> > >> >> > > >> > > OK, does your baseline VM boot? Make sure it boots before using your >> > > kernel. >> > > >> > >> I added path to modified kernel and initrd in the config file, and then >> > >> this is what happens: >> > >> >> > > >> > > Looks like there''s something wrong with hotplug scripts. >> > > >> > > This page contains useful info on how to collect necessary info. >> > > >> > > http://wiki.xen.org/wiki/Reporting_Bugs_against_Xen >> > > >> > > Wei. >> > >> > No, I am not even able to boot my baseline VM (specifying only the >> > mirror and no modified kernel). This is the error I get: >> > Parsing config from /etc/xen/precise-guest.cfg >> > libxl: error: libxl_bootloader.c:628:bootloader_finished: bootloader >> > failed - consult logfile /var/log/xen/bootloader.3.log >> > libxl: error: libxl_exec.c:118:libxl_report_child_exitstatus: >> > bootloader [19273] exited with error status 1 >> > libxl: error: libxl_create.c:900:domcreate_rebuild_done: cannot >> > (re-)build domain: -3 >> > >> > And /var/log/xen/bootloader.3.log contains: >> > File "/usr/lib/xen-default/bin/pygrub", line 763 in <module> >> > raise RuntimeError, "Unable to find partition containing kernel" >> > >> >> I don''t think xen-create-image adds pygrub, does it? > > It seems to depend on the distro, from xen-create-image: > # Lucid and probably all later Ubuntus, too, don''t work without pygrub > # > if ( $CONFIG{ ''dist'' } =~ /lucid|maverick|natty|oneiric|precise|quantal/ ) > { > $CONFIG{ ''pygrub'' } = 1; > } > > xl -vvv create should give us the bootloader command line used, which > will be helpful. > > Ian. >Yes, specifying either the bootloader or kernel image is mandatory. I get the same behaviour even with a debian distro mirror image. Here is the output of # xl -vvv create /etc/xen/precise-guest.cfg Parsing config from /etc/xen/precise-guest.cfg libxl: debug: libxl_create.c:1230:do_domain_create: ao 0x665600: create: how=(nil) callback=(nil) poller=0x664db0 libxl: debug: libxl_device.c:257:libxl__device_disk_set_backend: Disk vdev=xvda2 spec.backend=unknown libxl: debug: libxl_device.c:197:disk_try_backend: Disk vdev=xvda2, backend phy unsuitable as phys path not a block device libxl: debug: libxl_device.c:212:disk_try_backend: Disk vdev=xvda2, backend tap unsuitable because blktap not available libxl: debug: libxl_device.c:296:libxl__device_disk_set_backend: Disk vdev=xvda2, using backend qdisk libxl: debug: libxl_device.c:257:libxl__device_disk_set_backend: Disk vdev=xvda1 spec.backend=unknown libxl: debug: libxl_device.c:197:disk_try_backend: Disk vdev=xvda1, backend phy unsuitable as phys path not a block device libxl: debug: libxl_device.c:212:disk_try_backend: Disk vdev=xvda1, backend tap unsuitable because blktap not available libxl: debug: libxl_device.c:296:libxl__device_disk_set_backend: Disk vdev=xvda1, using backend qdisk libxl: debug: libxl_create.c:675:initiate_domain_create: running bootloader libxl: debug: libxl_device.c:257:libxl__device_disk_set_backend: Disk vdev=(null) spec.backend=qdisk libxl: debug: libxl.c:2641:libxl__device_disk_local_initiate_attach: locally attaching qdisk /home/domains/precise-guest/disk.img libxl: debug: libxl_bootloader.c:409:bootloader_disk_attached_cb: Config bootloader value: /usr/lib/xen-default/bin/pygrub libxl: debug: libxl_create.c:1243:do_domain_create: ao 0x665600: inprogress: poller=0x664db0, flags=i libxl: debug: libxl_event.c:559:libxl__ev_xswatch_register: watch w=0x663d58 wpath=/local/domain/9 token=3/0: register slotnum=3 libxl: debug: libxl_event.c:1737:libxl__ao_progress_report: ao 0x665600: progress report: ignored libxl: debug: libxl_bootloader.c:535:bootloader_gotptys: executing bootloader: /usr/lib/xen-default/bin/pygrub libxl: debug: libxl_bootloader.c:539:bootloader_gotptys: bootloader arg: /usr/lib/xen-default/bin/pygrub libxl: debug: libxl_bootloader.c:539:bootloader_gotptys: bootloader arg: --args=root=/dev/xvda2 ro libxl: debug: libxl_bootloader.c:539:bootloader_gotptys: bootloader arg: --output=/var/run/xen/bootloader.9.out libxl: debug: libxl_bootloader.c:539:bootloader_gotptys: bootloader arg: --output-format=simple0 libxl: debug: libxl_bootloader.c:539:bootloader_gotptys: bootloader arg: --output-directory=/var/run/xen/bootloader.9.d libxl: debug: libxl_bootloader.c:539:bootloader_gotptys: bootloader arg: /home/domains/precise-guest/disk.img libxl: debug: libxl_event.c:503:watchfd_callback: watch w=0x663d58 wpath=/local/domain/9 token=3/0: event epath=/local/domain/9 libxl: error: libxl_bootloader.c:628:bootloader_finished: bootloader failed - consult logfile /var/log/xen/bootloader.9.log libxl: error: libxl_exec.c:118:libxl_report_child_exitstatus: bootloader [31916] exited with error status 1 libxl: debug: libxl_event.c:596:libxl__ev_xswatch_deregister: watch w=0x663d58 wpath=/local/domain/9 token=3/0: deregister slotnum=3 libxl: error: libxl_create.c:900:domcreate_rebuild_done: cannot (re-)build domain: -3 libxl: debug: libxl_event.c:1569:libxl__ao_complete: ao 0x665600: complete, rc=-3 libxl: debug: libxl_event.c:1541:libxl__ao__destroy: ao 0x665600: destroy xc: debug: hypercall buffer: total allocations:31 total releases:31 xc: debug: hypercall buffer: current allocations:0 maximum allocations:2 xc: debug: hypercall buffer: cache current size:2 xc: debug: hypercall buffer: cache hits:27 misses:2 toobig:2 Thanks -- Aastha Mehta MPI-SWS, Germany E-mail: aasthakm@mpi-sws.org
On Tue, 2013-10-01 at 22:26 +0200, Aastha Mehta wrote:> Here is the output of # xl -vvv create /etc/xen/precise-guest.cfg > > Parsing config from /etc/xen/precise-guest.cfg > libxl: debug: libxl_create.c:1230:do_domain_create: ao 0x665600: create: how=(nil) callback=(nil) poller=0x664db0 > libxl: debug: libxl_device.c:257:libxl__device_disk_set_backend: Disk vdev=xvda2 spec.backend=unknown > libxl: debug: libxl_device.c:197:disk_try_backend: Disk vdev=xvda2, backend phy unsuitable as phys path not a block device > libxl: debug: libxl_device.c:212:disk_try_backend: Disk vdev=xvda2, backend tap unsuitable because blktap not available > libxl: debug: libxl_device.c:296:libxl__device_disk_set_backend: Disk vdev=xvda2, using backend qdisk > libxl: debug: libxl_device.c:257:libxl__device_disk_set_backend: Disk vdev=xvda1 spec.backend=unknown > libxl: debug: libxl_device.c:197:disk_try_backend: Disk vdev=xvda1, backend phy unsuitable as phys path not a block device > libxl: debug: libxl_device.c:212:disk_try_backend: Disk vdev=xvda1, backend tap unsuitable because blktap not available > libxl: debug: libxl_device.c:296:libxl__device_disk_set_backend: Disk vdev=xvda1, using backend qdisk > libxl: debug: libxl_create.c:675:initiate_domain_create: running bootloader > libxl: debug: libxl_device.c:257:libxl__device_disk_set_backend: Disk vdev=(null) spec.backend=qdisk > libxl: debug: libxl.c:2641:libxl__device_disk_local_initiate_attach: locally attaching qdisk /home/domains/precise-guest/disk.img > libxl: debug: libxl_bootloader.c:409:bootloader_disk_attached_cb: Config bootloader value: /usr/lib/xen-default/bin/pygrub > libxl: debug: libxl_create.c:1243:do_domain_create: ao 0x665600: inprogress: poller=0x664db0, flags=i > libxl: debug: libxl_event.c:559:libxl__ev_xswatch_register: watch w=0x663d58 wpath=/local/domain/9 token=3/0: register slotnum=3 > libxl: debug: libxl_event.c:1737:libxl__ao_progress_report: ao 0x665600: progress report: ignored > libxl: debug: libxl_bootloader.c:535:bootloader_gotptys: executing bootloader: /usr/lib/xen-default/bin/pygrub > libxl: debug: libxl_bootloader.c:539:bootloader_gotptys: bootloader arg: /usr/lib/xen-default/bin/pygrub > libxl: debug: libxl_bootloader.c:539:bootloader_gotptys: bootloader arg: --args=root=/dev/xvda2 ro > libxl: debug: libxl_bootloader.c:539:bootloader_gotptys: bootloader arg: --output=/var/run/xen/bootloader.9.out > libxl: debug: libxl_bootloader.c:539:bootloader_gotptys: bootloader arg: --output-format=simple0 > libxl: debug: libxl_bootloader.c:539:bootloader_gotptys: bootloader arg: --output-directory=/var/run/xen/bootloader.9.d > libxl: debug: libxl_bootloader.c:539:bootloader_gotptys: bootloader arg: /home/domains/precise-guest/disk.img > libxl: debug: libxl_event.c:503:watchfd_callback: watch w=0x663d58 wpath=/local/domain/9 token=3/0: event epath=/local/domain/9 > libxl: error: libxl_bootloader.c:628:bootloader_finished: bootloader failed - consult logfile /var/log/xen/bootloader.9.log > libxl: error: libxl_exec.c:118:libxl_report_child_exitstatus: bootloader [31916] exited with error status 1 > libxl: debug: libxl_event.c:596:libxl__ev_xswatch_deregister: watch w=0x663d58 wpath=/local/domain/9 token=3/0: deregister slotnum=3 > libxl: error: libxl_create.c:900:domcreate_rebuild_done: cannot (re-)build domain: -3 > libxl: debug: libxl_event.c:1569:libxl__ao_complete: ao 0x665600: complete, rc=-3 > libxl: debug: libxl_event.c:1541:libxl__ao__destroy: ao 0x665600: destroy > xc: debug: hypercall buffer: total allocations:31 total releases:31 > xc: debug: hypercall buffer: current allocations:0 maximum allocations:2 > xc: debug: hypercall buffer: cache current size:2 > xc: debug: hypercall buffer: cache hits:27 misses:2 toobig:2What is the output of: /usr/lib/xen-default/bin/pygrub --entry=0 /home/domains/precise-guest/disk.img ? And what about: fdisk -l /home/domains/precise-guest/disk.img ? If it has no partition table are you able to mount -o loop /home/domains/precise-guest/disk.img /mnt ? If it has a partition table are you able to kpartx -a /home/domains/precise-guest/disk.img mount /dev/mapper/..... for any/all of the partitions? (I forget how kpartx names things, it should be obvious in ls) What are the filesystems used? Are you able to locate one with a grub.cfg and/or a kernel on it? Ian.
On 2 October 2013 10:49, Ian Campbell <Ian.Campbell@citrix.com> wrote:> > What is the output of: > /usr/lib/xen-default/bin/pygrub --entry=0 /home/domains/precise-guest/disk.img > ? > > And what about: > fdisk -l /home/domains/precise-guest/disk.img > ? > > If it has no partition table are you able to > mount -o loop /home/domains/precise-guest/disk.img /mnt > ? > > If it has a partition table are you able to > kpartx -a /home/domains/precise-guest/disk.img > mount /dev/mapper/..... > for any/all of the partitions? > (I forget how kpartx names things, it should be obvious in ls) > > What are the filesystems used? Are you able to locate one with a > grub.cfg and/or a kernel on it? > > Ian. >Hi Ian, The disk image did not have any partition. On mount I could see that it has the typical root file system layout, with /bin, /boot, /lib and all other directories. Actually, I just managed to figure out the problem, or atleast rather fix it. The memory size was not sufficient for my built kernel, because of which, for some reason vif port was not getting configured. I increased the memory size from 512MB to 2GB and I managed to boot the guest domain with my kernel image. I do not have an explanation for it, but it just seems to have worked. Now, I have just two more questions on how to use the modified guest kernel in the VM. 1. How do I ensure that all the necessary kernel files - the kernel header files, library modules, etc. are available inside the guest VM? Do I have to copy them manually into the VM or into the file system on the disk.img? 2. If I wanted to be able to modify the kernel and reboot with the recompiled version from within the VM, do I have to replace the path to kernel image in the config file with the bootloader? Of course, I guess I have to setup the grub.cfg inside the VM. Thanks -- Aastha Mehta MPI-SWS, Germany E-mail: aasthakm@mpi-sws.org
On Wed, Oct 02, 2013 at 10:27:54PM +0200, Aastha Mehta wrote:> On 2 October 2013 10:49, Ian Campbell <Ian.Campbell@citrix.com> wrote: > > > > What is the output of: > > /usr/lib/xen-default/bin/pygrub --entry=0 /home/domains/precise-guest/disk.img > > ? > > > > And what about: > > fdisk -l /home/domains/precise-guest/disk.img > > ? > > > > If it has no partition table are you able to > > mount -o loop /home/domains/precise-guest/disk.img /mnt > > ? > > > > If it has a partition table are you able to > > kpartx -a /home/domains/precise-guest/disk.img > > mount /dev/mapper/..... > > for any/all of the partitions? > > (I forget how kpartx names things, it should be obvious in ls) > > > > What are the filesystems used? Are you able to locate one with a > > grub.cfg and/or a kernel on it? > > > > Ian. > > > > Hi Ian, > > The disk image did not have any partition. On mount I could see that > it has the typical root file system layout, with /bin, /boot, /lib and > all other directories. > > Actually, I just managed to figure out the problem, or atleast rather > fix it. The memory size was not sufficient for my built kernel, > because of which, for some reason vif port was not getting configured. > I increased the memory size from 512MB to 2GB and I managed to boot > the guest domain with my kernel image. I do not have an explanation > for it, but it just seems to have worked. >What''s the size of your kernel and initrd? Striping symbols can help reduce the size. man strip> Now, I have just two more questions on how to use the modified guest > kernel in the VM. > 1. How do I ensure that all the necessary kernel files - the kernel > header files, library modules, etc. are available inside the guest VM? > Do I have to copy them manually into the VM or into the file system on > the disk.img? >I think so. But do you really want to compile modules in your VM? If not, you don''t need to copy header files. You can compile it in Dom0 or your build machine then copy the necessary kernel image / modules into your VM.> 2. If I wanted to be able to modify the kernel and reboot with the > recompiled version from within the VM, do I have to replace the path > to kernel image in the config file with the bootloader? Of course, I > guess I have to setup the grub.cfg inside the VM. >Just use kernel= and initrd= directives in your guest config file. Pygrub is not mandatory. Wei.> Thanks > > -- > Aastha Mehta > MPI-SWS, Germany > E-mail: aasthakm@mpi-sws.org