[one-users] Attach a console to kvm instance to debug network/boot issue

Gavin netmatters at gmail.com
Fri Aug 21 15:54:44 PDT 2009


Hi there,

My last OpenNebula installation was based on 1.2 and made use of the
xen hypervisor, this time I went for the 1.4 branch and the kvm
hypervisor on Ubuntu server 9.04 (64bit).

With xen from a node it was possible to console into a vm by typing
'xm console vmname', and as such it was possible to troubleshoot a
network/booting issue.

So my vm's are being successfully deployed, oned.log only shows me
success stories, 'Message received: DEPLOY SUCCESS 9 one-9' and so on.

The vm shows as running and onevm returns the monitoring info, ie:
cpu, memory, etc.

  ID     USER     NAME STAT CPU     MEM        HOSTNAME        TIME
   9 oneadmin     vm01 runn   0  262144          node01 00 00:20:09


The nodes have 2 nics/bridges, br0 (public) and br1 (private) and a
'brctl show' before vm deployed reports both bridges like this:-

bridge name	bridge id		STP enabled	interfaces
br0		8000.00221980d2f4	no		eth0
br1		8000.00221980d2f6	no		eth1


After installing kvm/libvirt however another bridge was added, virbr0:-

bridge name	bridge id		STP enabled	interfaces
br0		8000.00221980d2f4	no		eth0
br1		8000.00221980d2f6	no		eth1
virbr0		8000.000000000000	yes	

Now when I deploy a vm two new interfaces are created, vnet0 and
vnet1, which both get assigned to the relevant bridges:-

bridge name	bridge id		STP enabled	interfaces
br0		8000.00221980d2f4	no		eth0
							vnet0
br1		8000.00221980d2f6	no		eth1
							vnet1
virbr0		8000.000000000000	yes	

Previously with my xen installation I used the vmcontext.sh script at
vm boot to get the network 'up' and it worked very well, this time I
tried that with the kvm host and I'm not having the same luck.

I also tried the new CONTEXT parameter that creates the iso that gets
executed vi rc.local on the vm and that looks like an awesome
improvement but that also did not bring up the vm interfaces.

Basically I think that if I could attach a console to the now
'running' vm, or at least get a boot log of sorts I would be able to
see what exactly is not allowing me to see this vm on the network.

I've tried adding some xml to the RAW parameter in the template as per
the docs but no matter what I put there, it never seems to make it to
the running vm.

If I check the 'qemu' logs for the vm it shows 'serial -none' no
matter what I put into the RAW parameter.

Has anyone else had to console onto a kvm vm created by OpenNebula ???

If you have I would really like to hear how you did it as I have
searched, and searched, and tried various different methods and am now
emailing this list in the hope that someone else can point me in the
right direction.

Thanks and Regards,
Gavin



More information about the Users mailing list