Sample of /etc/openstack-dashboard/local_settings

March 14, 2014

[root@dfw02 ~(keystone_admin)]$ cat  /etc/openstack-dashboard/local_settings | grep -v ^# | grep -v ^$
import os
from django.utils.translation import ugettext_lazy as _
from openstack_dashboard import exceptions
DEBUG = False
TEMPLATE_DEBUG = DEBUG
ALLOWED_HOSTS = ['192.168.1.127', 'localhost']
SESSION_ENGINE = “django.contrib.sessions.backends.cached_db”
DATABASES = {
‘default’: {
‘ENGINE’: ‘django.db.backends.mysql’,
‘NAME’: ‘dash’,
‘USER’: ‘dash’,
‘PASSWORD’: ‘fedora’,
‘HOST’: ’192.168.1.127′,
‘default-character-set’: ‘utf8′
}
}

HORIZON_CONFIG = {
‘dashboards’: (‘project’, ‘admin’, ‘settings’,),
‘default_dashboard’: ‘project’,
‘user_home’: ‘openstack_dashboard.views.get_user_home’,
‘ajax_queue_limit’: 10,
‘auto_fade_alerts’: {
‘delay’: 3000,
‘fade_duration’: 1500,
‘types’: ['alert-success', 'alert-info']
},

‘help_url’: “http://docs.openstack.org”,

‘exceptions’: {‘recoverable’: exceptions.RECOVERABLE,
‘not_found’: exceptions.NOT_FOUND,
‘unauthorized’: exceptions.UNAUTHORIZED},
}

from horizon.utils import secret_key

LOCAL_PATH = ‘/var/lib/openstack-dashboard’
SECRET_KEY = secret_key.generate_or_read_from_file(os.path.join(LOCAL_PATH, ‘.secret_key_store’))

CACHES = {
‘default’: {
‘BACKEND’ : ‘django.core.cache.backends.memcached.MemcachedCache’,
‘LOCATION’ : ’127.0.0.1:11211′,
}
}

EMAIL_BACKEND = ‘django.core.mail.backends.console.EmailBackend’

OPENSTACK_HOST = “192.168.1.127″

OPENSTACK_KEYSTONE_URL = “http://%s:5000/v2.0″ % OPENSTACK_HOST

OPENSTACK_KEYSTONE_DEFAULT_ROLE = “Member”
OPENSTACK_KEYSTONE_BACKEND = {
‘name’: ‘native’,
‘can_edit_user’: True,
‘can_edit_group’: True,
‘can_edit_project’: True,
‘can_edit_domain’: True,
‘can_edit_role’: True
}

OPENSTACK_HYPERVISOR_FEATURES = {
‘can_set_mount_point’: False,
# NOTE: as of Grizzly this is not yet supported in Nova so enabling this
# setting will not do anything useful
‘can_encrypt_volumes’: False
}

OPENSTACK_NEUTRON_NETWORK = {
‘enable_lb’: False,
‘enable_firewall’: False,
‘enable_quotas’: True,
‘enable_vpn’: False,
# The profile_support option is used to detect if an external router can be
# configured via the dashboard. When using specific plugins the
# profile_support can be turned on if needed.
‘profile_support’: None,
#’profile_support’: ‘cisco’,
}
API_RESULT_LIMIT = 1000
API_RESULT_PAGE_SIZE = 20
TIME_ZONE = “UTC”
POLICY_FILES_PATH = ‘/etc/openstack-dashboard’
POLICY_FILES = {
‘identity’: ‘keystone_policy.json’,
‘compute’: ‘nova_policy.json’
}

LOGGING = {
‘version’: 1,
# When set to True this will disable all logging except
# for loggers specified in this configuration dictionary. Note that
# if nothing is specified here and disable_existing_loggers is True,
# django.db.backends will still log unless it is disabled explicitly.
‘disable_existing_loggers’: False,

‘handlers’: {
‘null’: {
‘level’: ‘DEBUG’,
‘class’: ‘django.utils.log.NullHandler’,
},

‘console’: {
# Set the level to “DEBUG” for verbose output logging.
‘level’: ‘INFO’,
‘class’: ‘logging.StreamHandler’,
},

‘loggers’: {

# Logging from django.db.backends is VERY verbose, send to null
# by default.
‘django.db.backends’: {
‘handlers’: ['null'],
‘propagate’: False,
},

‘requests’: {
‘handlers’: ['null'],
‘propagate’: False,
},

‘horizon’: {
‘handlers’: ['console'],
‘level’: ‘DEBUG’,
‘propagate’: False,
},

‘openstack_dashboard’: {
‘handlers’: ['console'],
‘level’: ‘DEBUG’,
‘propagate’: False,
},

‘novaclient’: {
‘handlers’: ['console'],
‘level’: ‘DEBUG’,
‘propagate’: False,
},

‘cinderclient’: {
‘handlers’: ['console'],
‘level’: ‘DEBUG’,
‘propagate’: False,
},

‘keystoneclient’: {
‘handlers’: ['console'],
‘level’: ‘DEBUG’,
‘propagate’: False,
},

‘glanceclient’: {
‘handlers’: ['console'],
‘level’: ‘DEBUG’,
‘propagate’: False,
},

‘neutronclient’: {
‘handlers’: ['console'],
‘level’: ‘DEBUG’,
‘propagate’: False,
},

‘heatclient’: {
‘handlers’: ['console'],
‘level’: ‘DEBUG’,
‘propagate’: False,
},

‘ceilometerclient’: {
‘handlers’: ['console'],
‘level’: ‘DEBUG’,
‘propagate’: False,
},

‘troveclient’: {
‘handlers’: ['console'],
‘level’: ‘DEBUG’,
‘propagate’: False,
},

‘swiftclient’: {
‘handlers’: ['console'],
‘level’: ‘DEBUG’,
‘propagate’: False,
},

‘openstack_auth’: {
‘handlers’: ['console'],
‘level’: ‘DEBUG’,
‘propagate’: False,
},

‘nose.plugins.manager’: {
‘handlers’: ['console'],
‘level’: ‘DEBUG’,
‘propagate’: False,
},

‘django’: {
‘handlers’: ['console'],
‘level’: ‘DEBUG’,
‘propagate’: False,
},

‘iso8601′: {
‘handlers’: ['null'],
‘propagate’: False,
},

}

}

SECURITY_GROUP_RULES = {
‘all_tcp’: {
‘name’: ‘ALL TCP’,
‘ip_protocol’: ‘tcp’,
‘from_port’: ’1′,
‘to_port’: ’65535′,
},

‘all_udp’: {
‘name’: ‘ALL UDP’,
‘ip_protocol’: ‘udp’,
‘from_port’: ’1′,
‘to_port’: ’65535′,
},

‘all_icmp’: {
‘name’: ‘ALL ICMP’,
‘ip_protocol’: ‘icmp’,
‘from_port’: ‘-1′,
‘to_port’: ‘-1′,
},

‘ssh’: {
‘name’: ‘SSH’,
‘ip_protocol’: ‘tcp’,
‘from_port’: ’22′,
‘to_port’: ’22′,
},

‘smtp’: {
‘name’: ‘SMTP’,
‘ip_protocol’: ‘tcp’,
‘from_port’: ’25′,
‘to_port’: ’25′,
},

‘dns’: {
‘name’: ‘DNS’,
‘ip_protocol’: ‘tcp’,
‘from_port’: ’53′,
‘to_port’: ’53′,
},

‘http’: {
‘name’: ‘HTTP’,
‘ip_protocol’: ‘tcp’,
‘from_port’: ’80′,
‘to_port’: ’80′,
},

‘pop3′: {
‘name’: ‘POP3′,
‘ip_protocol’: ‘tcp’,
‘from_port’: ’110′,
‘to_port’: ’110′,
},

‘imap’: {
‘name’: ‘IMAP’,
‘ip_protocol’: ‘tcp’,
‘from_port’: ’143′,
‘to_port’: ’143′,
},

‘ldap’: {
‘name’: ‘LDAP’,
‘ip_protocol’: ‘tcp’,
‘from_port’: ’389′,
‘to_port’: ’389′,
},

‘https’: {
‘name’: ‘HTTPS’,
‘ip_protocol’: ‘tcp’,
‘from_port’: ’443′,
‘to_port’: ’443′,
},

‘smtps’: {
‘name’: ‘SMTPS’,
‘ip_protocol’: ‘tcp’,
‘from_port’: ’465′,
‘to_port’: ’465′,
},

‘imaps’: {
‘name’: ‘IMAPS’,
‘ip_protocol’: ‘tcp’,
‘from_port’: ’993′,
‘to_port’: ’993′,
},

‘pop3s’: {
‘name’: ‘POP3S’,
‘ip_protocol’: ‘tcp’,
‘from_port’: ’995′,
‘to_port’: ’995′,
},

‘ms_sql’: {
‘name’: ‘MS SQL’,
‘ip_protocol’: ‘tcp’,
‘from_port’: ’1433′,
‘to_port’: ’1433′,
},

‘mysql’: {
‘name’: ‘MYSQL’,
‘ip_protocol’: ‘tcp’,
‘from_port’: ’3306′,
‘to_port’: ’3306′,
},

‘rdp’: {
‘name’: ‘RDP’,
‘ip_protocol’: ‘tcp’,
‘from_port’: ’3389′,
‘to_port’: ’3389′,
},

}


Surfing Internet & SSH connectoin on (to) cloud instance of Fedora 20 via Neutron GRE

February 4, 2014

When you meet the first time with GRE tunnelling you have to understand that GRE encapsulation requires 24 bytes and a lot of problems raise up , view http://www.cisco.com/en/US/tech/tk827/tk369/technologies_tech_note09186a0080093f1f.shtml

In particular,  Two Node (Controller+Compute) RDO Havana cluster on Fedora 20 hosts been built by myself per guidelines from http://kashyapc.wordpress.com/2013/11/23/neutron-configs-for-a-two-node-openstack-havana-setup-on-fedora-20/ was Neutron GRE  cluster. Hence, for any instance has been setup (Fedora or Ubuntu) problem with network communication raises up immediately. apt-get update just refuse to work on Ubuntu Salamander Server instance (default MTU value for Ethernet interface is 1500).

Light weight X windows environment also has been setup on Fedora 20 cloud instance (fluxbox) for quick Internet access.

Solution is simple to  set MTU to 1400 only on any cloud instance.

Place in /etc/rd.d/rc.local (or /etc/rc.local for Ubuntu Server) :-

#!/bin/sh
ifconfig eth0 mtu 1400 up ;
exit 0

At least in meantime I don’t see problems with LAN and routing to  Internet (via simple  DLINK router) on cloud instances F19,F20,Ubuntu 13.10 Server and LAN’s hosts.

For better understanding what is all about please view http://bderzhavets.blogspot.com/2014/01/setting-up-two-physical-node-openstack.html  [1].

Load instance via :

[root@dfw02 ~(keystone_admin)]$ nova boot –flavor 2  –user-data=./myfile.txt  –block_device_mapping vda=3cb671c2-06d8-4b3a-aca6-476b66fb309a:::0 VMF20RS

where

[root@dfw02 ~(keystone_admin)]$ cinder list
+————————————–+——–+————–+——+————-+———-+————————————–+
|                  ID                  | Status | Display Name | Size | Volume Type | Bootable |             Attached to              |
+————————————–+——–+————–+——+————-+———-+————————————–+
| 3cb671c2-06d8-4b3a-aca6-476b66fb309a | available | Fedora20VOL   |  9   |     None    |   true   |                                                                                           |
| 49d5b872-3720-4915-ad1e-ec428e956558 | in-use |   VF20VOL    |  9   |     None    |   true   | 0e0b4f69-4cff-4423-ba9d-71c8eb53af16 |
| b4831720-941f-41a7-b747-1810df49b261 | in-use | UbuntuSALVG  |  7   |     None    |   true   | 5d750d44-0cad-4a02-8432-0ee10e988b2c |
+————————————–+——–+————–+——+————-+———-+————————————–+

and

[root@dfw02 ~(keystone_admin)]$ cat myfile.txt

#cloud-config
password: mysecret
chpasswd: { expire: False }
ssh_pwauth: True

Then
[root@dfw02 ~(keystone_admin)]$ nova list

+————————————–+—————+———–+————+————-+—————————–+
| ID                                   | Name          | Status    | Task State | Power State | Networks                    |
+————————————–+—————+———–+————+————-+—————————–+
| 964fd0b0-b331-4b0c-a1d5-118bf8a40abf | CentOS6.5     | SUSPENDED | None       | Shutdown    | int=10.0.0.5, 192.168.1.105 |
| 3f2db906-567c-48b0-967e-799b2bffe277 | Cirros312     | SUSPENDED | None       | Shutdown    | int=10.0.0.2, 192.168.1.101 |
| 5d750d44-0cad-4a02-8432-0ee10e988b2c | UbuntuSaucySL | SUSPENDED | None       | Shutdown    | int=10.0.0.8, 192.168.1.112 |
| 0e0b4f69-4cff-4423-ba9d-71c8eb53af16 | VF20KVM       | SUSPENDED | None       | Shutdown    | int=10.0.0.7, 192.168.1.109 |
| 10306d33-9684-4dab-a017-266fb9ab496a | VMF20RS       | ACTIVE  | None       | Running   | int=10.0.0.4                                  |
+————————————–+—————+———–+————+————-+—————————–+

[root@dfw02 ~(keystone_admin)]$ neutron port-list –device-id 10306d33-9684-4dab-a017-266fb9ab496a

+————————————–+——+——————-+———————————————————————————+
| id                                   | name | mac_address       | fixed_ips                                                                       |
+————————————–+——+——————-+———————————————————————————+
| fa982101-e2d9-4d21-be9d-7d485c792ce1 |      | fa:16:3e:57:e2:67 | {“subnet_id”: “fa930cea-3d51-4cbe-a305-579f12aa53c0″, “ip_address”: “10.0.0.4″} |
+————————————–+——+——————-+——————————————————————————–

[root@dfw02 ~(keystone_admin)]$ neutron floatingip-create ext

Created a new floatingip:
+———————+————————————–+
| Field               | Value                                |
+———————+————————————–+
| fixed_ip_address    |                                      |
| floating_ip_address | 192.168.1.115                        |
| floating_network_id | 780ce2f3-2e6e-4881-bbac-857813f9a8e0 |
| id                  | d9f1b47d-c4b1-4865-92d2-c1d9964a35fb |
| port_id             |                                      |
| router_id           |                                      |
| tenant_id           | d0a0acfdb62b4cc8a2bfa8d6a08bb62f     |
+———————+————————————–+

[root@dfw02 ~(keystone_admin)]$  neutron floatingip-associate d9f1b47d-c4b1-4865-92d2-c1d9964a35fb fa982101-e2d9-4d21-be9d-7d485c792ce1

[root@dfw02 ~(keystone_admin)]$ ping  192.168.1.115

Connect via virt-manager to Compute from Controller and log into text mode console as “fedora” with known password “mysecret”.  Set MTU to 1400  , create new sudoer user, then reboot instance. Now ssh from Controller works in traditional way :

[root@dfw02 ~(keystone_admin)]$ nova list | grep VMF20RS
| 10306d33-9684-4dab-a017-266fb9ab496a | VMF20RS       | SUSPENDED | resuming   | Shutdown    | int=10.0.0.4, 192.168.1.115 |

[root@dfw02 ~(keystone_admin)]$ nova list | grep VMF20RS

| 10306d33-9684-4dab-a017-266fb9ab496a | VMF20RS       | ACTIVE    | None       | Running     | int=10.0.0.4, 192.168.1.115 |

[root@dfw02 ~(keystone_admin)]$ ssh root@192.168.1.115

root@192.168.1.115′s password:
Last login: Sat Feb  1 12:32:12 2014 from 192.168.1.127
[root@vmf20rs ~]# uname -a
Linux vmf20rs.novalocal 3.12.8-300.fc20.x86_64 #1 SMP Thu Jan 16 01:07:50 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

[root@vmf20rs ~]# ifconfig
eth0: flags=4163  mtu 1400
inet 10.0.0.4  netmask 255.255.255.0  broadcast 10.0.0.255

inet6 fe80::f816:3eff:fe57:e267  prefixlen 64  scopeid 0×20
ether fa:16:3e:57:e2:67  txqueuelen 1000  (Ethernet)
RX packets 591788  bytes 770176441 (734.4 MiB)
RX errors 0  dropped 0  overruns 0  frame 0
TX packets 196309  bytes 20105918 (19.1 MiB)
TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73  mtu 65536
inet 127.0.0.1  netmask 255.0.0.0
inet6 ::1  prefixlen 128  scopeid 0×10
loop  txqueuelen 0  (Local Loopback)
RX packets 2  bytes 140 (140.0 B)
RX errors 0  dropped 0  overruns 0  frame 0
TX packets 2  bytes 140 (140.0 B)
TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Text mode Internet works as well via “links” for instance :-

Setup Light Weight X Windows environment on F20 Cloud instance and running Fedora 20 cloud instance in Spice session via virt-manager ( Controller connects to Compute node via virt-manager ).  Spice console and QXL specified in virt-manager , then `nova reboot VF20WRT`.

# yum install xorg-x11-server-Xorg xorg-x11-xdm fluxbox \
xorg-x11-drv-ati xorg-x11-drv-evdev xorg-x11-drv-fbdev \
xorg-x11-drv-intel xorg-x11-drv-mga xorg-x11-drv-nouveau \
xorg-x11-drv-openchrome xorg-x11-drv-qxl xorg-x11-drv-synaptics \
xorg-x11-drv-vesa xorg-x11-drv-vmmouse xorg-x11-drv-vmware \
xorg-x11-drv-wacom xorg-x11-font-utils xorg-x11-drv-modesetting \
xorg-x11-glamor xorg-x11-utils xterm

# yum install dejavu-fonts-common \
dejavu-sans-fonts \
dejavu-sans-mono-fonts \
dejavu-serif-fonts

# echo “exec fluxbox” > ~/.xinitrc
# startx

Fedora 20 cloud instance running in Spice Session via virt-manager with QXL 64 MB of VRAM  :-

Shutting down fluxbox :-

Done

Now run `nova suspend VF20WRT`

Connecting to Fedora 20 cloud instance via spicy from Compute node :-

Fluxbox on Ubuntu 13.10 Server Cloud Instance:-

References

1.http://bderzhavets.blogspot.com/2014/01/setting-up-two-physical-node-openstack.html


Setup Light Weight X Windows environment on Fedora 20 Cloud instance and running F20 cloud instance in Spice session via virt-manager or spicy

February 3, 2014

Following bellow builds Light Weight X Windows environment on Fedora 20 Cloud instance and demonstrate running same instance in Spice session via virt-manager ( Controller connects to Compute node via virt-manager ).  Spice console and QXL specified in virt-manager , then instance rebooted via Nova.

This post follows up [1]  http://bderzhavets.blogspot.ru/2014/01/setting-up-two-physical-node-openstack.html 
getting things on cloud instances ready to work without openstack-dashboard setup (RDO Havana administrative WEB console)

Needless to say that Spice console behaviour with running X-Server much better then it happens in VNC session , where actually one X-sever is running in a client of another one at Controller Node (F20)

Spice-gtk source rpm installed on both boxes of Cluster and rebuilt:-
$ rpm -iv spice-gtk-0.22-1.fc21.src.rpm
$ cd ~/rpmbuild/SPEC
$ sudo yum install intltool gtk2-devel usbredir-devel libusb1-devel libgudev1-devel pixman-devel openssl-devel  libjpeg-turbo-devel celt051-devel pulseaudio-libs-devel pygtk2-devel python-devel zlib-devel cyrus-sasl-devel libcacard-devel gobject-introspection-devel  dbus-glib-devel libacl-devel polkit-devel gtk-doc vala-tools gtk3-devel spice-protocol

$ rpmbuild -bb ./spice-gtk.spec
$ cd ../RPMS/x86_64

RPMs been built installed , because spicy is not on the system

[boris@dfw02 x86_64]$  sudo yum install spice-glib-0.22-2.fc20.x86_64.rpm \
spice-glib-devel-0.22-2.fc20.x86_64.rpm \
spice-gtk-0.22-2.fc20.x86_64.rpm \
spice-gtk3-0.22-2.fc20.x86_64.rpm \
spice-gtk3-devel-0.22-2.fc20.x86_64.rpm \
spice-gtk3-vala-0.22-2.fc20.x86_64.rpm \
spice-gtk-debuginfo-0.22-2.fc20.x86_64.rpm \
spice-gtk-devel-0.22-2.fc20.x86_64.rpm  \
spice-gtk-python-0.22-2.fc20.x86_64.rpm \
spice-gtk-tools-0.22-2.fc20.x86_64.rpm

Next we install X windows on F20 to run fluxbox ( by the way after hours of googling I was unable to find requied set of packages and just picked them up

during KDE Env installation via yum , which I actually don’t need at all on cloud instance of Fedora )

# yum install xorg-x11-server-Xorg xorg-x11-xdm fluxbox \
xorg-x11-drv-ati xorg-x11-drv-evdev xorg-x11-drv-fbdev \
xorg-x11-drv-intel xorg-x11-drv-mga xorg-x11-drv-nouveau \
xorg-x11-drv-openchrome xorg-x11-drv-qxl xorg-x11-drv-synaptics \
xorg-x11-drv-vesa xorg-x11-drv-vmmouse xorg-x11-drv-vmware \
xorg-x11-drv-wacom xorg-x11-font-utils xorg-x11-drv-modesetting \
xorg-x11-glamor xorg-x11-utils xterm

Install some fonts :-

# yum install dejavu-fonts-common \
dejavu-sans-fonts \
dejavu-sans-mono-fonts \
dejavu-serif-fonts

We are ready to go :-

# echo “exec fluxbox” > ~/.xinitrc
# startx


Next:  $ yum -y install firefox
via x-terminal
$/usr/bin/firefox &

Fedora 20 cloud instance running in Spice Session via virt-manager with QXL (64 MB of VRAM)  :-

Connecting via spicy from Compute Node to same F20 instance :-


   
  

    
  After port mapping :-
# ssh -L 5900:localhost:5900 -N -f -l root 192.168.1.137
Spicy may connect from Controller to Fedora 20 instance


 



Running Internet browser on F19 instance via original router on the LAN

September 15, 2013

Running Internet browser on F19 instance  via original router on the LAN


Running F19 instance routed to orinal LAN as external

September 15, 2013

Running F19 instance routed to orinal LAN as external


Dashboard

September 15, 2013

Dashboard


Virt-install Debian Squeeze PV DomU at Xen 4.1.2 Oneiric Dom0

November 19, 2011

RH’s opensource distros ISO images (Fedora,CentOS) have a nice feature,been loop mounted on apache folder /var/www/domain, they allow to create local mirror to virt-install corresponding paravirtual guest. Not customized Debian ISOs don’t have this feature, however virt-install still works for Debian Squeeze utilizing remote system HTTP source. Virt-install Debian PV DomU is possible via remote official HTTP source.Begin via virt-install command line

root@boris-System-P5Q3:~# virt-install --connect xen:/// --debug -n SQUEEZE --vnc \
> -p -r 2048 --vcpus=2 -f /dev/sdb7 \
> -l http://ftp.at.debian.org/debian/dists/squeeze/main/installer-amd64/
Sat, 19 Nov 2011 19:23:20 DEBUG Launched with command line:
/usr/bin/virt-install --connect xen:/// --debug -n SQUEEZE --vnc -p -r 2048 --vcpus=2 -f /dev/sdb7 -l http://ftp.at.debian.org/debian/dists/squeeze/main/installer-amd64/
Sat, 19 Nov 2011 19:23:20 DEBUG Requesting libvirt URI xen:///
Sat, 19 Nov 2011 19:23:20 DEBUG Received libvirt URI xen:///
Sat, 19 Nov 2011 19:23:20 DEBUG Requesting virt method 'xen', hv type 'default'.
Sat, 19 Nov 2011 19:23:20 DEBUG Received virt method 'xen'
Sat, 19 Nov 2011 19:23:20 DEBUG Hypervisor name is 'xen'
Sat, 19 Nov 2011 19:23:20 DEBUG --graphics compat generated: vnc
Sat, 19 Nov 2011 19:23:20 DEBUG DistroInstaller location is a network source.
Sat, 19 Nov 2011 19:23:20 DEBUG Attempting to detect distro:
Sat, 19 Nov 2011 19:23:22 DEBUG Fetching URI: http://ftp.at.debian.org/debian/dists/squeeze/main/installer-amd64/current/images/MANIFEST
Sat, 19 Nov 2011 19:23:22 DEBUG Saved file to /var/tmp/virtinst-MANIFEST.1GW1wt
Sat, 19 Nov 2011 19:23:22 DEBUG Detected a Debian distro
Sat, 19 Nov 2011 19:23:22 DEBUG Guest.has_install_phase: True
Starting install...
Sat, 19 Nov 2011 19:23:22 DEBUG scratchdir=/var/lib/xen
Sat, 19 Nov 2011 19:23:23 DEBUG Attempting to detect distro:
Sat, 19 Nov 2011 19:23:25 DEBUG Fetching URI: http://ftp.at.debian.org/debian/dists/squeeze/main/installer-amd64/current/images/MANIFEST
Sat, 19 Nov 2011 19:23:25 DEBUG Saved file to /var/lib/xen/virtinst-MANIFEST.rh1eGO
Retrieving file MANIFEST... | 3.3 kB 00:00 ...
Sat, 19 Nov 2011 19:23:25 DEBUG Detected a Debian distro
Sat, 19 Nov 2011 19:23:25 DEBUG Fetching URI: http://ftp.at.debian.org/debian/dists/squeeze/main/installer-amd64/current/images/netboot/xen/vmlinuz
Sat, 19 Nov 2011 19:23:36 DEBUG Saved file to /var/lib/xen/virtinst-vmlinuz.5Or9oh 00:00 ETA
Retrieving file vmlinuz... | 4.6 MB 00:10 ...
Sat, 19 Nov 2011 19:23:36 DEBUG Fetching URI: http://ftp.at.debian.org/debian/dists/squeeze/main/installer-amd64/current/images/netboot/xen/initrd.gz
Sat, 19 Nov 2011 19:24:51 DEBUG Saved file to /var/lib/xen/virtinst-initrd.gz.T9hVje 00:00 ETA
Retrieving file initrd.gz... | 37 MB 01:15 ...
Sat, 19 Nov 2011 19:24:51 DEBUG Auto detected OS type as: linux
Sat, 19 Nov 2011 19:24:51 DEBUG Have access to local system scratchdir so nothing to upload
Sat, 19 Nov 2011 19:24:51 DEBUG Could not open "/etc/sysconfig/keyboard" [Errno 2] No such file or directory: '/etc/sysconfig/keyboard'
Sat, 19 Nov 2011 19:24:51 DEBUG Could not open "/etc/X11/xorg.conf": [Errno 2] No such file or directory: '/etc/X11/xorg.conf'
Sat, 19 Nov 2011 19:24:51 DEBUG Could not open "/etc/sysconfig/keyboard" [Errno 2] No such file or directory: '/etc/sysconfig/keyboard'
Sat, 19 Nov 2011 19:24:51 DEBUG Could not open "/etc/X11/xorg.conf": [Errno 2] No such file or directory: '/etc/X11/xorg.conf'
Sat, 19 Nov 2011 19:24:51 DEBUG Generated install XML:
<domain type='xen'>
<name>SQUEEZE</name>
<uuid>3978d7ce-454b-103e-d9df-a486052bf6ce</uuid>
<memory>2097152</memory>
<currentMemory>2097152</currentMemory>
<vcpu>2</vcpu>
<os>
<type arch='x86_64'>linux</type>
<kernel>/var/lib/xen/virtinst-vmlinuz.5Or9oh</kernel>
<initrd>/var/lib/xen/virtinst-initrd.gz.T9hVje</initrd>
<cmdline>method=http://ftp.at.debian.org/debian/dists/squeeze/main/installer-amd64/</cmdline>
</os>
<features>
<acpi/><apic/>
</features>
<on_poweroff>destroy</on_poweroff>
<on_reboot>destroy</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<disk type='block' device='disk'>
<source dev='/dev/sdb7'/>
<target dev='xvda' bus='xen'/>
</disk>
<interface type='bridge'>
<source bridge='br0'/>
<mac address='00:16:3e:da:f5:3f'/>
</interface>
<input type='mouse' bus='xen'/>
<graphics type='vnc' port='-1' keymap='en-us'/>
<video>
<model type='cirrus'/>
</video>
</devices>
</domain>
Sat, 19 Nov 2011 19:24:51 DEBUG Generated boot XML:
<domain type='xen'>
<name>SQUEEZE</name>
<uuid>3978d7ce-454b-103e-d9df-a486052bf6ce</uuid>
<memory>2097152</memory>
<currentMemory>2097152</currentMemory>
<vcpu>2</vcpu>
<bootloader>/usr/lib/xen-default/bin/pygrub</bootloader>
<features>
<acpi/><apic/>
</features>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>restart</on_crash>
<devices>
<disk type='block' device='disk'>
<source dev='/dev/sdb7'/>
<target dev='xvda' bus='xen'/>
</disk>
<interface type='bridge'>
<source bridge='br0'/>
<mac address='00:16:3e:da:f5:3f'/>
</interface>
<input type='mouse' bus='xen'/>
<graphics type='vnc' port='-1' keymap='en-us'/>
<video>
<model type='cirrus'/>
</video>
</devices>
</domain>
Creating domain... | 0 B 00:01
Sat, 19 Nov 2011 19:24:53 DEBUG Started guest, connecting to console if requested
Sat, 19 Nov 2011 19:24:53 DEBUG Launching virt-viewer for graphics type 'vnc'
Sat, 19 Nov 2011 19:24:53 DEBUG Running: /usr/bin/virt-viewer --connect xen:/// --wait 1
(virt-viewer:2892): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",
Sat, 19 Nov 2011 19:24:53 DEBUG XML fetched from libvirt object:
<domain type='xen' id='1'>
<name>SQUEEZE</name>
<uuid>3978d7ce-454b-103e-d9df-a486052bf6ce</uuid>
<description></description>
<memory>2097152</memory>
<currentMemory>2097152</currentMemory>
<vcpu>2</vcpu>
<bootloader></bootloader>
<bootloader_args></bootloader_args>
<os>
<type>linux</type>
<kernel>/var/lib/xen/virtinst-vmlinuz.5Or9oh</kernel>
<initrd>/var/lib/xen/virtinst-initrd.gz.T9hVje</initrd>
<cmdline>method=http://ftp.at.debian.org/debian/dists/squeeze/main/installer-amd64/</cmdline>
</os>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>destroy</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<emulator>/usr/lib/xen-4.1/bin/qemu-dm</emulator>
<disk type='block' device='disk'>
<driver name='phy'/>
<source dev='/dev/sdb7'/>
<target dev='xvda' bus='xen'/>
</disk>
<interface type='bridge'>
<mac address='00:16:3e:da:f5:3f'/>
<source bridge='br0'/>
<script path='/etc/xen/scripts/vif-bridge'/>
<target dev='vif1.0'/>
</interface>
<console type='pty' tty='/dev/pts/2'>
<source path='/dev/pts/2'/>
<target type='xen' port='0'/>
</console>
<input type='mouse' bus='xen'/>
<graphics type='vnc' port='5900' autoport='yes' keymap='en-us'/>
</devices>
</domain>







Sat, 19 Nov 2011 20:04:50 DEBUG Removing /var/lib/xen/virtinst-vmlinuz.5Or9oh
Sat, 19 Nov 2011 20:04:50 DEBUG Removing /var/lib/xen/virtinst-initrd.gz.T9hVje
Guest installation complete... restarting guest.
Sat, 19 Nov 2011 20:04:56 DEBUG Launching virt-viewer for graphics type 'vnc'
Sat, 19 Nov 2011 20:04:56 DEBUG Running: /usr/bin/virt-viewer --connect xen:/// --wait 2
(virt-viewer:3705): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",




root@boris-System-P5Q3:~# virsh list –all
Id Name State
———————————-
0 Domain-0 running
– OneiricPV shut off
– SQUEEZE shut off
– VF16PV shut off
– VF16RC5 shut off

root@boris-System-P5Q3:~# virsh start SQUEEZE
Domain SQUEEZE started

root@boris-System-P5Q3:~# vncviewer localhost:0

VNC Viewer Free Edition 4.1.1 for X – built Sep 7 2011 11:16:25
Copyright (C) 2002-2005 RealVNC Ltd.
See http://www.realvnc.com for information on VNC.

Sat Nov 19 20:11:30 2011
CConn: connected to host localhost port 5900
CConnection: Server supports RFB protocol version 3.8
CConnection: Using RFB protocol version 3.8
TXImage: Using default colormap and visual, TrueColor, depth 24.
CConn: Using pixel format depth 6 (8bpp) rgb222
CConn: Using ZRLE encoding
CConn: Throughput 20006 kbit/s – changing to hextile encoding
CConn: Throughput 20006 kbit/s – changing to full colour
CConn: Using pixel format depth 24 (32bpp) little-endian rgb888
CConn: Using hextile encoding

VNC window pops up nicely.

Domain also is manageable via VirtManager :-




Set up Spice-Gtk-0.7 on Ubuntu 11.10

August 7, 2011

All packages required are already in PPA “Spice-Gtk-0.7 on Ubuntu 11.10″. Spice-gtk-0.7 has been done for Oneiric as two builds. First one with python, gobject-introspection enabled and –with-gtk=”2.0″(GTK2). Second one –with-introspection and –with-gtk=”3.0″ (GTK3).This builds actually are the core builds in PPA, which bring RH’s technologies to Ubuntu 11.10. Notice, that option –with-audio=”pulse” is also used by both builds and appears to be working fine.Patched virt-manager and virtinst also support spicevmc channel.
Following bellow is brief description of PPA Spice-Gtk-0.7 on Ubuntu 11.10.
View also PPA Qemu-kvm 0.15.0 and Spice on Ubuntu 11.10

1.The most recent qemu-kvm packages were done via “git clone git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git” are Release 0.15-rc1 as of 07/31/2011.
$ git clone git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git
$ cd qemu-kvm
$ git checkout -b stable-0.15 origin/stable-0.15
$ cd ..
Copy to building directory :
$ cp -R qemu-kvm ../BUILD/qemu-kvm-mmddyy
Stable branch is already patched to fix “QXL” issues and to support spicevmc channel

2. Spice-gtk-0.7 has been done for Oneiric as two builds.

GTK2 build performed with
./configure --prefix=/usr --build=x86_64-linux-gnu \
--mandir=/usr/share/man --infodir=/usr/share/info \
--datadir=/usr/share \
--sysconfdir=/etc --localstatedir=/var \
--libexecdir=/usr/bin \
--with-python --disable-static \
--enable-introspection \
--enable-smartcard=no \
--with-gtk="2.0" --with-audio="pulse"

GTK3 build performed with
./configure --prefix=/usr --build=x86_64-linux-gnu \
--mandir=/usr/share/man --infodir=/usr/share/info \
--datadir=/usr/share \
--sysconfdir=/etc --localstatedir=/var \
--libexecdir=/usr/bin \
--disable-static \
--enable-introspection \
--with-gtk="3.0" --enable-smartcard=no --with-audio="pulse"

libspice-protocol-dev 0.8.1-1 is required by both builds

3.Current version of spice-vdagent for Oneiric as KVM guest installs service and *.desktop (file) automatically and requires guest restart for activation or manual gdm restart and starting service.
4.Packages virt-manager-0.8.7-4ubuntu9 and virtinst-0.500.6-4ubuntu9
support spicevmc channel.
******************************
Install software from PPA :-
******************************
$ sudo apt-add-repository ppa:bderzhavets/spice-7
$ sudo apt-get update
$ sudo apt-get install qemu-kvm qemu qemu-common \
libspice-client libspice-client-dev \
libspicegtk3-client libspicegtk3-client-dev \
spice libspice-protocol-dev spicegtk3-client

$ sudo apt-get install virtinst virt-viewer virt-manager

Disable libvirtd’s apparmor profile :

$ sudo ln -s /etc/apparmor.d/usr.sbin.libvirtd /etc/apparmor.d/disable/
$ sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.libvirtd
$ sudo adduser $USER kvm
$ sudo reboot


Build Spice-Gtk-0.6 (GTK2&GTK3) on Ubuntu 11.10 (Oneiric)

June 28, 2011

Package spice-gtk-0.6 has been rebuilt on Natty to support gobject-introspection.Notice, that it was GTK2 build. Only GTK2 build creates SpiceClientGtk.so,which allows you to open Spice Console via virt-manager. Fedora 16 (rawhide) does two parallel builds GTK2 and GTK3. Analysis of spice-gtk-0.6-1.fc16.src.rpm clearly shows how packages are supposed to be created separating directories with GTK2 and GTK3 shared libraries. Actually, spice-gtk.spec works as a sample to create debian’s package.install files, providing an option reproduce exactly the same file layout on Ubuntu 11.10 as it is on F16 (rawhide) after install package spice-gtk-0.6-1.
Just SpiceClientGtk.so allows to run installs with video mode “vga” and spice sessions in “qxl” video mode with created domains via virt-manager.
View PPA Spice-Gtk-0.6 on Ubuntu 11.04 and Ubuntu 11.10 for details :-
Build with GTK2 : spice-gtk-0.6-9ubuntu15
Built packages
libspice-client Spice GTK+ Library
libspice-client-dev Spice GTK+ Library (development files)
Build with GTK3 : spice-gtk3-0.6-3ubuntu9
Built packages
libspicegtk3-client Spice GTK+ Library
libspicegtk3-client-dev Spice GTK+ Library (development files)
spicegtk3-client Virtual Desktop Interface Client using the Spice Protocol
Build spice-gtk3-0.6-3ubuntu9 depends on libspice-client. Both builds have been done for Oneiric and tested to install (with no conflicts) via Synaptic Manager and to work on daily builds 06/24/11 and 06/29/11 . Qemu-kvm build (spice enabled) was based on git clone git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git as of 06/23/11.


Set up Spicevmc Channel on Ubuntu 11.04 as KVM Server and spice-vdagent on Natty as a KVM guest

June 13, 2011

Procedure following bellow set up spicevmc channel support on KVM Server Ubuntu Natty. It also instructs how to setup spice-vdagent on Natty installed as KVM guest at any KVM Server Ubuntu 11.04 or F15. In other words it contains build debian package spice-vdagent via source for Ubuntu 11.04 ( Natty). To setup spicevmc channel on Natty install qemu-kvm packages from PPA Packages in Spice-Gtk-0.6 on Ubuntu 11.04 and Ubuntu 11.10. Build qemu-kvm-060911-0ubuntu5 from PPA already supports spicevmc channel.It’s original tarball is based on git clone git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git on 06/09/2011.Also upgrade virtinst via same PPA up to 0.500.6 to have virt-install understand option “–channel spicevmc”

Install VF15 KVM guest via :-

virt-install --connect qemu:///system \
--virt-type kvm \
--os-type=linux --os-variant=fedora15 \
--name VM15VMC --ram 2048 --disk path=/dev/sda5 \
--graphics spice --video qxl --channel spicevmc \
--cdrom /usr/tmp/Fedora-15-x86_64-DVD.iso --vcpus 2

Due to absence Virt-Manager’s ability to create channels,
e.g. it’s missing required F15 patches. Then in guest environment :
# sudo yum update
# sudo yum install spice-vdagent.
It provides an option cut text in VM Spice screen and paste in KVM Server Ubuntu 11.04 desktop environment and vice versa ….
Debian qemu-kvm packages providing spicevmc support have been also tested OK on Oneiric ( Libvirt 0.9.1)





Install Natty KVM guest as follows :-


virt-install --connect qemu:///system \
--virt-type kvm \
--os-type=linux --os-variant=ubuntunatty \
--name UbuntuVMC --ram 2048 \
--disk path=/dev/sdb7 \
--graphics spice --video qxl \
--channel spicevmc \
--cdrom /usr/tmp/ubuntuDesk11.04.iso \
--vcpus 2

When done install spice-vdagent for Natty via PPA Spice on Ubuntu 11.04 and 11.10.
*********************************************************************************
Update on 06/17/2011. Current versions of spice-vdagent install service and *.desktop (file) automatically and require guest restart for activation or manual gdm restart and starting service.
*********************************************************************************

Next :-
1. Create file /etc/xdg/autostart/spice-vdagent.desktop

[Desktop Entry]
Name=Spice vdagent
Comment=Agent for Spice guests
Exec=/usr/bin/spice-vdagent
Terminal=false
Type=Application
Categories=
X-GNOME-Autostart-Phase=Initialization
X-GNOME-AutoRestart=true

2. Then create service spice-vdagentd.

Create file /etc/init/spice-vdagentd.conf

# spice-vdagent - spice-vdagent job file
description "spice-vdagentd"
author "Boris Derzhavets <bderzhavets@yahoo.com>"
# Stanzas
#
# Stanzas control when and how a process is started and stopped
# See a list of stanzas here: http://upstart.ubuntu.com/wiki/Stanzas#respawn
# When to start the service
start on runlevel [2345]
# When to stop the service
stop on runlevel [016]
# Automatically restart process if crashed
respawn
# Essentially lets upstart know the process will detach itself to the background
expect fork
# Run before process
pre-start script
[ -d /var/run/spice-vdagentd ] || mkdir -p /var/run/spice-vdagentd
echo "Put bash code here"
end script
# Start the process
exec /usr/sbin/spice-vdagentd

Expected result :-

boris@boris-virtual-machine:~$ ps -ef| grep spice- | grep -v grep
root 739 1 0 09:23 ? 00:00:00 /usr/sbin/spice-vdagentd
gdm 1041 1 0 09:23 ? 00:00:00 /usr/bin/spice-vdagent
boris 1248 1 0 09:23 ? 00:00:00 /usr/bin/spice-vdagent

Current Build is just for testing. All actions above should be incapsulated in debian package.
If feature doesn’t work :-
boris@boris-virtual-machine:~$ ps -ef|grep spice-
root 1044 1 0 18:25 ? 00:00:00 /usr/sbin/spice-vdagentd
boris 1439 1379 0 18:25 pts/0 00:00:00 grep –color=auto spice-
boris@boris-virtual-machine:~$ /usr/bin/spice-vdagent &
[1] 1445



Testing Oneiric Daily Build as KVM guest :-


Follow

Get every new post delivered to your Inbox.