LXD: Problem with centos7 and centos6 appliances

Hello, we ran LXD n OpenNebula and downloaded some appliances from the marketplace. Compute nodes use Ubuntu 18.04.2 and ubuntu xenial container is working good. Problem is with:

  • centos 7 - no VNC, no ping
  • centos6 - no VNC, can ping, can ssh into it

How to debug these problems?

Thank you for the advice!

Could you clarify if the centos images are from the LXD or regular OpenNebula marketplaces ?

Regarding VNC

http://docs.opennebula.org/5.8/deployment/open_cloud_host_setup/lxd_driver.html#guest-issues

You can update the default VNC command action (login) to have a plain shell

http://docs.opennebula.org/5.8/deployment/open_cloud_host_setup/lxd_driver.html#configuration

The image is imported from the Sunstone App menu. It is an LXD image from Linux containers.

VNC is working now, I look on the network config, and looks like there is a problem with contextualization. There is interface eth0@if20 and context script counts with eth0, eth1…

EDIT: On centos 6 is interface named eth0@if22 and contextualization is working…

The eth0@number isn’t a problem, context was patched for that when LXD support was implemented.

I’m not able to reproduce the issue. I instantiated the VM template generated by root@ubuntu1804-lxd-marketplace-abb11-0:~# onemarketapp export 47 'centos7' -d 1.

Then added 2 NICs

root@ubuntu1804-lxd-marketplace-abb11-0:~# onevm show 49
VIRTUAL MACHINE 49 INFORMATION                                                  
ID                  : 49                  
NAME                : centos7-49          
USER                : oneadmin            
GROUP               : oneadmin            
STATE               : ACTIVE              
LCM_STATE           : RUNNING             
LOCK                : None                
RESCHED             : No                  
HOST                : ubuntu1804-lxd-marketplace-abb11-0.test
CLUSTER ID          : 0                   
CLUSTER             : default             
START TIME          : 07/11 19:43:51      
END TIME            : -                   
DEPLOY ID           : one-49              

VIRTUAL MACHINE MONITORING                                                      
CPU                 : 0.0                 
MEMORY              : 0K                  
NETTX               : 2K                  
NETRX               : 4K                  

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

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

VM NICS                                                                         
 ID NETWORK              BRIDGE       IP              MAC               PCI_ID  
  0 public               br0          192.168.150.100 02:00:c0:a8:96:64
  1 public               br0          192.168.150.101 02:00:c0:a8:96:65

SECURITY                                                                        

NIC_ID NETWORK                   SECURITY_GROUPS                                
     0 public                    0
     1 public                    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 -    -     ubuntu1804-l none          0  07/11 19:43:52   0d 00h02m   0h00m02s

USER TEMPLATE                                                                   
HYPERVISOR="lxd"
LXD_SECURITY_PRIVILEGED="true"

VIRTUAL MACHINE TEMPLATE                                                        
AUTOMATIC_DS_REQUIREMENTS="(\"CLUSTERS/ID\" @> 0)"
AUTOMATIC_NIC_REQUIREMENTS="(\"CLUSTERS/ID\" @> 0)"
AUTOMATIC_REQUIREMENTS="(CLUSTER_ID = 0) & !(PUBLIC_CLOUD = YES)"
CONTEXT=[
  DISK_ID="1",
  ETH0_CONTEXT_FORCE_IPV4="",
  ETH0_DNS="10.0.0.2",
  ETH0_EXTERNAL="",
  ETH0_GATEWAY="192.168.150.1",
  ETH0_GATEWAY6="",
  ETH0_IP="192.168.150.100",
  ETH0_IP6="",
  ETH0_IP6_PREFIX_LENGTH="",
  ETH0_IP6_ULA="",
  ETH0_MAC="02:00:c0:a8:96:64",
  ETH0_MASK="",
  ETH0_MTU="",
  ETH0_NETWORK="",
  ETH0_SEARCH_DOMAIN="",
  ETH0_VLAN_ID="",
  ETH0_VROUTER_IP="",
  ETH0_VROUTER_IP6="",
  ETH0_VROUTER_MANAGEMENT="",
  ETH1_CONTEXT_FORCE_IPV4="",
  ETH1_DNS="10.0.0.2",
  ETH1_EXTERNAL="",
  ETH1_GATEWAY="192.168.150.1",
  ETH1_GATEWAY6="",
  ETH1_IP="192.168.150.101",
  ETH1_IP6="",
  ETH1_IP6_PREFIX_LENGTH="",
  ETH1_IP6_ULA="",
  ETH1_MAC="02:00:c0:a8:96:65",
  ETH1_MASK="",
  ETH1_MTU="",
  ETH1_NETWORK="",
  ETH1_SEARCH_DOMAIN="",
  ETH1_VLAN_ID="",
  ETH1_VROUTER_IP="",
  ETH1_VROUTER_IP6="",
  ETH1_VROUTER_MANAGEMENT="",
  NETWORK="YES",
  SET_HOSTNAME="centos7-49",
  SSH_PUBLIC_KEY="ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCYz+lkZoNyspRhrtXDKFN3cIEwN3w08mz0YGKpVDIiV0+/vgG8dAUQ70Irs3m83W9BHN+vNjKPgKcF+X+sSfxniOtavahxGCRjAhhs1IVm196C5ODbSgXVUWULdtmMHelXbLBJ8X340h/UO+eQ6eRLaRfslXUsgRqremVcvCCPz4LIuRiliGWiELAmqYcY+1zJLeg3QV2Pgn5vschM9e/A4AseKO+HnbGB/I5tnoeZT/Gc3FGfUZLNFVB2XsVGAEEzkqO8VI2msB7MCAZBHffIK6WfLIYgGP6Ha2JT1NWJU7Ncj9Xuql0ElF01VwWMDWzqc0DOiVSsTL89ugJKU6+h one",
  TARGET="hdb" ]
CPU="1"
GRAPHICS=[
  LISTEN="0.0.0.0",
  PORT="5949",
  TYPE="vnc" ]
MEMORY="768"
TEMPLATE_ID="43"
TM_MAD_SYSTEM="qcow2"
VMID="49"

Network is fine

root@ubuntu1804-lxd-marketplace-abb11-0:~# lxc exec one-49 -- ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
113: eth0@if114: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 02:00:c0:a8:96:64 brd ff:ff:ff:ff:ff:ff link-netnsid 0
    inet 192.168.150.100/24 brd 192.168.150.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::c0ff:fea8:9664/64 scope link 
       valid_lft forever preferred_lft forever
115: eth1@if116: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 02:00:c0:a8:96:65 brd ff:ff:ff:ff:ff:ff link-netnsid 0
    inet 192.168.150.101/24 brd 192.168.150.255 scope global eth1
       valid_lft forever preferred_lft forever
    inet6 fe80::c0ff:fea8:9665/64 scope link 
       valid_lft forever preferred_lft forever