This doc is deprecated. See [Ubuntu_Quick_Start].
Ubuntu support has been enhanced.
The Ubuntu support has been enhanced over that described in the Ubuntu/Debian Notes. Debian support may have been enhanced as a side effect, but such was not the goal, nor was it tested.
The enhancements encompass being able to provision KVM client and typical clients stateful and stateless compute nodes with Ubuntu 10.10, RHEL 6.0, and SLES 11 from a KVM client Ubuntu 10.10 xCAT management node.
The following OSs have been tested to work as MN, At this moment of time debian 7 (wheezy) and ubuntu 12.04 (precise) are unsupported, due to the incompatibility of some of the perl libraries such as Digest::SHA1
The following OSs have been tested. Anything that is not listed may still work, but is untested at the moment.
Maverick Meerkat Ubuntu is available on this page:
Specifically, these links on that page:
All instructions follow a format which uses line prefix characters to indicate how to interpret the information that follows them:
! - self-explanatory action to take # - comments on either a command to run or content to add to a file > - command to run
All other lines are file content.
Download/Checkout the xcat-core trunk development branch:
> mkdir /root/devel/xcat-core > cd /root/devel/xcat-core > svn co http://xcat.svn.sourceforge.net/svnroot/xcat/xcat-core/trunk > mkdir /root/devel/xcat-dep > cd /root/devel/xcat-dep > svn co http://xcat.svn.sourceforge.net/svnroot/xcat/xcat-dep/trunk
Install ubuntu dependencies
> apt-get install debhelper devscripts quilt libsoap-lite-perl libdigest-sha1-perl libdbi-perl reprepro
Run the build-ubunturepo script to create your local repository. The build-ubunturepo incorporates the build of the repo so that all supported OSs get a repository made, at the moment, maverick, natty, oneiric and precise are included. More will be included later, it could be that I can easily add etch, and squeeze to the list as well.
See the usage of the script:
> ./build-ubunturepo Eg. xcat-core source code: /root/devel/xcat-core/trunk xcat-dep source code: /root/devel/xcat-dep/trunk repository: /root/repo/ubuntu > ./build-ubunturepo -c /root/devel/xcat-core/trunk -d /root/devel/xcat-dep/trunk -l /root/repo/ubuntu
This script will run "build-debs-all", which will build each individual deb packages for all xcat source tools.
When the script is done, Run the following commands to add the repository to the apt sources
> cd /root/repo/ubuntu/xcat-core > ./mklocalrepo.sh > cd /root/repo/ubuntu/xcat-dep > ./mklocalrepo.sh
# for each *.deb file built under xcat-core > reprepro -b <XCAT-CORE-REPO-TARGET-PATH> includedeb maverick <PACKAGE>.deb > cp -f <XCAT-CORE-PACKAGE-SOURCE-PATH>/<PACKAGE>.deb <XCAT-CORE-REPO-TARGET-PATH>/ # for each *.deb file built under xcat-dep > reprepro -b <XCAT-DEP-REPO-TARGET-PATH> includedeb maverick <PACKAGE>.deb > cp -f <XCAT-DEP-PACKAGE-SOURCE-PATH>/<PACKAGE>.deb <XCAT-DEP-REPO-TARGET-PATH>/
NOTE: a reprepro man page (not necessarily definitive): http://mirrorer.alioth.debian.org/reprepro.1.html
NOTE: All actions are performed on the management node.
! login to the administrative account (i.e. name specified when you installed Ubuntu) # create a root login > sudo passwd root ! logout and login as root # put the following in /etc/apt/sources.list.d/xcat-repo.list deb TODO-HTTP-URL-TOP/xcat-core/ maverick main deb TODO-HTTP-URL-TOP/xcat-dep/ maverick main # update apt's view of repositories > apt-get update # install xcat (answer yes to all questions) > apt-get install xcat ! logout and login as root so xcat utilities are in root's PATH # workaround to create /install/postscripts/hostkeys > xcatconfig -s # put the following in /etc/xinetd.d/tftpd service tftp { protocol = udp port = 69 socket_type = dgram wait = yes user = nobody server = /usr/sbin/in.tftpd server_args = /tftpboot disable = no } # start tftp > /etc/init.d/xinetd restart # configure vsftpd by altering /etc/vsftpd.conf so that, in addition # to other things, it contains these lines (search on the keys listed # so see if they already exist and their values change, otherwise add # the lines) anonymous_enable=YES anon_root=/install # restart vsftpd > service vsftpd restart # restart apache > /etc/init.d/apache2 restart # ALL FOLLOWING STEPS ARE OPTIONAL (configuration so the 'rinstall' command works) # install openssh-server on the management node > apt-get install openssh-server # [management node] give kvm host the management node's public ssh key > ssh-copy-id root@KVM_HOST_IP_ADDRESS
Opening a VNC graphics console through Virtual Machine Manager is discouraged because of two bugs. "virsh console VM_NAME" should be used instead. See - "APPENDIX: CONSOLE-RELATED BUGS" below for details. Also, "virsh console VM_NAME" is best run in a plain terminal window (as opposed to, say, a gnu screen terminal), and must be run again every time a node is rebooted.
> rmdef NODE_SHORT_HOSTNAME
> chtab key=system passwd.username=root passwd.password=ROOT_PASSWORD
! [management node] get ubuntu iso to the management node
> copycds PATH_TO_ISO
> rm -f PATH_TO_ISO
! [kvm host] Create a new kvm guest node named NODE_SHORT_HOSTNAME in the previously
! created network, whose boot order is network,hd. If the node automatically starts,
! force it off. Boot order can be adjusted through a Virtual Machine Manager console
! to the new node via View->Details->Boot Options -OR- (preferred) via
! "virsh edit NODE_SHORT_HOSTNAME", and being sure the <os></os> stanza contains
! boot devices ordered as follows:
!
! <boot dev='network'/>
! <boot dev='hd'/>
! [kvm host] discover the new node's NODE_NETWORK_INTERFACE_MAC_ADDRESS
! (examine output of "virsh dumpxml NODE_SHORT_HOSTNAME | grep "mac address"")
! [kvm host] discover the new node's MEMORY
! (examine output of "virsh dumpxml NODE_SHORT_HOSTNAME | grep "currentMemory"")
! (value should be in megabytes.. e.g. if the above shows '524288', use '512' for MEMORY)
! [kvm host] discover the new node's VM_CPUS
! (examine output of "virsh dumpxml NODE_SHORT_HOSTNAME | grep "vcpu"")
! [kvm host] discover the BRIDGE_NIC_ASSOCIATED_WITH_PRIVATE_NETWORK
! (examine output of "virsh net-dumpxml NETWORK_NAME | grep "bridge name"")
! (name will look like 'virbr*')
nodeadd NODE_SHORT_HOSTNAME groups=all,system hosts.ip=NODE_IP_ADDRESS mac.mac=NODE_NETWORK_INTERFACE_MAC_ADDRESS nodehm.mgt=kvm nodehm.power=kvm nodehm.serialport=0 nodehm.serialspeed=115200 noderes.netboot=pxe noderes.tftpserver=MANAGEMENT_NODE_IP_ADDRESS noderes.nfsserver=MANAGEMENT_NODE_IP_ADDRESS noderes.monserver=MANAGEMENT_NODE_IP_ADDRESS noderes.installnic=eth0 noderes.primarynic=eth0 noderes.discoverynics=eth0 noderes.xcatmaster=MANAGEMENT_NODE_IP_ADDRESS nodetype.os=DISTRO nodetype.arch=ARCH nodetype.profile=compute nodetype.provmethod=install nodetype.nodetype=vm vm.cpus=VM_CPUS vm.host=KVM_HOST_IP_ADDRESS vm.memory=MEMORY vm.nics=BRIDGE_NIC_ASSOCIATED_WITH_PRIVATE_NETWORK vm.storage=/var/lib/libvirt/images
> makehosts
> makedhcp -n
> /etc/init.d/dhcp3-server restart
nodeset NODE_SHORT_HOSTNAME install
! [kvm host] force the provisionable node off, close any graphical console session
! to it (see: "APPENDIX: CONSOLE-RELATED BUGS" for why)
> virsh start NODE_SHORT_HOSTNAME
> virsh console NODE_SHORT_HOSTNAME
> rinstall NODE_SHORT_HOSTNAME
> virsh console NODE_SHORT_HOSTNAME
The stateless provisioning has changed significantly to when first started. The initial genimage that was posted was a copy of the genimaged from the redhat folders, and not much was added. The current release as of Apr 30 in trunk, we have a new genimage that will work which requires busybox-static in ubuntu 10.10
Both "nodeset" and "rinstall" result in a PXE boot configuration file (per node) which specifies "console=" more than once in the kernel parameters list. This somehow hangs the display of the kernel boot when viewed in a VNC graphics console opened through Virtual Machine Manager. Therefore, one should avoid using that kind of console, and instead watch provisioning progress via the following on the KVM host:
> virsh console VM_NAME
(exit the console via Ctrl-])
The VNC graphics console can be used as usual after provisioning is complete.
HOWEVER, an xcat bug sets an encrypted, unknown password on the VNC session. In order to view the VNC graphics console, perform just ONE of the following:
THEN enter the password you've supplied, and click the "Login" button