Changes

stoney cloud: Upgrade

5,562 bytes added, 09:03, 11 August 2017
/* Basic Testing Steps */
<source lang="bash">
echo 'PORTAGE_BINHOST="http://packages.stoney-cloud.org/stoney-cloud/pre-releases/1.2/packages"' >> /etc/portage/make.conf
 
# Disable the SYNC from rsync since newer portage versions otherwise won't accept a portage tree via git
sed -i -e 's|^SYNC|#SYNC|' /etc/portage/make.conf
</source>
== Update ==
=== Updating from 1.2.10.7 or earlier to 1.2.10.8_rc4 or newer ===
 
A complete rebuild of all packages was required, therefore the update guide is different:
 
<source lang='bash'>
emerge --sync
 
emerge -eK world -va
# sst-libvirt-hooks is not part of the stoney-cloud anymore since it requires further configuration
# make sure that it still gets updated and not removed later, if you have it installed and enabled
emerge -K app-emulation/sst-libvirt-hooks
dispatch-conf
# Switch runtime switchable options
eselect python set python3.3
eselect php set cli php5.5
eselect php set apache2 php5.5
gcc-config x86_64-pc-linux-gnu-4.7.3
</source>
 
During the dispatch-conf the following may appear:
* /etc/libvirt/libvirt.conf: you may get the suggestion to remove almost all content. Quit dispatch-conf and do: <code>rm /etc/libvirt/._mrg*</code> and start dispatch-conf again.
* /etc/libvirt/libvirt.conf: merge all whitespace/comment changes but make sure you don't overwrite the <code>listen_addr</code>
* /etc/portage/make.conf: merge all changes beside the <code>PORTAGE_BINHOST</code>
* /var/www/localhost/htdocs/vm-manager/vm_config.php: merge the versions, newly added lines and comments. Avoid changes on sstSourceHostName array
 
To make sure everything works, reboot and then cleanup:
 
<source lang='bash'>
emerge --depclean -va
</source>
 
* If the cleanup fails stating that <code>Locale-gettext</code> and <code>dev-libs/boost</code> depends on some version of perl, reinstall that package manually once and try again:
<source lang='bash'>
emerge -1Kva dev-libs/boost Locale-gettext
 
# same for autoconf-/automake-wrapper if host was used to build stuff:
emerge -1K sys-devel/autoconf-wrapper sys-devel/automake-wrapper
</source>
* '''WARNING''': this also removes the current kernel. If you want to play it safe, reboot first, then depclean, then reboot again
* Rebuilde separately installed perl modules and remove traces of the old perl version:
<source lang='bash'>
perl-cleaner --all -- -va
rm -rf /usr/lib64/perl5/{vendor_perl,}/5.12.4
</source>
 
==== Emulator ====
* u=devices,sstVirtualMachine=*,ou=virtual machines,ou=virtualization,ou=services,o=stepping-stone,c=ch
 
Change
<pre>
sstEmulator: /usr/bin/qemu-kvm
</pre>
to
<pre>
sstEmulator: /usr/bin/qemu-system-x86_64
</pre>
 
==== Source Port ====
* sstDisk=vda,ou=devices,sstVirtualMachine=*,ou=virtual machines,ou=virtualization,ou=services,dc=stoney-cloud,dc=org
* sstDisk=vdb,ou=devices,sstVirtualMachine=*,ou=virtual machines,ou=virtualization,ou=services,dc=stoney-cloud,dc=org
 
Add
<pre>
sstSourcePort: 24007
</pre>
 
==== Firewall / Subversion ====
If you are using our firewall scripts (libvirt-hooks based), you'll also have to upgrade subversion (on all the stoney cloud nodes):
<source lang='bash'>
cd /usr/local/scripts/netfilter/local/chains/vms
svn upgrade
cd /usr/local/scripts/netfilter/local/chains/$(hostname -s)
svn upgrade
</source>
 
=== Regular Update ===
Makes sure, your local portage tree is updated:
== Basic Testing Steps ==
Get your stoney cloud image:
<source lang='bash'>version=1.2.10.7 # stoney cloud version cd /var/virtualization/iso-choosable/ wget http://packages.stoney-cloud.org/stoney-cloud/pre-releases/1.2/iso/foss-cloud-installer-1.2.10.4${version}.iso chown apache:vm-storagefoss-cloud-installer-${version}.iso chmod 644 foss-cloud-installer-1${version}.2iso</source> Get the [http://www.10sysresccd.org/SystemRescueCd_Homepage SystemRescueCd] ISO:<source lang='bash'>version=4.5.1 # SystemRescueCd versionsha256="4fda2fce55a46c7b258fba10c88a4a337821c8b801a8cd3c344cc223a9c4436d" # SHA256 checksum of the ISOisoFile="systemrescuecd-x86-${version}.iso" cd /var/virtualization/iso-choosable/ wget http://sourceforge.net/projects/systemrescuecd/files/sysresccd-x86/${version}/${isoFile} # Check that the file was downloaded correctlyecho "${sha256} ${isoFile}" | sha256sum -c - chown apache:vm-storage ${isoFile}chmod 644 ${isoFile}</source>
Get a Fedora ISO image:
<source lang='bash'>version=21 # Fedora version cd /var/virtualization/iso-choosable/ wget http://downloadmirror.fedoraprojectswitch.orgch/pubftp/mirror/fedora/linux/releases/20${version}/FedoraServer/x86_64/iso/Fedora-20Server-netinst-x86_64-netinst${version}.iso chown apache:vm-storage Fedora-20Server-netinst-x86_64-netinst${version}.iso chmod 644 Fedora-20Server-netinst-x86_64-netinst${version}.iso</source>
Lernstick (Test):
<source lang='bash'>cd /var/virtualization/iso-choosable/ wget http://www.imedias.ch/dateien/lernstick-testversion/lernstick_debian7_2013-12-12.iso chown apache:vm-storage lernstick_debian7_2013-12-12.iso chmod 644 lernstick_debian7_2013-12-12.iso</source> Get your debian image:<source lang='bash'>version=8.0.0 # Debian version cd /var/virtualization/iso-choosable/wget http://cdimage.debian.org/debian-cd/${version}/amd64/iso-cd/debian-${version}-amd64-netinst.isochown apache:vm-storage debian-${version}-amd64-netinst.isochmod 644 debian-${version}-amd64-netinst.iso</source> Get your ubuntu desktop image:<source lang='bash'>version=14.04 # ubuntu version cd /var/virtualization/iso-choosable/wget http://mirror.switch.ch/ftp/mirror/ubuntu-cdimage/${version}/ubuntu-${version}-desktop-amd64.isochown apache:vm-storage ubuntu-${version}-desktop-amd64.isochmod 644 ubuntu-${version}-desktop-amd64.iso</source> Get your ubuntu server image:<source lang='bash'>version=14.04 # ubuntu version cd /var/virtualization/iso-choosable/wget http://mirror.switch.ch/ftp/mirror/ubuntu-cdimage/${version}/ubuntu-${version}-server-amd64.isochown apache:vm-storage ubuntu-${version}-server-amd64.isochmod 644 ubuntu-${version}-server-amd64.iso</source> Get a Windows 2012 Server R2 ISO image:<source lang='bash'>cd /var/virtualization/iso-choosable/wget http://care.dlservice.microsoft.com/dl/download/6/2/A/62A76ABB-9990-4EFC-A4FE-C7D698DAEB96/9600.17050.WINBLUE_REFRESH.140317-1640_X64FRE_SERVER_EVAL_EN-US-IR3_SSS_X64FREE_EN-US_DV9.ISO -O windows_server_2012_r2_64bit_en.isochown apache:vm-storage windows_server_2012_r2_64bit_en.isochmod 644 windows_server_2012_r2_64bit_en.iso</source> If you need the newest Windows Drivers ISO image, visit https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/archive-virtio/
Set three network ranges under https://192.168.140.10/vm-manager/subnet/index.html
Bureaucrat, administrator
38
edits