Thursday, August 28, 2014

Setup CentOS 7 cloud instance on IceHouse Neutron ML2&OVS&GRE System

   CentOS 7.0 qcow2 image for glance is available now at
   Regardless dhcp-option 26,1454 is setup in system current image loads with MTU 1500. Workaround for now is to launch instance with no ssh keypair and having postinstallation script :

password: mysecret
chpasswd: { expire: False }
ssh_pwauth: True

Detecting new default cloud user name :-

modprobe nbd max_part=63
qemu-nbd -c /dev/nbd0 image.qcow2
mkdir -p /mnt/image
mount /dev/nbd0p1 /mnt/image
cat /mnt/image/etc/cloud/cloud.cfg | tail -20
 - ssh-authkey-fingerprints
 - keys-to-console
 - phone-home
 - final-message

   name: centos  <= new default name
   lock_passwd: true
   gecos: Cloud User
   groups: [wheel, adm, systemd-journal]
   sudo: ["ALL=(ALL) NOPASSWD:ALL"]
   shell: /bin/bash
   distro: rhel
   cloud_dir: /var/lib/cloud
   templates_dir: /etc/cloud/templates
   ssh_svcname: sshd

Then login to vnc-console with given password and run
# ifconfig eth0 mtu 1454 up

Setting stays stable between reboots.

 Setup Gnome Desktop on VM

# yum -y groupinstall "GNOME Desktop"
$ echo "exec /usr/bin/gnome-session" >> ~/.xinitrc
# ln -sf /lib/systemd/system/ /etc/systemd/system/