VM Shutting down (boot)

Asked by Laurent Borensky

I do not undestand. I can not run a VM with Nova (Cactus release) with KVM (qemu). I have no trace (qemu), no boot log file, etc.
and my images used are 32bits and also my 2 hosts (server1 & server2).

What are the firt steps (eg: images), configurations and actions to achieve ?

Thank you for your help. I'd like to get to run the solution.

See also, I have a trace at console, but I do not know if this is the cause of the problem.
  nbd15: Receive control failed (result -32)

Question information

Language:
English Edit question
Status:
Solved
For:
OpenStack Compute (nova) Edit question
Assignee:
No assignee Edit question
Solved by:
Laurent Borensky
Solved:
Last query:
Last reply:
Revision history for this message
Laurent Borensky (laurent-borensky) said :
#1

Hi all,

Some additional informations:

1) Unable to mount the device on the boot image to insert the key, the error nbd15. It is not blocking for the moment.

2) I always search for the reason or the problem about VM down at boot. Here are some extracts, but I do not know where to look. If we have a idea, thank you for ypur help.

 cd /var/lib/nova/instances/instance-00000021; ls -l <CR>
total 4108
-rw-r----- 1 libvirt-qemu kvm 0 2011-06-07 12:17 console.log
-rw-r--r-- 1 libvirt-qemu kvm 6291968 2011-06-07 12:17 disk
-rw-r--r-- 1 nova nogroup 1498 2011-06-07 12:17 libvirt.xml

# cat libvirt.xml <CR>
<domain type='kvm'>
    <name>instance-00000021</name>
    <memory>524288</memory>
    <os>
            <type>hvm</type>
            <boot dev="hd" />
    </os>
    <features>
        <acpi/>
    </features>
    <vcpu>1</vcpu>
    <devices>
        <disk type='file'>
            <driver type='qcow2'/>
            <source file='/var/lib/nova/instances/instance-00000021/disk'/>
            <target dev='vda' bus='virtio'/>
        </disk>

        <interface type='bridge'>
            <source bridge='br100'/>
            <mac address='02:16:3e:57:ac:6c'/>
            <!-- <model type='virtio'/> CANT RUN virtio network right now -->
            <filterref filter="nova-instance-instance-00000021-02163e57ac6c">
                <parameter name="IP" value="192.168.3.6" />
                <parameter name="DHCPSERVER" value="192.168.3.1" />
            </filterref>
        </interface>
        <!-- The order is significant here. File must be defined first -->
        <serial type="file">
            <source path='/var/lib/nova/instances/instance-00000021/console.log'/>
            <target port='1'/>
        </serial>

        <console type='pty' tty='/dev/pts/2'>
            <source path='/dev/pts/2'/>
            <target port='0'/>
        </console>

        <serial type='pty'>
            <source path='/dev/pts/2'/>
            <target port='0'/>
        </serial>

        <graphics type='vnc' port='-1' autoport='yes' keymap='en-us' listen='0.0.0.0'/>
    </devices>
</domain>

# file disk <CR>
disk: QEMU QCOW Image (v2), has backing file (path /var/lib/nova/instances/_base/0), 4429312 bytes

# ls -l /var/lib/nova/instances/_base/0 <CR>
ls: cannot access /var/lib/nova/instances/_base/0: No such file or directory

Revision history for this message
Vish Ishaya (vishvananda) said :
#2

_base/0 ? It seems like somehow the instance is trying to boot with an image id of 0. I'm not quite sure how this could be happening. It attempts to construct the backing file name out of the image id and downloads it into _base. Then it creates a img file with qemu-img. Somehow the qemu-img file is using '0' as the image id which can't be correct.

Vish

On Jun 8, 2011, at 1:11 PM, Laurent Borensky wrote:

> Question #160479 on OpenStack Compute (nova) changed:
> https://answers.launchpad.net/nova/+question/160479
>
> Laurent Borensky gave more information on the question:
> Hi all,
>
> Some additional informations:
>
> 1) Unable to mount the device on the boot image to insert the key, the
> error nbd15. It is not blocking for the moment.
>
> 2) I always search for the reason or the problem about VM down at boot.
> Here are some extracts, but I do not know where to look. If we have a
> idea, thank you for ypur help.
>
> cd /var/lib/nova/instances/instance-00000021; ls -l <CR>
> total 4108
> -rw-r----- 1 libvirt-qemu kvm 0 2011-06-07 12:17 console.log
> -rw-r--r-- 1 libvirt-qemu kvm 6291968 2011-06-07 12:17 disk
> -rw-r--r-- 1 nova nogroup 1498 2011-06-07 12:17 libvirt.xml
>
> # cat libvirt.xml <CR>
> <domain type='kvm'>
> <name>instance-00000021</name>
> <memory>524288</memory>
> <os>
> <type>hvm</type>
> <boot dev="hd" />
> </os>
> <features>
> <acpi/>
> </features>
> <vcpu>1</vcpu>
> <devices>
> <disk type='file'>
> <driver type='qcow2'/>
> <source file='/var/lib/nova/instances/instance-00000021/disk'/>
> <target dev='vda' bus='virtio'/>
> </disk>
>
> <interface type='bridge'>
> <source bridge='br100'/>
> <mac address='02:16:3e:57:ac:6c'/>
> <!-- <model type='virtio'/> CANT RUN virtio network right now -->
> <filterref filter="nova-instance-instance-00000021-02163e57ac6c">
> <parameter name="IP" value="192.168.3.6" />
> <parameter name="DHCPSERVER" value="192.168.3.1" />
> </filterref>
> </interface>
> <!-- The order is significant here. File must be defined first -->
> <serial type="file">
> <source path='/var/lib/nova/instances/instance-00000021/console.log'/>
> <target port='1'/>
> </serial>
>
> <console type='pty' tty='/dev/pts/2'>
> <source path='/dev/pts/2'/>
> <target port='0'/>
> </console>
>
> <serial type='pty'>
> <source path='/dev/pts/2'/>
> <target port='0'/>
> </serial>
>
> <graphics type='vnc' port='-1' autoport='yes' keymap='en-us' listen='0.0.0.0'/>
> </devices>
> </domain>
>
> # file disk <CR>
> disk: QEMU QCOW Image (v2), has backing file (path /var/lib/nova/instances/_base/0), 4429312 bytes
>
> # ls -l /var/lib/nova/instances/_base/0 <CR>
> ls: cannot access /var/lib/nova/instances/_base/0: No such file or directory
>
> --
> You received this question notification because you are a member of Nova
> Core, which is an answer contact for OpenStack Compute (nova).

Revision history for this message
Laurent Borensky (laurent-borensky) said :
#3

Vish,

Thank you very much for your answer. I would really like to get start a VM. I took step by step the actions performed with trace support. Indeed, there is no code in Nova with the string "_base. Maybe this information will find the problem?

root@server1:/home/localadmin/bin# nova list <CR>
+----+-----------+--------+-----------+-------------+
| ID | Name | Status | Public IP | Private IP |
+----+-----------+--------+-----------+-------------+
| 33 | Server 33 | ACTIVE | | 192.168.3.6 |
+----+-----------+--------+-----------+-------------+
root@server1:/home/localadmin/bin# nova delete 33 <CR>

root@server1:/home/localadmin/bin# nova flavor-list <CR>
+----+-----------+-----------+------+----------+-------+------------+----------+
| ID | Name | Memory_MB | Swap | Local_GB | VCPUs | RXTX_Quota | RXTX_Cap |
+----+-----------+-----------+------+----------+-------+------------+----------+
| 1 | m1.tiny | | | | | | |
| 2 | m1.small | | | | | | |
| 3 | m1.medium | | | | | | |
| 4 | m1.large | | | | | | |
| 5 | m1.xlarge | | | | | | |
+----+-----------+-----------+------+----------+-------+------------+----------+

root@server1:/home/localadmin/bin# nova image-list <CR>
+----+--------------------------+--------+
| ID | Name | Status |
+----+--------------------------+--------+
| 16 | linux-tty32-i386-ramdisk | ACTIVE |
| 17 | linux-tty32-i386-kernel | ACTIVE |
| 18 | linux-tty32-i386-image | ACTIVE |
+----+--------------------------+--------+

root@server1:/var/lib/nova/instances# cd _base <CR>
root@server1:/var/lib/nova/instances/_base# ls <CR>
00000002_sm 00000003_sm 00000006_sm 0000000c_sm 0000000f_sm 00000011_sm
root@server1:/var/lib/nova/instances/_base# ls -l <CR>
total 594364
-rw-r--r-- 1 libvirt-qemu kvm 4404752 2011-06-01 09:12 00000002_sm
-rw-r--r-- 1 libvirt-qemu kvm 25165824 2011-05-10 14:17 00000003_sm
-rw-r--r-- 1 libvirt-qemu kvm 524288000 2011-05-26 19:02 00000006_sm
-rw-r--r-- 1 libvirt-qemu kvm 25165824 2011-06-06 15:32 0000000c_sm
-rw-r--r-- 1 libvirt-qemu kvm 25165824 2011-06-06 18:33 0000000f_sm
-rw-r--r-- 1 libvirt-qemu kvm 4429392 2011-06-07 09:24 00000011_sm
root@server1:/var/lib/nova/instances/_base# rm *sm <CR>

root@server1:/var/lib/nova/instances/_base# euca-run-instances -t m1.tiny linux-tty32-i386-image <CR>
RESERVATION r-fj3eo7em projet1 default
INSTANCE i-00000022 ami-00000012 scheduling None (projet1, None) 0 m1.tiny 2011-06-09T06:29:13Z unknown zone

root@server1:/var/lib/nova/instances/_base# nova list <CR>
+----+-----------+--------+-----------+-------------+
| ID | Name | Status | Public IP | Private IP |
+----+-----------+--------+-----------+-------------+
| 34 | Server 34 | ACTIVE | | 192.168.3.3 |
+----+-----------+--------+-----------+-------------+

root@server1:/var/lib/nova/instances/_base# ls -l <CR>
total 24576
-rw-r--r-- 1 libvirt-qemu kvm 25165824 2011-06-09 08:29 00000012_sm

root@server1:/var/lib/nova/instances/_base# file * <CR>
00000012_sm: Linux rev 1.0 ext2 filesystem data, UUID=d1db1dea-200d-4e7a-a877-41cb8df9eea7, volume name "uec-rootfs"

root@server1:/var/lib/nova/instances/_base# cd ..; ls <CR>
instance-00000022

root@server1:/var/lib/nova/instances# cd in* <CR>
root@server1:/var/lib/nova/instances/instance-00000022# ls -l <CR>
total 4108
-rw-r----- 1 libvirt-qemu kvm 0 2011-06-09 08:29 console.log
-rw-r--r-- 1 libvirt-qemu kvm 6291968 2011-06-09 08:29 disk
-rw-r--r-- 1 nova nogroup 1498 2011-06-09 08:29 libvirt.xml

root@server1:/var/lib/nova/instances/instance-00000022# file disk <CR>
disk: QEMU QCOW Image (v2), has backing file (path /var/lib/nova/instances/_base/0), 25165824 bytes

root@server1:/var/lib/glance/images# ls -l <CR>
total 33100
-rw-r--r-- 1 glance nogroup 4294286 2011-06-07 08:57 16
-rw-r--r-- 1 glance nogroup 4429392 2011-06-07 08:58 17
-rw-r--r-- 1 glance nogroup 25165824 2011-06-07 08:58 18

Revision history for this message
Laurent Borensky (laurent-borensky) said :
#4

Hi,

It is necessary to choose a good image and use "UEC-publish-tarball", and after it's good!

Regards