[one-users] How to access VMs?

Carlos Martín Sánchez cmartin at opennebula.org
Wed Feb 1 02:53:35 PST 2012


Hi,

As you can read in the contextualization guide [1], there are two "levels"
of contextualization:
- The networking contextualization, to set the IP leased by OpenNebula from
the MAC.
- And the generic contextualization, that's what the init.sh script is for.

The init.sh script is just an example of the kind of contextualization you
can perform, and you should customize that to your needs. You don't need to
create new users, or copy any keys if you don't need to. The whole CONTEXT
section is optional, the only requirement is to setup the IP from the VM's
MAC.

About your networking problem, looks like you are trying to access your
VM's IP, but the GRAPHICS attribute creates a VNC server in your Host, not
your VM.

Regards.

[1] http://opennebula.org/documentation:rel3.2:cong
--
Carlos Martín, MSc
Project Engineer
OpenNebula - The Open Source Toolkit for Data Center Virtualization
www.OpenNebula.org | cmartin at opennebula.org |
@OpenNebula<http://twitter.com/opennebula><cmartin at opennebula.org>


On Thu, Jan 19, 2012 at 12:09 PM, Mohit Dhingra <mohitdhingras at gmail.com>wrote:

> *Hi All,*
>
> I checked for online documentation for ssh configuration as well. I am not
> clear with few things. Can somebody please explain..
>
> I downloaded ttylinux (sample template). I modified my own template file
> according to it.
>
> As I could figure out from the init.sh file, it configures the VM's ip
> address, netmask etc.
> So, I provided the IP address in IP_PUBLIC Variable in Context in VM
> Template file.
>
> And then, it copies root rsa public key to root's authorized keys. ( Is it
> VM's root ?  Which public key path should I give here? My Host's root
> public key ? This is for ssh without password between ? )
>
> After that, it creates one more user and does the same procedure for
> created user. (Same question. Which rsa public key should I give here?
> oneadmin's public key, that I generated in /srv/cloud/one/.ssh ? I have
> already added that in oneadmin's /srv/cloud/one/.ssh/authorized_keys )
>
> By using attached template files, I am able to create VMs, and in running
> state as well, but I am not able to connect through VNC or ssh, or ping
> itself.
>
> oneadmin at cadlab:~/Templates/vm_templates> vncviewer 10.112.10.54::5904
>
> vncviewer: ConnectToTcpAddr: connect: No route to host
> Unable to connect to VNC server
>
> Any help would be grateful :-)
>
>
> *----------------------------
> **Thanks & Regards
> Mohit Dhingra
> +919611190435*
>
>
> On 18 January 2012 21:59, Mohit Dhingra <mohitdhingras at gmail.com> wrote:
>
>> *Hi All,
>>
>> *I have been able to create host, vnet and VM, using CLI using attached
>> template files. But I don't know how to access VMs.
>>
>> I tried pinging ip address assigned to VM - 10.112.10.52. But, was not
>> able to get any reply.
>> Then I tried using vncviewer.
>>
>> oneadmin at cadlab:~/Templates/vm_templates/Used> vncviewer 10.112.10.52
>> vncviewer: ConnectToTcpAddr: connect: No route to host
>> Unable to connect to VNC server
>>
>>
>> oneadmin at cadlab:~/Templates/vm_templates/Used> onehost list
>>   ID NAME               RVM   TCPU   FCPU   ACPU   TMEM   FMEM   AMEM
>> STAT
>>    0 cadlab               2    800    795    600     8G   3.4G     4G
>> on
>>
>> oneadmin at cadlab:~/Templates/vm_templates/Used> onevm list
>>     ID USER     GROUP    NAME         STAT CPU     MEM
>> HOSTNAME        TIME
>>      0 oneadmin oneadmin SUSEVM-2     runn   0      2G          cadlab 00
>> 07:21:04
>>      1 oneadmin oneadmin SUSEVM-2     runn   0      2G          cadlab 00
>> 02:34:05
>>
>> oneadmin at cadlab:~/Templates/vm_templates/Used> onevnet list
>>   ID USER     GROUP    NAME              TYPE BRIDGE  LEASES
>>    0 oneadmin oneadmin Public               F   eth0       2
>>
>> oneadmin at cadlab:~/Templates/vm_templates/Used> onevm show 1
>> VIRTUAL MACHINE 1
>> INFORMATION
>> ID                  : 1
>> NAME                : SUSEVM-2
>> USER                : oneadmin
>> GROUP               : oneadmin
>> STATE               : ACTIVE
>> LCM_STATE           : RUNNING
>> HOSTNAME            : cadlab
>> START TIME          : 01/18 19:24:13
>> END TIME            : -
>> DEPLOY ID           : one-1
>>
>> VIRTUAL MACHINE
>> MONITORING
>> NET_TX              : 3
>> NET_RX              : 0
>> USED MEMORY         : 2097152
>> USED CPU            : 0
>>
>> PERMISSIONS
>>
>> OWNER               : um-
>> GROUP               : ---
>> OTHER               : ---
>>
>> VIRTUAL MACHINE
>> TEMPLATE
>> CONTEXT=[
>>   HOSTNAME=SUSEVM-2,
>>   TARGET=hdb ]
>> CPU=1
>> DISK=[
>>   CLONE=YES,
>>   DISK_ID=0,
>>   IMAGE="SUSE 11.4",
>>   IMAGE_ID=0,
>>   READONLY=NO,
>>   SAVE=NO,
>>   SOURCE=/srv/cloud_3_2/one/var/images/ce4d6171723f9b1d0b0b49bafde1133e,
>>   TARGET=hda,
>>   TYPE=DISK ]
>> FEATURES=[
>>   ACPI=no ]
>> GRAPHICS=[
>>   LISTEN=0.0.0.0,
>>   PORT=5902,
>>   TYPE=vnc ]
>> MEMORY=2048
>> NAME=one-1
>> NIC=[
>>   BRIDGE=eth0,
>>   IP=10.112.10.52,
>>   MAC=02:00:0a:70:0a:34,
>>   NETWORK=Public,
>>   NETWORK_ID=0,
>>   VLAN=NO ]
>> OS=[
>>   INITRD=/boot/initrd-xen,
>>   KERNEL=/boot/vmlinuz-xen,
>>   KERNEL_CMD="xencons=tty console=tty1",
>>   ROOT=xvda2 ]
>> VMID=1
>>
>> Am I doing something wrong?
>>
>> *
>> **
>> ----------------------------
>> Thanks & Regards
>> Mohit Dhingra
>> +919611190435*
>>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opennebula.org
> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20120201/5a79dfff/attachment-0002.htm>


More information about the Users mailing list