[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] virsh create Guest Crashing



>Stefan de Konink <skinkie xs4all nl> wrote on 19/05/2008 18:18:25:

> Chris Lalancette schreef:
> > Kenneth Nagin wrote:
> >> Setting up new root fs
> >> setuproot: moving /dev failed: No such file or directory
> >> no fstab.sys, mounting internal defaults
> >> setuproot: error mounting /proc: No such file or directory.
> >> setuproot: error mounting /sys: No such file or directory
> >> Switching to new root and running init.
> >> unmounting old /dev
> >> unmounting old /proc
> >> unmounting old /sys
> >> switchroot: mount failed: No such file or directory
> >> Booting has failed.
> >> Kernel panic - not syncing: Attempted to kill init!
> >>
> >> I see two possible sources to the problem:
> >> XENBUS: Device with no driver ...
> >> and
> >> setuproot: moving /dev failed: No such file or directory
> >> ...
> >> switchroot: mount failed: No such file or directory
> >>
> >> Is there libvirt xml equivalent to the XEN configuration file's root =
> >> "/dev/xvda1 ro"?
> >>
> >
> > OK, yeah.  The XENBUS: Device with no driver can be ignored, I'm
> pretty sure.
> > The problem is probably what you think, that you don't have a
> root=/dev/xvda1
> > line in there.  Other people will have to comment on whether there
> is a libvirt
> > XML equivalent, since I'm just not sure.
>
> <domain type='xen' >
>    <name>Gentoo</name>
>    <os>
>      <type>linux</type>
>      <kernel>/usr/lib/xen/boot/linux-2.6.20-xen-r6</kernel>
>      <cmdline> root=/dev/xvda ro
> ip=85.17.131.4:1.2.3.4:85.17.131.253:255.255.255.0::eth0:off</cmdline>
>    </os>
>    <memory>131072</memory>
>    <vcpu>1</vcpu>
>    <devices>
>      <disk type='pool'>
>        <source pool='netapp' volume='lun-3' />
>        <target dev='xvda'/>
>      </disk>
>      <interface type='bridge'>
>        <source bridge='xenbr0'/>
>        <mac address='aa:00:00:00:00:11'/>
>        <script path='/etc/xen/scripts/vif-bridge'/>
>      </interface>
>    </devices>
> </domain>
>
>
> I think the target dev here can just be appended with an one?
>
>
> Stefan
I used virsh xmldump to create an xml file.
I comment out the bootloader element since XEN create fails with an error
when
the bootloader element is empty.  Also I commented out the target dev vif
directive because
it is ignored by create.  The domain id directive is also ignored.
This is a commented copy of the working xml:

<domain type='xen' id='78'> <!-- create seems to ignore id directive -->
  <name>ken-30</name>
  <uuid>c309cbc4-7e95-545f-0b16-2bf9e1e050dd</uuid>
<!--<bootloader/>  create error xen doesn't accept empty bootloader -->>
  <os>
    <type>linux</type>
    <kernel>/data/images/boot/vmlinuz-2.6.21.7-3.fc8xen</kernel>
    <initrd>/data/images/boot/2.6.21.7-3.fc8xen-fedora.fc8.img</initrd>>
    <cmdline>root=/dev/xvda1 ro </cmdline>
  </os>
  <memory>131072</memory>
  <vcpu>1</vcpu>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>>
    <interface type='bridge'>>
      <source bridge='virbr0'/>>
<!--    <target dev='vif78.0'/> create seems to ignore vif directive -->
      <mac address='00:16:3e:3b:46:d5'/>
      <script path='vif-bridge'/>
    </interface>
    <input type='mouse' bus='xen'/>
    <graphics type='vnc' port='5930'/>
    <disk type='file' device='disk'>
      <driver name='tap' type='aio'/>>
      <source file='/data/images/nagin/c1/ken-30/fedora.fc8.img'/>
      <target dev='xvda1'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='tap' type='aio'/>
      <source file='/data/images/nagin/c1/ken-30/fedora.swap'/>
      <target dev='xvda2'/>
    </disk>
    <console tty='/dev/pts/8'/>
  </devices>
</domain>

Thanks for the help.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]