Log in Virtual Machines created from MarketPlace on Sunstone

Hi everyone. I managed to install opennebula in a single server(frontend and nodes) following this tutorial: http://docs.opennebula.org/4.6/design_and_installation/quick_starts/qs_ubuntu_kvm.html#running-a-virtual-machine. I’m able to create images and templates, and instantiates them on virtual machines, however I’m not able to log in them. I was asked for user and password when I opened VNC windows, any help would be appreciated.

Thanks in advance

hi Eduardo,

when you mention: I’m not able to log in to them - you probably mean logging in with SSH, right ?
It sounds like you have not added a network to your setup, you can use the standard libvirt virbr0 network (, that you probably already have, and make sure to define the IPs and network in opennebula (add virtual network).
But I could be completely misunderstanding you - hope this helps!

I had problems with Ubuntu14 KVM store. The solution to my case was export my SSH public key of my oneadmin user, the frontend machine, and after that I could log in without a password. After all, from what I understand this Store template (Ubuntu14 KVM) does not come with username and password … Good luck.

Hi Roland, thank for your response. Yes, I meant logging with ssh. I followed the quick tutorial of opennebula as I mentioned in the initial post. In part 3.2 of this tutorial(Adding virtual resources), I create a file called mynetwork.one, following the indications, but I changed the “leases” for my free ip address. Additionally I copy my ssh key, as they mentioned. Maybe you could indicate if the file mynetwork.one was created in a bad way, or you could indicate how to create this file successfully.

Thanks for your help.

Hi cesar, I’m in the same situation. I export my ssh key too, but I think my network configuration is failing. If you have some recommendations or tutorials about how to configure my network correctly, I’d really appreciate it.

hi Eduardo,

could you please post here a copy of the tab called “log” of a VM ? So just deploy a VM, then select it, and post the text of the tab called log. We should be able to tell what doesn/doesn’t get loaded, so we should be able to see if your VM gets a network or not.

If you can, please also log in as oneadmin to your host, and show the output of “onevnet list”,
and the the output of whatever number of networks you have, like “onevnet show 0/1/2”.

Using SSH key adding to VMs automatically is done using contextualization, for that you need the contextualization part configured correctly, that’s for later.

Hi. In time to configure your network the first thing is to configure the bridge properly. After this is set following their DHCP parameters. So must inform DNS, gateway, correct mask. I had problem with gateway because I had to set it manually because the default is end .1 and mine is .254. Remember to use a scope that is not being offered by DHCP. After setting all ping tests with to see if the communication is OK. Good job.


3.2. Adding virtual resources
Once it’s working you need to create a network, an image and a virtual machine template.
To create networks, we need to create first a network template file mynetwork.one that contains:
NAME = "private"

BRIDGE = br0

LEASES = [ IP= ]
LEASES = [ IP= ]
LEASES = [ IP= ]

You should already have a default network created by libvirt, on interface virbr0.
You can use that to give IPs to your VMs, and it already has a NAT rule, so all VMs have access to internet.
In Sunstone, create a new network (click +) and use these details:

  • name: whateveryouwant
  • description: whateveryouwant
  • bridge: virbr0
  • network model: ebtables
  • filter mac spoofing: yes
  • filter IP spoofing: yes
  • vlan: no
  • ip start:
  • size: 252

This should give you a working network in opennebula, that you can use in your templates.
Since you are using a single machine anyway, this should work. If you get another node or server, dont use it this way.

Hi Roland. Thanks for the advice. Tomorrow I’ll go in the laboratory, and I will be able to put in practice your recommendations, I hope it works!!

Hi Roland,

What about contextualization?? In my template I encountered ssh and network contextualization boxes, both are checked. In ssh’s textbox, I put the public key of oneadmin user, but I still can’t connect to the machine.

UPDATE: Finally I can connect to my virtual machine via ssh, and VNC in sunstone, but the bad news is that I don’t have connection to Internet, I’m in the network, because I can connect with wathever machine in the network. Well I suppose I’ll deal with it, Thanks for your replies.

hi Eduardo,

did you install the contextualization package for the OS? It needs some scripts to import the settings from opennebula:


Regarding network; the default libvirt with virbr0 should enable you to reach internet thru NAT, with gateway, maybe that’s missing ?

Hi Roland. I have the network configuration mentioned in the quick tutorial, and the configuration of my bridge is this:

interfaces(5) file used by ifup(8) and ifdown(8)

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet manual

auto br0
iface br0 inet static
bridge_ports eth0
bridge_fd 9
bridge_hello 2
bridge_maxage 12
bridge_stp off

The output of ifconfig command en in the Virtual machine is this:

eth0 Link encap:Ethernet HWaddr 02:00:c0:a8:34:9c
inet addr: Bcast: Mask:
inet6 addr: 2001:1388:b4b:f401:0:c0ff:fea8:349c/64 Scope:Global
inet6 addr: 2001:1388:b4b:f401:cc21:843b:7b8b:579d/64 Scope:Global
inet6 addr: fe80::c0ff:fea8:349c/64 Scope:Link
RX packets:329920 errors:0 dropped:30498 overruns:0 frame:0
TX packets:1129 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:25726121 (25.7 MB) TX bytes:153314 (153.3 KB)

lo Link encap:Local Loopback
inet addr: Mask:
RX packets:196 errors:0 dropped:0 overruns:0 frame:0
TX packets:196 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:15640 (15.6 KB) TX bytes:15640 (15.6 KB)

and the file /etc/network/interfaces in the virtual machine too:

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static

source /etc/network/interfaces.d/*.cfg

Furthermore, I installed the .deb package for contextualization in mi native host. Could you give some advice?

PD: I try to configure the network in the way you mentioned yesterday, but I don’t have all of the options that you mention and the configuration doesn’t work.

Thanks for you reply.

This should be installed in the virtual machines that you deploy, not on the hosts.
Setting up the virtual network, with the settings I posted earlier is done in Sunstone. Just go to
Infrastructure > virtual networks > click on the green + and use the settings I posted earlier.

Then deploy a VM, make sure you install the context .deb first and then adjust the template so it will get an IP/netmask/gateway from the virtual network.