<HTML>
<HEAD>
<TITLE>Re: [Openstack] Ubuntu run instance error + xen</TITLE>
</HEAD>
<BODY>
<FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>So what I’ve figured out is the following seems to work with xen4.<BR>
<BR>
$ diff  nova-2011.3/nova/virt/libvirt.xml.template  libvirt.xml.template <BR>
21c21<BR>
<             <root>/dev/xvda</root><BR>
---<BR>
>             <root>/dev/sda</root><BR>
46a47,49<BR>
>     #if $type == 'xen'<BR>
>       <bootloader>/usr/lib/xen-4.0/bin/pygrub</bootloader><BR>
>     #end if <BR>
62c65,69<BR>
<             <target dev='${disk_prefix}a' bus='${disk_bus}'/><BR>
---<BR>
>             #if $type == 'xen'<BR>
>                <target dev='${disk_prefix}a1' bus='${disk_bus}'/><BR>
>             #else<BR>
>                <target dev='${disk_prefix}a' bus='${disk_bus}'/><BR>
>             #end if<BR>
74c81,85<BR>
<             <target dev='${disk_prefix}a' bus='${disk_bus}'/><BR>
---<BR>
>             #if $type == 'xen'<BR>
>                <target dev='${disk_prefix}a1' bus='${disk_bus}'/><BR>
>             #else<BR>
>                <target dev='${disk_prefix}a' bus='${disk_bus}'/><BR>
>             #end if<BR>
<BR>
This seems to get the VM to start in xen4. Now another issue is coming up that should be easier. Seeing the console output I am now stuck at the following.<BR>
<BR>
Begin: Running /scripts/local-premount ... done.<BR>
[    0.460986] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)<BR>
Begin: Running /scripts/local-bottom ... done.<BR>
done.<BR>
Begin: Running /scripts/init-bottom ... done.<BR>
[    1.348832] EXT4-fs (sda1): re-mounted. Opts: (null)<BR>
cloud-init start-local running: Fri, 19 Aug 2011 21:34:59 +0000. up 4.01 seconds<BR>
no instance data found in start-local<BR>
init: cloud-init-local main process (186) terminated with status 1<BR>
<BR>
What would be causing that? If anyone knows.<BR>
<BR>
<BR>
<BR>
On 8/19/11 10:52 AM, "Joshua Harlow" <<a href="harlowja@yahoo-inc.com">harlowja@yahoo-inc.com</a>> wrote:<BR>
<BR>
</SPAN></FONT><BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>For my nova/virt/libvirt.xml.template on my compute node.<BR>
<BR>
The following is being done.<BR>
<BR>
  #if $type == 'xen'<BR>
        #set $disk_prefix = 'sd'<BR>
        #set $disk_bus = 'scsi'<BR>
            <type>linux</type><BR>
            <root>/dev/xvda</root><BR>
<BR>
Should that be /dev/sda for the /root node here?<BR>
<BR>
On 8/19/11 10:24 AM, "Joshua Harlow" <<a href="harlowja@yahoo-inc.com">harlowja@yahoo-inc.com</a>> wrote:<BR>
<BR>
</SPAN></FONT><BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>Ya, that is what I was thinking also.<BR>
<BR>
I haven’t customized anything though. This is just the normal euca-run-instances + basic openstack diablo-3.<BR>
<BR>
</SPAN></FONT><SPAN STYLE='font-size:11pt'><FONT FACE="Courier, Courier New">$ euca-run-instances  ami-0000001f  -k mykey -t m1.tiny<BR>
</FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><BR>
Where ami is:<BR>
<BR>
IMAGE    ami-0000001f    ubb/maverick-server-uec-amd64.img.manifest.xml        available    private        x86_64    machine    aki-0000001e    <BR>
IMAGE    aki-0000001e    ubb/maverick-server-uec-amd64-vmlinuz-virtual.manifest.xml        available    private        x86_64    kernel        <BR>
<BR>
The original libvirt from openstack is the following (the previous one was from virsh dumpxml):<BR>
<BR>
Maybe there is a bug in the libvirt + xen usage in openstack, since it seems like that file should not be having a “sda” hard drive being used?<BR>
<BR>
The annoying thing is with this crash is that it seems that xen is burning cpu cycles when it does crash, thus making the machine harder to use.<BR>
<BR>
</FONT><FONT FACE="Courier, Courier New"><domain type='xen'><BR>
    <name>instance-0000002c</name><BR>
    <memory>524288</memory><BR>
    <os><BR>
            <type>linux</type><BR>
            <root>/dev/xvda</root><BR>
            <kernel>/home/ctoteam/nova/nova/..//instances/instance-0000002c/kernel</kernel><BR>
                <cmdline>ro</cmdline><BR>
    </os><BR>
    <features><BR>
        <acpi/><BR>
    </features><BR>
    <vcpu>1</vcpu><BR>
    <devices><BR>
        <disk type='file'><BR>
            <driver type='qcow2'/><BR>
            <source file='/home/ctoteam/nova/nova/..//instances/instance-0000002c/disk'/><BR>
            <target dev='sda' bus='scsi'/><BR>
        </disk><BR>
<BR>
        <interface type='bridge'><BR>
            <source bridge='pan0'/><BR>
            <mac address='02:16:3e:5f:5f:1b'/><BR>
            <!--   <model type='virtio'/>  CANT RUN virtio network right now --><BR>
            <filterref filter="nova-instance-instance-0000002c-02163e5f5f1b"><BR>
                <parameter name="IP" value="10.0.0.2" /><BR>
                <parameter name="DHCPSERVER" value="192.168.1.1" /><BR>
            </filterref><BR>
        </interface><BR>
<BR>
        <!-- The order is significant here.  File must be defined first --><BR>
        <serial type="file"><BR>
            <source path='/home/ctoteam/nova/nova/..//instances/instance-0000002c/console.log'/><BR>
            <target port='1'/><BR>
        </serial><BR>
<BR>
        <console type='pty' tty='/dev/pts/2'><BR>
            <source path='/dev/pts/2'/><BR>
            <target port='0'/><BR>
        </console><BR>
<BR>
        <serial type='pty'><BR>
            <source path='/dev/pts/2'/><BR>
            <target port='0'/><BR>
        </serial><BR>
<BR>
        <graphics type='vnc' port='-1' autoport='yes' keymap='en-us' listen='0.0.0.0'/><BR>
    </devices><BR>
</domain><BR>
</FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><BR>
<BR>
On 8/18/11 10:31 PM, "Isaku Yamahata" <<a href="yamahata@valinux.co.jp">yamahata@valinux.co.jp</a>> wrote:<BR>
<BR>
</FONT></SPAN><BLOCKQUOTE><SPAN STYLE='font-size:11pt'><FONT FACE="Calibri, Verdana, Helvetica, Arial">It looks you specified "root=/dev/xvda", but the disk that is<BR>
instantiated is /dev/sda.<BR>
But I didn't see why it happened. Did you customized the template<BR>
for libvirt, libvirt.xml.template?<BR>
<BR>
<BR>
On Thu, Aug 18, 2011 at 05:54:45PM -0700, Joshua Harlow wrote:<BR>
> Hi all,<BR>
><BR>
> On xen + openstack diaboli-3 when running an instance with the generic ubuntu<BR>
> UEC images  from <a href="http://wiki.openstack.org/RunningNova#Registering_the_image">http://wiki.openstack.org/RunningNova#Registering_the_image</a>  I<BR>
> am seeing the following:<BR>
><BR>
> [    0.210681] VFS: Cannot open root device "xvda" or unknown-block(0,0)<BR>
> [    0.210691] Please append a correct "root=" boot option; here are the<BR>
> available partitions:<BR>
> [    0.210708] ca00            8192 sda driver: vbd<BR>
> [    0.210720] Kernel panic - not syncing: VFS: Unable to mount root fs on<BR>
> unknown-block(0,0)<BR>
><BR>
> This is on debian 6 (x86-64), is this a location that exists for others?<BR>
><BR>
> Here is the xml that was used to create this instance. It looks pretty<BR>
> standard. Any xen users out there encountered this?<BR>
><BR>
> <domain type='xen' id='18'><BR>
>   <name>instance-0000002b</name><BR>
>   <uuid>a1655436-d1c6-3e2c-bf57-a9c487f21e27</uuid><BR>
>   <memory>524288</memory><BR>
>   <currentMemory>524288</currentMemory><BR>
>   <vcpu>1</vcpu><BR>
>   <bootloader></bootloader><BR>
>   <os><BR>
>     <type>linux</type><BR>
>     <kernel>/home/ctoteam/nova/nova/..//instances/instance-0000002b/kernel</<BR>
> kernel><BR>
>     <cmdline>root=/dev/xvda ro</cmdline><BR>
>   </os><BR>
>   <clock offset='utc'/><BR>
>   <on_poweroff>destroy</on_poweroff><BR>
>   <on_reboot>restart</on_reboot><BR>
>   <on_crash>destroy</on_crash><BR>
>   <devices><BR>
>     <emulator>/usr/lib/xen-4.0/bin/qemu-dm</emulator><BR>
>     <disk type='file' device='disk'><BR>
>       <driver name='file'/><BR>
>       <source file='/home/ctoteam/nova/nova/..//instances/instance-0000002b/<BR>
> disk'/><BR>
>       <target dev='sda' bus='scsi'/><BR>
>     </disk><BR>
>     <interface type='bridge'><BR>
>       <mac address='02:16:3e:65:67:59'/><BR>
>       <source bridge='pan0'/><BR>
>       <script path='/etc/xen/scripts/vif-bridge'/><BR>
>       <target dev='vif18.0'/><BR>
>     </interface><BR>
>     <console type='pty' tty='/dev/pts/2'><BR>
>       <source path='/dev/pts/2'/><BR>
>       <target type='xen' port='0'/><BR>
>     </console><BR>
>     <input type='mouse' bus='xen'/><BR>
>     <graphics type='vnc' port='5900' autoport='yes' listen='0.0.0.0' keymap=<BR>
> 'en-us'/><BR>
>   </devices><BR>
> </domain><BR>
><BR>
><BR>
> <BR>
><BR>
<BR>
> _______________________________________________<BR>
> Mailing list: <a href="https://launchpad.net/~openstack">https://launchpad.net/~openstack</a><BR>
> Post to     : <a href="openstack@lists.launchpad.net">openstack@lists.launchpad.net</a><BR>
> Unsubscribe : <a href="https://launchpad.net/~openstack">https://launchpad.net/~openstack</a><BR>
> More help   : <a href="https://help.launchpad.net/ListHelp">https://help.launchpad.net/ListHelp</a><BR>
<BR>
<BR>
--<BR>
yamahata<BR>
<BR>
</FONT></SPAN></BLOCKQUOTE><SPAN STYLE='font-size:11pt'><FONT FACE="Calibri, Verdana, Helvetica, Arial"><BR>
</FONT></SPAN></BLOCKQUOTE><SPAN STYLE='font-size:11pt'><FONT FACE="Calibri, Verdana, Helvetica, Arial"><BR>
</FONT></SPAN></BLOCKQUOTE>
</BODY>
</HTML>