Ttylinux - Boot failed: not a bootable disk

Hi,

opennebula-5.3.90-1.x86_64

I used to succesully run the following test setup with Vagrant


but for some time I’m getting the famous “Boot failed: not a bootable disk” from ttylinux.
I found the following possible explanation of the boot failure “ttylinux is just for testing, it lacks virtio drivers and
other amenities. Use hda for the disk and you should be fine.” http://lists.opennebula.org/pipermail/users-opennebula.org/2013-November/042795.html
but in my case ttylinux seems to be already using hda.

Any suggestions how to correct the problem on the command line?

[oneadmin@frontend ~]$ oneimage show 0
IMAGE 0 INFORMATION
ID             : 0
NAME           : ttylinux
USER           : oneadmin
GROUP          : oneadmin
DATASTORE      : default
TYPE           : OS
REGISTER TIME  : 07/13 22:06:17
PERSISTENT     : No
SOURCE         : /var/lib/one//datastores/1/3f6276af93e96904b2b11340b92db269
PATH           : http://marketplace.c12g.com/appliance/4fc76a938fb81d3517000003/download
FSTYPE         : raw
SIZE           : 200M
STATE          : used
RUNNING_VMS    : 1

PERMISSIONS
OWNER          : um-
GROUP          : ---
OTHER          : ---

IMAGE TEMPLATE
DEV_PREFIX="hd"

VIRTUAL MACHINES

    ID USER     GROUP    NAME            STAT UCPU    UMEM HOST             TIME
     0 oneadmin oneadmin ttylinux-0      runn  0.0    127M node1        0d 00h17
[oneadmin@frontend ~]$ onetemplate show 0
TEMPLATE 0 INFORMATION
ID             : 0
NAME           : ttylinux
USER           : oneadmin
GROUP          : oneadmin
REGISTER TIME  : 07/13 22:06:21

PERMISSIONS
OWNER          : um-
GROUP          : ---
OTHER          : ---

TEMPLATE CONTENTS
CONTEXT=[
  NETWORK="YES",
  SSH_PUBLIC_KEY="$USER[SSH_PUBLIC_KEY]" ]
CPU="1.0"
DISK=[
  IMAGE="ttylinux" ]
GRAPHICS=[
  LISTEN="0.0.0.0",
  TYPE="vnc" ]
MEMORY="127"
NIC=[
  NETWORK="private" ]
OS=[
  ARCH="x86_64" ]
VCPU="1"
[oneadmin@frontend ~]$ onevm show 0
VIRTUAL MACHINE 0 INFORMATION
ID                  : 0
NAME                : ttylinux-0
USER                : oneadmin
GROUP               : oneadmin
STATE               : ACTIVE
LCM_STATE           : RUNNING
RESCHED             : No
HOST                : node1
CLUSTER ID          : 0
CLUSTER             : default
START TIME          : 07/13 22:06:56
END TIME            : -
DEPLOY ID           : one-0

VIRTUAL MACHINE MONITORING
CPU                 : 1.0
MEMORY              : 127M
NETTX               : 0K
NETRX               : 43K
DISKRDBYTES         : 512
DISKRDIOPS          : 1
DISKWRBYTES         : 0
DISKWRIOPS          : 0

PERMISSIONS
OWNER               : um-
GROUP               : ---
OTHER               : ---

VM DISKS
 ID DATASTORE  TARGET IMAGE                               SIZE      TYPE SAVE
  0 default    hda    ttylinux                            24M/200M  file   NO
  1 -          hdb    CONTEXT                             1M/-      -       -

VM NICS
 ID NETWORK              BRIDGE       IP              MAC               PCI_ID
  0 private              br1          192.168.10.100  02:00:c0:a8:0a:64

SECURITY

NIC_ID NETWORK                   SECURITY_GROUPS
     0 private                   0

SECURITY GROUP   TYPE     PROTOCOL NETWORK                       RANGE
  ID NAME                          VNET START             SIZE
   0 default     OUTBOUND ALL
   0 default     INBOUND  ALL

VIRTUAL MACHINE HISTORY
SEQ UID  REQ   HOST         ACTION       DS           START        TIME     PROLOG
  0 -    -     node1        none          0  07/13 22:07:15   0d 00h17m   0h00m01s

VIRTUAL MACHINE TEMPLATE
AUTOMATIC_DS_REQUIREMENTS="\"CLUSTERS/ID\" @> 0"
AUTOMATIC_REQUIREMENTS="(CLUSTER_ID = 0) & !(PUBLIC_CLOUD = YES)"
CONTEXT=[
  DISK_ID="1",
  ETH0_CONTEXT_FORCE_IPV4="",
  ETH0_DNS="",
  ETH0_GATEWAY="",
  ETH0_GATEWAY6="",
  ETH0_IP="192.168.10.100",
  ETH0_IP6="",
  ETH0_IP6_PREFIX_LENGTH="",
  ETH0_IP6_ULA="",
  ETH0_MAC="02:00:c0:a8:0a:64",
  ETH0_MASK="",
  ETH0_MTU="",
  ETH0_NETWORK="",
  ETH0_SEARCH_DOMAIN="",
  ETH0_VLAN_ID="",
  ETH0_VROUTER_IP="",
  ETH0_VROUTER_IP6="",
  ETH0_VROUTER_MANAGEMENT="",
  NETWORK="YES",
  SSH_PUBLIC_KEY="",
  TARGET="hdb" ]
CPU="1"
GRAPHICS=[
  LISTEN="0.0.0.0",
  PORT="5900",
  TYPE="vnc" ]
MEMORY="127"
OS=[
  ARCH="x86_64" ]
TEMPLATE_ID="0"
VCPU="1"
VMID="0"

[root@node1 ~]# virsh dumpxml one-0
<domain type='kvm' id='1'>
  <name>one-0</name>
  <uuid>93106c8b-ff08-4c2a-91c0-911c41350159</uuid>
  <metadata/>
  <memory unit='KiB'>130048</memory>
  <currentMemory unit='KiB'>130048</currentMemory>
  <vcpu placement='static'>1</vcpu>
  <cputune>
    <shares>1024</shares>
  </cputune>
  <resource>
    <partition>/machine</partition>
  </resource>
  <os>
    <type arch='x86_64' machine='pc-i440fx-rhel7.0.0'>hvm</type>
    <boot dev='hd'/>
  </os>
  <features>
    <acpi/>
  </features>
  <clock offset='utc'/>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>destroy</on_crash>
  <devices>
    <emulator>/usr/libexec/qemu-kvm</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='none'/>
      <source file='/var/lib/one//datastores/0/0/disk.0'>
        <seclabel model='selinux' labelskip='yes'/>
      </source>
      <backingStore/>
      <target dev='hda' bus='ide'/>
      <alias name='ide0-0-0'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/var/lib/one//datastores/0/0/disk.1'>
        <seclabel model='selinux' labelskip='yes'/>
      </source>
      <backingStore/>
      <target dev='hdb' bus='ide'/>
      <readonly/>
      <alias name='ide0-0-1'/>
      <address type='drive' controller='0' bus='0' target='0' unit='1'/>
    </disk>
    <controller type='usb' index='0'>
      <alias name='usb'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
    </controller>
    <controller type='pci' index='0' model='pci-root'>
      <alias name='pci.0'/>
    </controller>
    <controller type='ide' index='0'>
      <alias name='ide'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
    </controller>
    <interface type='bridge'>
      <mac address='02:00:c0:a8:0a:64'/>
      <source bridge='br1'/>
      <target dev='one-0-0'/>
      <model type='rtl8139'/>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </interface>
    <input type='mouse' bus='ps2'>
      <alias name='input0'/>
    </input>
    <input type='keyboard' bus='ps2'>
      <alias name='input1'/>
    </input>
    <graphics type='vnc' port='5900' autoport='no' listen='0.0.0.0'>
      <listen type='address' address='0.0.0.0'/>
    </graphics>
    <video>
      <model type='cirrus' vram='16384' heads='1' primary='yes'/>
      <alias name='video0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </video>
    <memballoon model='virtio'>
      <alias name='balloon0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </memballoon>
  </devices>
  <seclabel type='dynamic' model='selinux' relabel='yes'>
    <label>system_u:system_r:svirt_t:s0:c983,c1012</label>
    <imagelabel>system_u:object_r:svirt_image_t:s0:c983,c1012</imagelabel>
  </seclabel>
  <seclabel type='dynamic' model='dac' relabel='yes'>
    <label>+9869:+9869</label>
    <imagelabel>+9869:+9869</imagelabel>
  </seclabel>

Can someone experienced look at that?
What is the expected way to start ttylinux on the command line?
Is it correct to specify --prefix hd for oneimage create?
Is it correct that onevm show shows hda as the VM DISK number 0?
Am I supposed to modify the context, which currently shows TARGET=“hdb” to TARGET=“hda”?

When trying to change the TARGET into hda in the context, starting from the state as in the above setup, I get:

[oneadmin@frontend ~]$ onevm recover --delete 0
[oneadmin@frontend ~]$ cat template.one
CONTEXT=[
  NETWORK="YES",
  SSH_PUBLIC_KEY="$USER[SSH_PUBLIC_KEY]",
  TARGET="hda" ]
CPU="1.0"
DISK=[
  IMAGE="ttylinux" ]
GRAPHICS=[
  LISTEN="0.0.0.0",
  TYPE="vnc" ]
MEMORY="127"
NIC=[
  NETWORK="private" ]
OS=[
  ARCH="x86_64" ]
VCPU="1"
[oneadmin@frontend ~]$ onetemplate update 0 template.one
[oneadmin@frontend ~]$ onetemplate instantiate ttylinux
[one.template.instantiate] Error allocating a new virtual machine template. Two disks have defined the same target hda

I’ll try to answer myself after comparing the working settings created using sunstone GUI to the CLI ones resulting in “Boot failed: not a bootable disk”.

Is it correct to specify --prefix hd for oneimage create?

apparently --prefix vd --driver qcow2 are needed for ttylinux:

oneimage create --name ttylinux --path http://marketplace.opennebula.systems/appliance/4fc76a938fb81d3517000003/download --datastore default --prefix vd --driver qcow2

Is it correct that onevm show shows hda as the VM DISK number 0?

no, it should use vda.

Am I supposed to modify the context, which currently shows TARGET="hdb" to TARGET="hda"?

with the above settings the context will have TARGET=“hda” set automatically.

A configuration that boots into ttylinux is shown below:

[oneadmin@frontend ~]$ oneimage show 0
IMAGE 0 INFORMATION                                                             
ID             : 0                   
NAME           : ttylinux            
USER           : oneadmin            
GROUP          : oneadmin            
DATASTORE      : default             
TYPE           : OS                  
REGISTER TIME  : 07/18 00:54:22      
PERSISTENT     : No                  
SOURCE         : /var/lib/one//datastores/1/a500f54ae7599176739b2164250abeb4
PATH           : http://marketplace.opennebula.systems/appliance/4fc76a938fb81d3517000003/download
FSTYPE         : qcow2               
SIZE           : 200M                
STATE          : used                
RUNNING_VMS    : 1                   

PERMISSIONS                                                                     
OWNER          : um-                 
GROUP          : ---                 
OTHER          : ---                 

IMAGE TEMPLATE                                                                  
DEV_PREFIX="vd"
DRIVER="qcow2"

VIRTUAL MACHINES

    ID USER     GROUP    NAME            STAT UCPU    UMEM HOST             TIME
     0 oneadmin oneadmin ttylinux-0      runn  1.0    127M node1        0d 00h05
[oneadmin@frontend ~]$ onetemplate show 0
TEMPLATE 0 INFORMATION                                                          
ID             : 0                   
NAME           : ttylinux            
USER           : oneadmin            
GROUP          : oneadmin            
REGISTER TIME  : 07/18 00:54:27      

PERMISSIONS                                                                     
OWNER          : um-                 
GROUP          : ---                 
OTHER          : ---                 

TEMPLATE CONTENTS                                                               
CONTEXT=[
  NETWORK="YES",
  SSH_PUBLIC_KEY="$USER[SSH_PUBLIC_KEY]" ]
CPU="1.0"
DISK=[
  IMAGE="ttylinux" ]
GRAPHICS=[
  LISTEN="0.0.0.0",
  TYPE="vnc" ]
MEMORY="127"
NIC=[
  NETWORK="private" ]
OS=[
  ARCH="x86_64" ]
VCPU="1"
[oneadmin@frontend ~]$ onevm show 0
VIRTUAL MACHINE 0 INFORMATION                                                   
ID                  : 0                   
NAME                : ttylinux-0          
USER                : oneadmin            
GROUP               : oneadmin            
STATE               : ACTIVE              
LCM_STATE           : RUNNING             
RESCHED             : No                  
HOST                : node1               
CLUSTER ID          : 0                   
CLUSTER             : default             
START TIME          : 07/18 00:55:01      
END TIME            : -                   
DEPLOY ID           : one-0               

VIRTUAL MACHINE MONITORING                                                      
CPU                 : 1.0                 
MEMORY              : 127M                
NETTX               : 0K                  
NETRX               : 9K                  
DISKRDBYTES         : 13878872            
DISKRDIOPS          : 992                 
DISKWRBYTES         : 328704              
DISKWRIOPS          : 97                  

PERMISSIONS                                                                     
OWNER               : um-                 
GROUP               : ---                 
OTHER               : ---                 

VM DISKS                                                                        
 ID DATASTORE  TARGET IMAGE                               SIZE      TYPE SAVE
  0 default    vda    ttylinux                            27M/200M  file   NO
  1 -          hda    CONTEXT                             1M/-      -       -

VM NICS                                                                         
 ID NETWORK              BRIDGE       IP              MAC               PCI_ID  
  0 private              br1          192.168.10.100  02:00:c0:a8:0a:64

SECURITY                                                                        

NIC_ID NETWORK                   SECURITY_GROUPS                                
     0 private                   0

SECURITY GROUP   TYPE     PROTOCOL NETWORK                       RANGE          
  ID NAME                          VNET START             SIZE                  
   0 default     OUTBOUND ALL
   0 default     INBOUND  ALL

VIRTUAL MACHINE HISTORY                                                         
SEQ UID  REQ   HOST         ACTION       DS           START        TIME     PROLOG
  0 -    -     node1        none          0  07/18 00:55:17   0d 00h04m   0h00m02s

VIRTUAL MACHINE TEMPLATE                                                        
AUTOMATIC_DS_REQUIREMENTS="\"CLUSTERS/ID\" @> 0"
AUTOMATIC_REQUIREMENTS="(CLUSTER_ID = 0) & !(PUBLIC_CLOUD = YES)"
CONTEXT=[
  DISK_ID="1",
  ETH0_CONTEXT_FORCE_IPV4="",
  ETH0_DNS="",
  ETH0_GATEWAY="",
  ETH0_GATEWAY6="",
  ETH0_IP="192.168.10.100",
  ETH0_IP6="",
  ETH0_IP6_PREFIX_LENGTH="",
  ETH0_IP6_ULA="",
  ETH0_MAC="02:00:c0:a8:0a:64",
  ETH0_MASK="",
  ETH0_MTU="",
  ETH0_NETWORK="",
  ETH0_SEARCH_DOMAIN="",
  ETH0_VLAN_ID="",
  ETH0_VROUTER_IP="",
  ETH0_VROUTER_IP6="",
  ETH0_VROUTER_MANAGEMENT="",
  NETWORK="YES",
  SSH_PUBLIC_KEY="",
  TARGET="hda" ]
CPU="1"
GRAPHICS=[
  LISTEN="0.0.0.0",
  PORT="5900",
  TYPE="vnc" ]
MEMORY="127"
OS=[
  ARCH="x86_64" ]
TEMPLATE_ID="0"
VCPU="1"
VMID="0"

[root@node1 ~]# virsh dumpxml one-0
<domain type='kvm' id='1'>
  <name>one-0</name>
  <uuid>5648fbd6-6f92-4c9a-b053-2f861c68ab50</uuid>
  <metadata/>
  <memory unit='KiB'>130048</memory>
  <currentMemory unit='KiB'>130048</currentMemory>
  <vcpu placement='static'>1</vcpu>
  <cputune>
    <shares>1024</shares>
  </cputune>
  <resource>
    <partition>/machine</partition>
  </resource>
  <os>
    <type arch='x86_64' machine='pc-i440fx-rhel7.0.0'>hvm</type>
    <boot dev='hd'/>
  </os>
  <features>
    <acpi/>
  </features>
  <clock offset='utc'/>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>destroy</on_crash>
  <devices>
    <emulator>/usr/libexec/qemu-kvm</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='none'/>
      <source file='/var/lib/one//datastores/0/0/disk.0'>
        <seclabel model='selinux' labelskip='yes'/>
      </source>
      <backingStore/>
      <target dev='vda' bus='virtio'/>
      <alias name='virtio-disk0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/var/lib/one//datastores/0/0/disk.1'>
        <seclabel model='selinux' labelskip='yes'/>
      </source>
      <backingStore/>
      <target dev='hda' bus='ide'/>
      <readonly/>
      <alias name='ide0-0-0'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>
    <controller type='usb' index='0'>
      <alias name='usb'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
    </controller>
    <controller type='pci' index='0' model='pci-root'>
      <alias name='pci.0'/>
    </controller>
    <controller type='ide' index='0'>
      <alias name='ide'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
    </controller>
    <interface type='bridge'>
      <mac address='02:00:c0:a8:0a:64'/>
      <source bridge='br1'/>
      <target dev='one-0-0'/>
      <model type='rtl8139'/>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </interface>
    <input type='mouse' bus='ps2'>
      <alias name='input0'/>
    </input>
    <input type='keyboard' bus='ps2'>
      <alias name='input1'/>
    </input>
    <graphics type='vnc' port='5900' autoport='no' listen='0.0.0.0'>
      <listen type='address' address='0.0.0.0'/>
    </graphics>
    <video>
      <model type='cirrus' vram='16384' heads='1' primary='yes'/>
      <alias name='video0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </video>
    <memballoon model='virtio'>
      <alias name='balloon0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </memballoon>
  </devices>
  <seclabel type='dynamic' model='selinux' relabel='yes'>
    <label>system_u:system_r:svirt_t:s0:c370,c597</label>
    <imagelabel>system_u:object_r:svirt_image_t:s0:c370,c597</imagelabel>
  </seclabel>
  <seclabel type='dynamic' model='dac' relabel='yes'>
    <label>+9869:+9869</label>
    <imagelabel>+9869:+9869</imagelabel>
  </seclabel>
</domain>

The networking is still not properly configured on ttylinux, but that’s another story.
# ifup eth0
eth0 is not a recognized interface