Installation of Eucalyptus Faststart Cloud-in-a-box inside KVM/Qemu VM (SOLVED)

137 views
Skip to first unread message

Metta Crawler

unread,
Mar 2, 2018, 11:23:54 AM3/2/18
to Eucalyptus Users
Installation of Eucalyptus Faststart Cloud-in-a-box inside KVM/Qemu VM:

1. Using virt-manager install a CentOS 7.4 minimal iso.
2. Give the VM about 205 GB of disk and at least 16 GB RAM
3. Don't use automatic partitioner; it will put the disk space on a /home file system
4. Create 2GB swap and put the rest of the space on the root file system.  I only tested with ext4 not xfs.
5. Log onto the VM.
6. Configure static networking inside the VM, see nmcli below
7. In the VM: hostnamectl set-hostname euca.qemu # (or whatever hostname you like.)
8. Inside the VM run: yum erase NetworkManager NetworkManager-libnm
9. In VM: systemctl disable firewalld # see https://github.com/eucalyptus/eucalyptus-cookbook/pull/419
10. In VM: systemctl stop firewalld
11. Inside the VM run: yum upgrade
12. Inside the VM run: yum install git wget bash-completion
13. Shut off VM and add policy to expose VMX to the guest (see 'virsh edit' below)
14. At some point put a checkpoint on the VM after CentOS is cool and before installing Eucalyptus
15. Restart VM and log into it then run these next steps inside the VM:
16. wget http://euca-chef.s3.amazonaws.com/eucalyptus-cookbooks-4.4.0.tgz
17. tar xvfz eucalyptus-cookbooks-4.4.0.tgz
18. git clone https://github.com/eucalyptus/eucalyptus-cookbook.git
19. rm -r cookbooks/eucalyptus/
20. mv eucalyptus-cookbook cookbooks/eucalyptus
21. tar cvfz my-cookbooks.tgz cookbooks
22. Run cookbooks/eucalyptus/faststart/cloud-in-a-box.sh -u file://$(pwd)/my-cookbooks.tgz
23. Get coffee.
24. copy /root/.euca to your account's home directory

Elaborations on steps above:
--- Hypervisor must have the 'nested' option set to '1'
--- choose one not both:
---- for Intel CPU
cat /etc/modprobe.d/qemu-system-x86.conf 
options kvm_intel nested=1
---- for AMD CPU
cat /etc/modprobe.d/qemu-system-x86.conf 
options kvm_amd nested=1
--- end of hypervisor configuration

--- VM must have Intel VMX *or* AMD SVM exposed
--- sudo virsh edit ...
--- choose one not both:
---- For Intel (model will vary depending on your CPU)
  <cpu mode='custom' match='exact' check='full'>
    <model fallback='forbid'>Haskell</model>
    <feature policy='require' name='vmx'/>
---- for AMD (model will vary depending on your CPU)
  <cpu mode='custom' match='exact' check='partial'>
    <model fallback='allow'>Opteron_G4</model>
    <feature policy='require' name='svm'/>
----- end of guest configuration

--- nmcli script for static eth0 in VM guest
--- change 192.168.0.1 and 192.168.0.77 to suit your setup
#! /bin/bash

nmcli con del eth0
nmcli con add con-name eth0 ifname eth0 type ethernet ip4 192.168.0.77/24 gw4 192.168.0.1
nmcli con mod eth0 +ipv4.dns 192.168.0.1
-----

Metta Crawler

unread,
Mar 2, 2018, 11:27:03 AM3/2/18
to Eucalyptus Users
One more thing.

Inside /usr/lib/modules-load.d/70-eucalyptus-node.conf there will be both:
kvm_amd
kvm_intel

Remove the line with the one you don't use. This will clear the error 
Mar 02 10:14:16 euca.qemu systemd-modules-load[374]: Failed to insert 'kvm_amd': Operation not supported
when you reboot

Metta Crawler

unread,
Mar 2, 2018, 11:29:32 AM3/2/18
to Eucalyptus Users
The system takes a long time to start. A way to monitor progress is to use

tail -f /var/log/eucalyptus/eucanetd.log


On Friday, March 2, 2018 at 11:23:54 AM UTC-5, Metta Crawler wrote:

Metta Crawler

unread,
Mar 2, 2018, 11:58:47 AM3/2/18
to Eucalyptus Users
I rolled up a lot of the instructions into a script I call "install-installer"

#! /bin/bash

tar xvfz eucalyptus-cookbooks-4.4.0.tgz
rm -r cookbooks/eucalyptus/
mv eucalyptus-cookbook cookbooks/eucalyptus
tar cvfz my-cookbooks.tgz cookbooks
# Still installing on the graphics (video) console due to
# worries that the network will be cut off during installation.
# I run the runme script from the video console
cat <<EOF >runme
#! /bin/bash
./cookbooks/eucalyptus/faststart/cloud-in-a-box.sh -u file://$(pwd)/my-cookbooks.tgz
EOF
chmod +x runme

Then on the console run the runme script.

On Friday, March 2, 2018 at 11:23:54 AM UTC-5, Metta Crawler wrote:

Metta Crawler

unread,
Mar 2, 2018, 2:54:47 PM3/2/18
to Eucalyptus Users
Oh, yeah. I forgot to mention that you have to change SELinux from enforcing to permissive before you install Eucalyptus.

The entire instructions all over again with all that:

Installation of Eucalyptus Faststart Cloud-in-a-box inside KVM/Qemu VM:

1. Using virt-manager install a CentOS 7.4 minimal iso.
2. Give the VM about 205 GB of disk and at least 16 GB RAM
3. Don't use automatic partitioner; it will put the disk space on a /home file system
4. Create 2GB swap and put the rest of the space on the root file system.
5. Log onto the VM.
6. Change selinux from enforcing to permissive. Edit /etc/selinux/config and run setenforce permissive
7. Configure static networking inside the VM, see nmcli below
8. In the VM: hostnamectl set-hostname euca.qemu #or whatever hostname you like.
9. Inside the VM run: yum erase NetworkManager NetworkManager-libnm
10. In VM: systemctl disable firewalld # see https://github.com/eucalyptus/eucalyptus-cookbook/pull/419
11. In VM: systemctl stop firewalld
12. Inside the VM run: yum upgrade
13. Inside the VM run: yum install git wget bash-completion
14. Shut off VM and add policy to expose VMX to the guest (see 'virsh edit' below)
15. At some point put a checkpoint on the VM after CentOS is cool and before installing Eucalyptus
16. Restart VM and log into it then run the install-installer.sh script inside the VM:
https://gist.github.com/mettacrawler/b67ed38b447f2a14096d28c4d606e7e4
16. On the VM console run the runme script
17. Get coffee.
18. copy /root/.euca to your account's home directory
19. Clean up  /usr/lib/modules-load.d/70-eucalyptus-node.conf, see below for details.

Elaborations on steps above:
--- Hypervisor must have the 'nested' option set to '1'
--- choose one not both:
---- for Intel CPU
cat /etc/modprobe.d/qemu-system-x86.conf 
options kvm_intel nested=1
---- for AMD CPU
cat /etc/modprobe.d/qemu-system-x86.conf 
options kvm_amd nested=1
--- end of hypervisor configuration

--- VM must have Intel VMX *or* AMD SVM exposed
--- sudo virsh edit ...
--- choose one not both:
---- For Intel (model will vary depending on your CPU)
  <cpu mode='custom' match='exact' check='full'>
    <model fallback='forbid'>Haskell</model>
    <feature policy='require' name='vmx'/>
---- for AMD (model will vary depending on your CPU)
  <cpu mode='custom' match='exact' check='partial'>
    <model fallback='allow'>Opteron_G4</model>
    <feature policy='require' name='svm'/>
----- end of guest configuration

--- nmcli script for static eth0 in VM guest
--- change 192.168.0.1 and 192.168.0.77 to suit your setup
#! /bin/bash

nmcli con del eth0
nmcli con add con-name eth0 ifname eth0 type ethernet ip4 192.168.0.77/24 gw4 192.168.0.1
nmcli con mod eth0 +ipv4.dns 192.168.0.1
-----

------
--- Clean up 70-eucalyptus-node.conf
Inside /usr/lib/modules-load.d/70-eucalyptus-node.conf there will be both:
kvm_amd
kvm_intel

Remove the line with the one you don't use. This will clear the error 
Mar 02 10:14:16 euca.qemu systemd-modules-load[374]: Failed to insert 'kvm_amd': Operation not supported
when you reboot

Metta Crawler

unread,
Mar 9, 2018, 5:37:47 AM3/9/18
to Eucalyptus Users
This documentation is now hosted on GitHub:

su -

unread,
Apr 10, 2018, 4:07:30 PM4/10/18
to Eucalyptus Users

I am having issues with this fastinstall when it attempts to install on hardware not virtual centos 7.4 I get errors for Executing the requested script fails //etc/eucalyptus/cloud/scripts/initalize_cloud.groovy (Permission Denied)
Any Ideas on how to solve this. since the files in scripts are removed when eucalyptus is nuked.

Metta Crawler

unread,
Apr 10, 2018, 6:17:41 PM4/10/18
to Eucalyptus Users
Can to try again? I nuked all the old stuff about using cookbooks from S3.
 

Metta Crawler

unread,
Apr 10, 2018, 6:20:45 PM4/10/18
to Eucalyptus Users


On Tuesday, April 10, 2018 at 4:07:30 PM UTC-4, su - wrote:
One more thing, the runme script is dead, just run 

sudo ./install-installer.sh 


Mike

unread,
Apr 16, 2018, 11:05:58 AM4/16/18
to Eucalyptus Users
 Thank you for the quick reply
 install-installer.sh Line 20 points to  a non existent file . It should be  cd cookbooks/eucalyptus where you moved the file to.
It is now failing for Chef Yum install I have not worked with chef before so I have attached the error log for you to look at
I really appreciate the help.
 
euca-install-04.11.2018-15.43.39.log

Metta Crawler

unread,
Apr 16, 2018, 12:11:32 PM4/16/18
to Eucalyptus Users, card...@mantech.com
I fixed line 19 instead. Please try again, thanks.
 
Reply all
Reply to author
Forward
0 new messages