[one-users] Fail to create my own ubuntu vm

任英杰 renyj at neusoft.com
Thu Aug 23 16:41:57 PDT 2012


hi,
A problem confused me for a month and I still can't solve it.
Configuration:
Opennebula 3.2.1,
Host OS 12.04
I install front-end and hosts from ubuntu's official source. And I test 
the iaas infursturcture
by ttylinux, which works fine. I built a ubuntu9.04 image, and modify 
the configuration from opennebula3.2.1 source code. I create the vm . 
The vm's status is running, and no error outputs.  However I can't ping 
/ssh it.
Anyone can help me?

Before creating vm, I prepared config file and init.sh copied from the 
source code of same version.
I modified the rc.local in vm.
#!/bin/sh -e
mount -t iso9660 /dev/sdc /mnt
if [ -f /mnt/context.sh ]; then
. /mnt/init.sh
fi
umount /mnt
exit 0
BTW: My image has two disks: /sda1 is root system,  another is swap.

$onevm create ubunut9.one
*Here is ubunut9.one:*
NAME   = Ubuntu9
CPU    = 0.5
MEMORY = 1024
OS=[arch="x86_64"]

DISK   = [
   source   = "/fs1/ubu.img",
   target   = "sda",
   readonly = "no" ]
NIC    = [ NETWORK = "Small network" ]

FEATURES=[ acpi="no" ]
RAW = [ type = "kvm", data = " <serial type='pty'> <source 
path='/dev/pts/3'/> <target port='1'/> </serial>" ]

CONTEXT = [
   hostname   = "$NAME",
     #ip_public = "$NIC[IP, NETWORK=\"Red Virtual\"]",
     ip_public = "192.168.161.9",
     files    = "/fs1/init.sh",
         target     = "sdc"
     #root_pubkey = "id_dsa.pub",
     #username = "oneadmin",
     #user_pubkey = "id_dsa.pub"
]

Here is details of vm:
oneadmin at lab175:/fs1$ onevm show 5
VIRTUAL MACHINE 5 INFORMATION
ID                  : 5
NAME                : Ubuntu9
USER                : oneadmin
GROUP               : oneadmin
STATE               : ACTIVE
LCM_STATE           : RUNNING
HOSTNAME            : lab176
START TIME          : 08/23 14:03:07
END TIME            : -
DEPLOY ID           : one-5

VIRTUAL MACHINE MONITORING
USED MEMORY         : 1048576
USED CPU            : 0
NET_TX              : 1748
NET_RX              : 4426449

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

VIRTUAL MACHINE TEMPLATE
CONTEXT=[
   FILES=/fs1/init.sh,
   HOSTNAME=Ubuntu12s,
   IP_PUBLIC=192.168.161.9,
   TARGET=sdc ]
CPU=0.5
DISK=[
   DISK_ID=0,
   READONLY=no,
   SOURCE=/fs1/ubu.img,
   TARGET=sda ]
FEATURES=[
   ACPI=no ]
MEMORY=1024
NAME=Ubuntu12s
NIC=[
   BRIDGE=br0,
   IP=192.168.161.186,
   MAC=02:00:c0:a8:a1:ba,
   NETWORK="Small network",
   NETWORK_ID=0,
   VLAN=NO ]
OS=[
   ARCH=x86_64 ]
RAW=[
   DATA=" <serial type='pty'> <source path='/dev/pts/3'/> <target 
port='1'/> </serial>",
   TYPE=kvm ]
VMID=5

VIRTUAL MACHINE HISTORY
  SEQ        HOSTNAME REASON           START        TIME       PTIME
    0          lab176   none  08/23 14:03:08 00 10:31:23 00 00:03:05
---------------------------------------------------------------------------------------------------
Confidentiality Notice: The information contained in this e-mail and any accompanying attachment(s) 
is intended only for the use of the intended recipient and may be confidential and/or privileged of 
Neusoft Corporation, its subsidiaries and/or its affiliates. If any reader of this communication is 
not the intended recipient, unauthorized use, forwarding, printing,  storing, disclosure or copying 
is strictly prohibited, and may be unlawful.If you have received this communication in error,please 
immediately notify the sender by return e-mail, and delete the original message and all copies from 
your system. Thank you. 
---------------------------------------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20120824/0fb55009/attachment-0002.htm>


More information about the Users mailing list