Running OpenStack under VirtualBox – A Complete Guide (Part 1)

UPDATE: I’ve been working on a new version of the script which can be used to create an OpenStack host running on Ubuntu 12.04 Precise Pangolin and the Essex release.
I’ve now got a video to accompany this which is recommended over this guide
Head over to  ‎http://uksysadmin.wordpress.com/2012/03/28/screencast-video-of-an-install-of-openstack-essex-on-ubuntu-12-04-under-virtualbox/

Running OpenStack under VirtualBox allows you to have a complete multi-node cluster that you can access and manage from the computer running VirtualBox as if you’re accessing a region on Amazon.
This is a complete guide to setting up a VirtualBox VM running Ubuntu, with OpenStack running on this guest and an OpenStack instance running, accessible from your host.

Part 1 – OpenStack on a single VirtualBox VM with OpenStack instances accessible from host

The environment used for this guide

  • A 64-Bit Intel Core i7 Laptop, 8Gb Ram.
  • Ubuntu 10.10 Maverick AMD64 (The “host”)
  • VirtualBox 4
  • Access from host running VirtualBox only (so useful for development/proof of concept)

The proposed environment

  • OpenStack “Public” Network: 172.241.0.0/25
  • OpenStack “Private” Network: 10.0.0.0/8
  • Host has access to its own LAN, separate to this on 192.168.0.0/16 and not used for this guide

The Guide

  • Download and install VirtualBox from http://www.virtualbox.org/
  • Under Preferences… Network…
  • Add/Edit Host-only network so you have vboxnet0. This will serve as the “Public interface” to your cloud environment
    • Configure this as follows
      • Adapter
        • IPv4 Address: 172.241.0.100
        • IPv4 Network Mask: 255.255.255.128
      • DHCP Server
        • Disable Server
    • On your Linux host running VirtualBox, you will see an interface created called ‘vboxnet0′ with the address specified as 172.241.0.100. This will be the IP address your OpenStack instances will see when you access them.
    • Create a new Guest
      • Name: Cloud1
        • OS Type: Linux
        • Version: Ubuntu (64-Bit)
      • 1024Mb Ram
      • Boot Hard Disk
        • Dynamically Expanding Storage
        • 8.0Gb
      • After this initial set up, continue to configure the guest
        • Storage:
          • Edit the CD-ROM so that it boots Ubuntu 10.10 Live or Server ISO
          • Ensure that the SATA controller has Host I/O Cache Enabled (recommended by VirtualBox for EXT4 filesystems)
        • Network:
          • Adapter 1
            • Host-only Adapter
            • Name: vboxnet0
          • Adapter 2
            • NAT
            • This will provide the default route to allow the VM to access the internet to get the updates, OpenStack scripts and software
        • Audio:
          • Disable (just not required)
    • Power the guest on and install Ubuntu
    • For this guide I’ve statically assigned the guest with the IP: 172.241.0.101 for eth0 and netmask 255.255.255.128.  This will be the IP address that you will use to access the guest from your host box, as well as the IP address you can use to SSH/SCP files around.
    • Once installed, run an update (sudo apt-get update&&sudo apt-get upgrade) then reboot
    • If you’re running a desktop, install the Guest Additions (Device… Install Guest Additions, then click on Places and select the VBoxGuestAdditions CD and follow the Autorun script), then Reboot
    • Install openssh-server
      • sudo apt-get -y install openssh-server
    • Grab this script to install OpenStack
      • This will set up a repository (ppa:nova/trunk) and install MySQL server where the information regarding your cloud will be stored
      • The options specified on the command line match the environment described above
      • wget https://github.com/uksysadmin/OpenStackInstaller/raw/master/OSinstall.sh
    • Run the script (as root/through sudo)
      • sudo bash ./OSinstall.sh -A $(whoami)
    • Run the post-configuration steps
      • ADMIN=$(whoami)
        sudo nova-manage user admin ${ADMIN}
        sudo nova-manage role add ${ADMIN} cloudadmin
        sudo nova-manage project create myproject ${ADMIN}
        sudo nova-manage project zipfile myproject ${ADMIN}
        mkdir -p cloud/creds
        cd cloud/creds
        unzip ~/nova.zip
        . novarc
        cd
        euca-add-keypair openstack > ~/cloud/creds/openstack.pem
        chmod 0600 cloud/creds/*

    Congratulations, you now have a working Cloud environment waiting for its first image and instances to run, with a user you specified on the command line (yourusername), the credentials to access the cloud and a project called ‘myproject’ to host the instances.

    • You now need to ensure that you can access any instances that you launch via SSH as a minimum (as well as being able to ping) – but I add in access to a web service and port 8080 too for this environment as my “default” security group.
      • euca-authorize default -P tcp -p 22 -s 0.0.0.0/0
        euca-authorize default -P tcp -p 80 -s 0.0.0.0/0
        euca-authorize default -P tcp -p 8080 -s 0.0.0.0/0
        euca-authorize default -P icmp -t -1:-1
    • Next you need to load a UEC image into your cloud so that instances can be launched from it
      • image="ttylinux-uec-amd64-12.1_2.6.35-22_1.tar.gz"
        wget http://smoser.brickies.net/ubuntu/ttylinux-uec/$image
        uec-publish-tarball $image mybucket
    • Once the uec-publish-tarball command has been run, it will present you with a line with emi=, eri= and eki= specifying the Image, Ramdisk and Kernel as shown below. Highlight this, copy and paste back in your shell
      Thu Feb 24 09:55:19 GMT 2011: ====== extracting image ======
      kernel : ttylinux-uec-amd64-12.1_2.6.35-22_1-vmlinuz
      ramdisk: ttylinux-uec-amd64-12.1_2.6.35-22_1-initrd
      image  : ttylinux-uec-amd64-12.1_2.6.35-22_1.img
      Thu Feb 24 09:55:19 GMT 2011: ====== bundle/upload kernel ======
      Thu Feb 24 09:55:21 GMT 2011: ====== bundle/upload ramdisk ======
      Thu Feb 24 09:55:22 GMT 2011: ====== bundle/upload image ======
      Thu Feb 24 09:55:25 GMT 2011: ====== done ======
      emi="ami-fnlidlmq"; eri="ami-dqliu15n"; eki="ami-66rz6vbs";
    • To launch an instance
      • euca-run-instances $emi -k openstack -t m1.tiny
    • To check its running
      • euca-describe-instances
      • You will see the Private IP that has been assigned to this instance, for example 10.0.0.3
    • To access this via SSH
      • ssh -i cloud/creds/openstack.pem root@10.0.0.3
      • (To log out of ttylinux, type: logout)
    • Congratulations, you now have an OpenStack instance running under OpenStack Nova, running under a VirtualBox VM!
    • To access this outside of the VirtualBox environment (i.e. back on your real computer, the host) you need to assign it a “public” IP
      • Associate this to the instance id (get from euca-describe-instances and will be of the format i-00000000)
        • euca-allocate-address
        • This will return an IP address that has been assigned to your project so that you can now associate to your instance, e.g. 172.241.0.3
        • euca-associate-address -i i-00000001 172.241.0.3
      • Now back on your host (so outside of VirtualBox), grab a copy of cloud/creds directory
        • scp -r user@172.241.0.101:cloud/creds .
      • You can now access that host using the Public address you associated to it above
        • ssh -i cloud/creds/openstack.pem root@172.241.0.3

    CONGRATULATIONS! You have now created a complete cloud environment under VirtualBox that you can manage from your computer (host) as if you’re managing services on Amazon. To demonstrate this you can terminate that instance you created from your computer (host)

    • sudo apt-get install euca2ools
      . cloud/creds/novarc
      euca-describe-instances
      euca-terminate-instances i-00000001

    Credits

    This guide is based on Thierry Carrez’ blog @ http://fnords.wordpress.com/2010/12/02/bleeding-edge-openstack-nova-on-maverick/

  • Next: Part 2 – OpenStack on a multiple VirtualBox VMs with OpenStack instances accessible from host
About these ads

61 comments on “Running OpenStack under VirtualBox – A Complete Guide (Part 1)

  1. Pingback: Running OpenStack under VirtualBox « System Administration and Architecture Blog

  2. Pingback: Running OpenStack under VirtualBox – A Complete Guide (Part 2) « System Administration and Architecture Blog

  3. Great guide, I was exactly looking for something like this as I just started exploring OpenStack. Your guide is a savior for me. Yet I got stuck at a point where I am trying to start an instance and I get the following error. I have followed exactly as per your guide. Please suggest me

    king@openstack:~$ euca-describe-instances
    RESERVATION r-2btspvqo myproject default
    INSTANCE i-00000002 ami-gt52dxii 10.0.0.4 10.0.0.4 failed to spawn openstack (myproject, openstack) 0 m1.tiny 2011-03-03T07:44:18Z nova
    RESERVATION r-6i92vtj1 myproject default
    INSTANCE i-00000001 ami-gt52dxii 10.0.0.3 10.0.0.3 failed to spawn openstack (myproject, openstack) 0 m1.tiny 2011-03-03T07:34:22Z nova
    king@openstack:~$

      • Looks like you are right about it… heres the log … i think its fixed now … will try trunk again … also i will try with bexar release
        ———————-
        (nova.exception): TRACE: ProgrammingError: (ProgrammingError) (1064, “You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘) \n LIMIT 0, 1′ at line 3″) ‘SELECT instance_types.created_at AS instance_types_created_at, instance_types.updated_at AS instance_types_updated_at, instance_types.deleted_at AS instance_types_deleted_at, instance_types.deleted AS instance_types_deleted, instance_types.id AS instance_types_id, instance_types.name AS instance_types_name, instance_types.memory_mb AS instance_types_memory_mb, instance_types.vcpus AS instance_types_vcpus, instance_types.local_gb AS instance_types_local_gb, instance_types.flavorid AS instance_types_flavorid, instance_types.swap AS instance_types_swap, instance_types.rxtx_quota AS instance_types_rxtx_quota, instance_types.rxtx_cap AS instance_types_rxtx_cap \nFROM instance_types \nWHERE instance_types.name = %s \n LIMIT 0, 1′ (['m1.tiny'],)
        (nova.exception): TRACE:
        2011-03-04 01:04:55,672 ERROR nova.compute.manager [ESF9--4B1-WKCL444AAU king myproject] instance 3: Failed to spawn
        (nova.compute.manager): TRACE: Traceback (most recent call last):
        (nova.compute.manager): TRACE: File “/usr/lib/pymodules/python2.6/nova/compute/manager.py”, line 213, in run_instance
        (nova.compute.manager): TRACE: self.driver.spawn(instance_ref)
        (nova.compute.manager): TRACE: File “/usr/lib/pymodules/python2.6/nova/exception.py”, line 122, in _wrap
        (nova.compute.manager): TRACE: raise Error(str(e))
        (nova.compute.manager): TRACE: Error: (ProgrammingError) (1064, “You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘) \n LIMIT 0, 1′ at line 3″) ‘SELECT instance_types.created_at AS instance_types_created_at, instance_types.updated_at AS instance_types_updated_at, instance_types.deleted_at AS instance_types_deleted_at, instance_types.deleted AS instance_types_deleted, instance_types.id AS instance_types_id, instance_types.name AS instance_types_name, instance_types.memory_mb AS instance_types_memory_mb, instance_types.vcpus AS instance_types_vcpus, instance_types.local_gb AS instance_types_local_gb, instance_types.flavorid AS instance_types_flavorid, instance_types.swap AS instance_types_swap, instance_types.rxtx_quota AS instance_types_rxtx_quota, instance_types.rxtx_cap AS instance_types_rxtx_cap \nFROM instance_types \nWHERE instance_types.name = %s \n LIMIT 0, 1′ (['m1.tiny'],)
        (nova.compute.manager): TRACE:

  4. Hi there,
    why the following lines of commands ?

    “image=”ttylinux-uec-amd64-12.1_2.6.35-22_1.tar.gz”
    wget http://smoser.brickies.net/ubuntu/ttylinux-uec/$image
    uec-publish-tarball $image mybucket”

    as i am following your blog and got confused why we have to install the image to newly created guest machine.
    looking forward for information as possible.
    regards
    nirmal

    • OpenStack is a layer for managing your hypervisors running on many machines. Once you’ve set it up you might want to run a virtual machine… So you need machine images to spawn instances from.
      Those lines upload the image to OpenStack ready for use.

  5. Isn’t the distributed scm necessary for the installation (bzr) be “Bazaar” and not “Bizarre”? I mean that this software surely contains a lot of bizarre code but it is not named after that ;)

    • Good spot. I’ve removed the pre-req on the Dashboard pending a further part to the guide which will go into this so no more mention of anything bizarre. Not intentionally anyway!

  6. This guide works until starting a VM. euca-describe-instances just shows status “Networking”, instead of an IP in 10.0.0.0. The last entry in nova-network.log is:
    2011-03-10 22:35:15,236 CRITICAL nova [-] failed to create /usr/lib/pymodules/python2.6/vmnovacc.MainThread-11209

    Any ideas?

  7. Hi, thanks for the installation guide. It’s very helpful. Most of the commands run without problems.

    However, it seems like the nova network is conflicting with the host network or something else. The newly created instance is stuck at the ‘networking’ stage. When I run ‘nova-network’, it returns the following error messages:

    2011-03-10 15:19:00,240 AUDIT nova [-] Starting network node (version 2011.2-workspace:tarmac-20110310204019-eamnui9ovgiu8dah)
    2011-03-10 15:19:00,243 CRITICAL nova [-] failed to create /usr/lib/pymodules/python2.6/jake-vm-ubuntu.MainThread-19962

    The host is running in the 10.175.x.x subnet, and the openstack’s network is using the default one – 10.0.0.0. Please advise how I could approach this issue. Thanks!

  8. Hmm… those last two comments are the same and I suspect they’re a bug in the release. This guide uses the latest development snapshots so at any point in time the release may actually break. At the earliest opportunity I’ll check out the latest code to see if I can recreate this, else chat to the devs on IRC @ freenode (http://webchat.freenode.net/)

    • Hi, there is a solution in this website: https://bugs.launchpad.net/nova/+bug/733020. Basically, all I did was adding a line in ‘nova.conf’. It did solve the problem. However, there is another problem. The Mysql database does not look like it’s setup properly. Or maybe the sql connection was wrong?

      CRITICAL nova [-] (OperationalError) no such table: networks u’SELECT networks.created_at AS networks_created_at, networks.updated_at AS networks_updated_at, networks.deleted_at AS networks_deleted_at, networks.deleted AS networks_deleted, networks.id AS networks_id, networks.label AS networks_label, networks.injected AS networks_injected, networks.cidr AS networks_cidr, networks.cidr_v6 AS networks_cidr_v6, networks.ra_server AS networks_ra_server, networks.netmask AS networks_netmask, networks.bridge AS networks_bridge, networks.gateway AS networks_gateway, networks.broadcast AS networks_broadcast, networks.dns AS networks_dns, networks.vlan AS networks_vlan, networks.vpn_public_address AS networks_vpn_public_address, networks.vpn_public_port AS networks_vpn_public_port, networks.vpn_private_address AS networks_vpn_private_address, networks.dhcp_start AS networks_dhcp_start, networks.project_id AS networks_project_id, networks.host AS networks_host \nFROM networks \nWHERE networks.deleted = ? AND networks.host = ?’ (False, ‘jake-vm-ubuntu’)

      Has anyone seen this before? Thanks.

    • Just ignore the msg above. The error was probably caused by the nova-network which was pointing to “sqlite” instead of “mysql”. Will try again next week.

  9. Hi,
    To test your deploiement I prefer to use a physical partition.
    Hence I have been trying to create a rawdisk from a LVM partition instead of a virtual disk as a file as you describe it.

    However, I had the following error :

    $ VBoxManage internalcommands createrawvmdk -filename ~/.VirtualBox/VM_1.vmdk -rawdisk /dev/mapper/vg-VM_1
    VBoxManage: error: Cannot open the raw disk ‘/dev/mapper/vg-VM_1′: VERR_ACCESS_DENIED
    VBoxManage: error: The raw disk vmdk file was not created

    => the command succeeds if I use sudo but the resulting vmdk file belongs to root.
    After some ‘chown’ magic, VirtualBox failed adding this new disk.

    Failed to open the hard disk /home/bertrand/.VirtualBox/VM_1.vmdk.
    The medium ‘~/.VirtualBox/VM_1.vmdk’ can’t be used as the requested device type.
    Result Code:
    NS_ERROR_FAILURE (0×80004005)

    I know this is outside the scope of your article but any idea ?

    • Hi,
      Yes – I’m no vbox expert – I use it out of convenience, but this is the give away:

      VBoxManage: error: Cannot open the raw disk ‘/dev/mapper/vg-VM_1′: VERR_ACCESS_DENIED

      You will only be able to write to that device as root (or whatever the permissions will be). Not sure why you’d add complexity to a virtual environment like this as there’ll be no noticeable performance or security gains, but you can do this so each to their own!

      I’d try sudo in front of that command and then chowning it to be your username and give yourself write access to it.

  10. Pingback: Installazione di OpenStack Nova (1) » azns.it

  11. Really great guide, I managed to get an instance running on my machine. I have a few questions: where does the newly created VM running? does it running on the VirtualBox? I didn’t see any steps on how to setup the hypervisor layer.

    • The VirtualBox layer represents “hardware” – so your guests are running under a software emulation hypervisor (qemu) under a guest that in turn is running under VirtualBox.

      • If the instance you ran under VirtualBox supports Xen, then you configure this in /etc/nova/nova.conf somehow – I presume using libvirt_type option which is currently set to qemu. I’ve never used XenServer so can only offer a pointer.
        If you have Intel hardware which supports nested virtualization then set the libvirt_type to kvm (or presumably xen?) and see what happens.

  12. Thank You very your guide. I have a openstack setup now running on Virtual Box. Well I have a question for you.

    Can I have the similar setup on vmware ? I have vmware based setup in my lab and it would easier for me if I can install OpenStack in vmware.

    • Yes, you should be able to adapt this guide to running VirtualBox under VMware. I only wrote this for VirtualBox as it is what I run.
      The process of creating NATted and Host-Only interfaces would be similar under VMware.

  13. Hi

    I had a good success using your script in installing OpenStack, How ever I am unable to have the same success using the Single server setup on Server Hardware. I am able to launch instances(tty) but unable to ping or ssh to it. I would greatly appreciate if you find time to make your script and this guide usable for non-virtualbox(Server Hardware) setups too. This would be of great help for everyone who would like to explore OpenStack on real hardware and have proof of concept built for there requirements.

    Personally I am looking for Single Server setup + scale with additional nodes as required. I am sure there are more people who would require the same setup.

    Regards

    • The script shouldn’t affect the installation on physical networking too much, but it is well advised to check the defaults in the script/the parameters you can pass to it to ensure it fits with your physical network. Virtual networking on a single has more flexibility, with less consequences if you have something configured incorrectly, so double check your /etc/nova/nova.conf files before you launch any instances.
      It could be that your switches don’t understand vlan tagging [the script assumes a vlan network] – I’d suspect this could be contributing to your issues.

  14. I attempted to use this guide, using 11.04 Desktop if that makes much of a difference. I found I ran into a rather practical problem, when attempting to connect to the internet, when my first network adapter was, well, a host only adapter. I could turn off the adapter for a bit, and use the second adapter to download updates and download components for the script you provided, but then the script would get mad and refuse to start because eth0, the virtual interface that corresponds to the host only adapter, was disconnected.

    Any ideas on how to fix this problem?

    • OK it sounds like to me that your default routes aren’t set up correctly for one reason or another or your DNS isn’t resolving correctly.
      Essentially your eth0 is the host-only adapter which means it only knows about traffic flowing between your guest and your PC and will either be DHCP assigned. Eth1 should be up too and have a 10.0.2.0 something address which has come from the DHCP server running on that interface under VirtualBox to provide a NATed connection, and be the default route, so running ‘route -n’ should show that traffic not destined for 172.241.0.0/28 or 10.0.2.0/24 will go via eth1.
      Other things to note -make sure your NATed connection (eth1), your host network on your PC and your host-only connection are all on different subnets to avoid any routing confusion.
      And check /etc/resolv.conf if its having trouble resolving by name – you could also try pinging an internet IP only to see if it’s just a name resolution issue and not a connection issue.

  15. Hi,

    Great tutorial. I did a mistake and had to change the cloud1′s IP from 172.241.0.100 to 172.241.0.101. Now, when I try to run ‘euca-run-instance 4emi -k openstack -t m1.tiny’ I got a “500 Internal Server Error” and “2003, “Can’t connect to MySQL server on ’172.241.0.100′ (111)”

    I assume that some pre-installation step attached the former IP (172.241.0.100) but now when I modified by hand the /etc/network/interfaces file, this change is not seen by OpenStack. Any clues about how to overcome that issue?

    • OK, I did overcome that issue. I have to modify the following files:
      - ${HOME}/cloud/creds/novarc
      - /etc/nova/nova.conf

      I looked into the files and change all occurrences of 172.241.0.100 by 172.241.0.101

  16. Hi again,

    I’m following the steps for accessing the cloud running instance from the host but I utterly failed.

    When I run the ‘euca-associate-address’ from the guest machine (where openstack has been installed) I got this error
    “ApiError: ApiError: Address (172.241.0.3) is not allocated”

    Thanks for your help

    PS: “euca-associate-address -i i-0000005 172.241.0.3″

  17. Hi everyone!

    I have some difficulties setting up the network configuration..

    Can you please someone post the openstack controller “sample setup” /etc/network/interfaces configuration file?

    I’m really appreciate for this, because I’m stuck on the network setup process.

    Thank you in advance.

    Regards,

    Bal

  18. I’ve updated my OSinstall.sh script today which fixes a number of bugs. Namely it now works on Ubuntu Oneiric Ocelot using Diablo. I’m sure some other things will come creeping out of the woodwork, but I suggest updating this by checking out the latest code from Git.

  19. Thank you for this tutorial. Your script was great to make openstack working straightforwardly when applying your instruction last week. I have had some troubles since your update!

    • Oh dear – can you send me through what is now failing. I may have brought it too much inline with Ubuntu Oneiric Ocelot and Diablo if that’s the case.
      If you let me know the base OS and OpenStack version and I’ll make sure the script works for anything thrown at it!

      • I executed all your instructions last week on ubuntu-11.04-server-amd64 within VirtualBox 4.0.12. It was really great because I had really a lot of pain to make openstack work during my first try on April’11. I have retried the installation process today and indeed the installation of glance was missing. I also add some trouble with authentication: I had to add –use_deprecated_auth for not getting a 403 forbidden error with euca-* commands. Now I am stuck on the instance creation: the instance is always “pending”. The log from nova-compute is:
        ERROR nova.rpc [-] Exception during message handling
        (nova.rpc): TRACE: Traceback (most recent call last):
        (nova.rpc): TRACE: File “/usr/lib/python2.7/dist-packages/nova/rpc/impl_kombu.py”, line 620, in _process_data
        (nova.rpc): TRACE: rval = node_func(context=ctxt, **node_args)
        (nova.rpc): TRACE: File “/usr/lib/python2.7/dist-packages/nova/exception.py”, line 98, in wrapped
        (nova.rpc): TRACE: return f(*args, **kw)
        (nova.rpc): TRACE: File “/usr/lib/python2.7/dist-packages/nova/compute/manager.py”, line 454, in run_instance
        (nova.rpc): TRACE: self._run_instance(context, instance_id, **kwargs)
        (nova.rpc): TRACE: File “/usr/lib/python2.7/dist-packages/nova/compute/manager.py”, line 393, in _run_instance
        (nova.rpc): TRACE: requested_networks=requested_networks)
        (nova.rpc): TRACE: File “/usr/lib/python2.7/dist-packages/nova/network/api.py”, line 162, in allocate_for_instance
        (nova.rpc): TRACE: ‘args’: args})
        (nova.rpc): TRACE: File “/usr/lib/python2.7/dist-packages/nova/rpc/__init__.py”, line 45, in call
        (nova.rpc): TRACE: return get_impl().call(context, topic, msg)
        (nova.rpc): TRACE: File “/usr/lib/python2.7/dist-packages/nova/rpc/impl_kombu.py”, line 739, in call
        (nova.rpc): TRACE: rv = list(rv)
        (nova.rpc): TRACE: File “/usr/lib/python2.7/dist-packages/nova/rpc/impl_kombu.py”, line 703, in __iter__
        (nova.rpc): TRACE: raise result
        (nova.rpc): TRACE: RemoteError: NoMoreNetworks None
        (nova.rpc): TRACE: [u'Traceback (most recent call last):\n', u' File "/usr/lib/python2.7/dist-packages/nova/rpc/impl_kombu.py", line 620, in _process_data\n rval = node_func(context=ctxt, **node_args)\n', u' File "/usr/lib/python2.7/dist-packages/nova/network/manager.py", line 218, in allocate_for_instance\n ips = super(FloatingIP, self).allocate_for_instance(context, **kwargs)\n', u' File "/usr/lib/python2.7/dist-packages/nova/network/manager.py", line 437, in allocate_for_instance\n requested_networks=requested_networks)\n', u' File "/usr/lib/python2.7/dist-packages/nova/network/manager.py", line 1053, in _get_networks_for_instance\n networks = self.db.project_get_networks(context, project_id)\n', u' File "/usr/lib/python2.7/dist-packages/nova/db/api.py", line 1268, in project_get_networks\n return IMPL.project_get_networks(context, project_id, associate)\n', u' File "/usr/lib/python2.7/dist-packages/nova/db/sqlalchemy/api.py", line 119, in wrapper\n return f(*args, **kwargs)\n', u' File "/usr/lib/python2.7/dist-packages/nova/db/sqlalchemy/api.py", line 3150, in project_get_networks\n return [network_associate(context, project_id)]\n’, u’ File “/usr/lib/python2.7/dist-packages/nova/db/sqlalchemy/api.py”, line 101, in wrapper\n return f(*args, **kwargs)\n’, u’ File “/usr/lib/python2.7/dist-packages/nova/db/sqlalchemy/api.py”, line 1705, in network_associate\n raise db.NoMoreNetworks()\n’, u’NoMoreNetworks: None\n’]
        (nova.rpc): TRACE:

        I have just retried with the June version of the script and It works for me as expected.

  20. First I have to echo everybody’s appreciation and say thank you for the info.

    I seem to have run into two problems:

    1. euca-describe-instances does not have any IP addresses assigned to the instances I
    create (although they are listed as up/available)

    2. I rebooted my VirtualBox Host OS and now any time I try to run a EUCA command I get
    “EC2_ACCESS_KEY environment variable must be set”, where did we set this??

    • Sorry for the late reply – Google decided to over-zealous on some spam marking.

      For number 1, check /var/log/nova/nova-network.log on your OpenStack host (or nova-compute.log) – it should hint as to what is happening.
      For number 2, you can add the source line (. path_to_/novarc) in your .bashrc file and it will always load up your environment settings from your novarc file when you spawn a new bash shell (change for whatever shell you’re using)

  21. when i run the instance on a node, then i have wget problems.
    basically the instance does not get any ip and i see many times a message:
    wget: can’t connect to remote host (169.254.169.254): Network is unreachable
    do you have a solution for this?

  22. Thanks for the great turtorial. I ran into an issue when starting an instance. I received “nbd15: Receive control failed (result -32)”. I checked the nova-compute.log, it said INFO nova.virt.libvirt_conn [-] Instance instance-00000005 spawned successfully without any other errors. I used euca-describe-instances and did see the instance was running. However, I can’t ssh or ping it even I set the firewall rule in the default group. Do you have any clue how I can get over this?

    • I have the same issue, hunting around on google I can only find people with the issue, no fixes! .. did you manage to fix it?

  23. Hi,

    Thanks for this tutorial.. I have a question.I was able to run an instance but I have some confusion regarding networking. Do you guys think this setup is ok? http://pastebin.com/kVHDV4Qy.

    After I assign a public ip 172.241.0.230 to my instance using euca-associate-address -i i-00000003 172.241.0.230, I can browser the internet from the instance. But from my host (in which I have vbox running) I can’t ping 172.241.0.230 but from cloud1 I can.

    Isn’t this an odd behavior?

    Thanks!
    Paras.

  24. Pingback: PHP, CGI/Perl Script Installation Service

  25. Hi all,

    I have set a second vbox with compute – had to specify networks and interfaces to OSinstall.sh additionally to -T and -C. I tried to launch new VM and it failed on this new compute node because of vnc port binding (it takes IP is from the first node):

    root@essex2:~/OpenStackInstaller# cat /var/log/libvirt/qemu/instance-00000008.log
    2012-11-04 15:38:45.581+0000: starting up
    LC_ALL=C PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin QEMU_AUDIO_DRV=none /usr/bin/qemu-system-x86_64 -S -M pc-1.0 -no-kvm -m 512 -smp 1,sockets=1,cores=1,threads=1 -name instance-00000008 -uuid 198e6b02-a479-4959-8c9a-11d934caaf4a -nodefconfig -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/instance-00000008.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-shutdown -kernel /var/lib/nova/instances/instance-00000008/kernel -append root=/dev/vda console=ttyS0 -drive file=/var/lib/nova/instances/instance-00000008/disk,if=none,id=drive-virtio-disk0,format=qcow2,cache=none -device virtio-blk-pci,bus=pci.0,addr=0×4,drive=drive-virtio-disk0,id=virtio-disk0 -netdev tap,fd=19,id=hostnet0 -device virtio-net-pci,netdev=hostnet0,id=net0,mac=fa:16:3e:28:37:3e,bus=pci.0,addr=0×3 -chardev file,id=charserial0,path=/var/lib/nova/instances/instance-00000008/console.log -device isa-serial,chardev=charserial0,id=serial0 -chardev pty,id=charserial1 -device isa-serial,chardev=charserial1,id=serial1 -usb -device usb-tablet,id=input0 -vnc 172.16.0.1:0 -k en-us -vga cirrus -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0×5
    char device redirected to /dev/pts/4
    inet_listen_opts: bind(ipv4,172.16.0.1,5900): Cannot assign requested address
    inet_listen_opts: FAILED
    2012-11-04 15:38:45.693+0000: shutting down

    Is there any fix except disabling VNC all together?

    Many thanks in advance!
    Vlad

    PS. I followed video tutorial and single node works just perfect :)

  26. hello sir i am getting an error while installing openstack on ubuntu 12.04
    some thing is wrong with keystone authentication……access denied
    Failed to fetch http://ppa.launchpad.net/openstack-release/2011.3/ubuntu/dists/precise/main/source/Sources 404 Not Found

    W: Failed to fetch http://ppa.launchpad.net/openstack-release/2011.3/ubuntu/dists/precise/main/binary-amd64/Packages 404 Not Found

    W: Failed to fetch http://ppa.launchpad.net/openstack-release/2011.3/ubuntu/dists/precise/main/binary-i386/Packages 404 Not Found

    E: Some index files failed to download. They have been ignored, or old ones used instead.

    pls help me…..

  27. when i run one of the following lines : sudo nova-manage user admin ${ADMIN}
    sudo nova-manage role add ${ADMIN} cloudadmin
    sudo nova-manage project create myproject ${ADMIN}
    sudo nova-manage project zipfile myproject ${ADMIN}

    I’m getting this error:
    nova.openstack.common.cfg.ConfigFileParseError: Failed to parse /etc/nova/nova.conf: at /etc/nova/nova.conf:2, Section must be started before assignment: None

  28. Today, I went to the beach front with my kids. I found
    a sea shell and gave it to my 4 year old daughter and
    said “You can hear the ocean if you put this to your ear.” She put the shell
    to her ear and screamed. There was a hermit crab inside and
    it pinched her ear. She never wants to go back! LoL I know this is completely off
    topic but I had to tell someone!

  29. Pingback: Debugging OpenStack – 'some notes

  30. sudo nova-manage user admin ${ADMIN}
    nova-manage: error: argument category: invalid choice: ‘user’
    Is this post still valid?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s