|
Login |
Getting imagesThe images from INRIA can be downloaded from https://transfert.inria.fr. KVMKVM: Get virtual machine imagesLinks for downloading 2.1 XOS images, their checksums and their virsh configuration files:
The first 3 images have been built using 2.1 iso and xos-node3 using 2.1.1 iso. The image files are of type qcow2 (using raw format ends with file-system corruption on my Ubuntu 9.10). You need to install at least the xos-core image as it supports all core services of XtreemOS. KVM: Configure the networkFor these images, the default KVM network is configured as follow (file /var/lib/libvirt/network/default.xml on my ubuntu): <network> <name>default</name> <uuid>f7c4b917-29ae-7614-1a3e-8c542f5c7205</uuid> <forward mode='nat'/> <bridge name='virbr0' stp='on' forwardDelay='0' /> <ip address='192.168.122.1' netmask='255.255.255.0'> <dhcp> <range start='192.168.122.2' end='192.168.122.254' /> <host mac='54:52:00:00:10:00' ip='192.168.122.10' /> <host mac='54:52:00:00:10:01' ip='192.168.122.11' /> <host mac='54:52:00:00:10:02' ip='192.168.122.12' /> <host mac='54:52:00:00:10:03' ip='192.168.122.13' /> <host mac='54:52:00:00:10:04' ip='192.168.122.14' /> <host mac='54:52:00:00:10:05' ip='192.168.122.15' /> </dhcp> </ip> </network> Using this configuration, KVM provides IP addresses and network configuration through DHCP. KVM also forwards access to DNS through the guest, extended with the guest /etc/hosts file. So, you should add the following lines to the guest /etc/hosts file. 192.168.122.10 xos-core.xtreemos.eu xos-core 192.168.122.11 xos-node1.xtreemos.eu xos-node1 192.168.122.12 xos-node2.xtreemos.eu xos-node2 192.168.122.13 xos-node3.xtreemos.eu xos-node3 KVM: Extract the imagesExtract the images (it will take about 10min): bunzip2 xos-core.img.bz2 bunzip2 xos-node1.img.bz2 Beware that the decompressed img files can be quite big (10+GB). However, these files are sparse so you can save lots of disk space using the following commands instead: bzcat -k xos-core.img.bz2 | cp --sparse=always /dev/stdin xos-core.img bzcat -k xos-node1.img.bz2 | cp --sparse=always /dev/stdin xos-node1.img KVM: Configure the virtual machinesThen edit xos-core.xml and xos-node1.xml: provide correct pathname for xos-core.img and xos-node1.img. You must enter the image localizations in their XML files — in the <disk> tag. For example, by replacing this path /VM/xos-node1.img' by the right path. <disk type='file' device='disk'> <source file='/VM/xos-node1.img'/> <target dev='hda' bus='ide'/> </disk> KVM: Start the core nodeThe following command should start the core node. sudo virsh create xos-core.xml Alternative: sudo virsh define xos-core.xml sudo virsh start xos-core Please check the virsh documentations if necessary. Note that it also possible to manage virtual machines using the virt-manager GUI. KVM: Preconfigured usersUnix accounts: yvon and root
KVM: Log in the xos-coreAs you have already started the xos-core, you can log in through a normal (non virtual) terminal as follows. Remember that yvon's password is xtreemos. $ ssh yvon@192.168.122.10 yjegou@paralombre:~$ ssh yvon@192.168.122.10 Last login: Fri Jun 11 11:53:29 2010 from 192.168.122.1 yvon@xos-core ~$ You can also use the core node host name if it has been entered in the guest /etc/hosts file. yjegou@paralombre:~$ ssh yvon@xos-core Last login: Thu May 27 11:24:03 2010 from 192.168.122.1 yvon@xos-core ~$ Same procedures for other nodes. Note that the configuration of the VMs does not allow root to connect directly on the nodes using a password: the ssh key is mandatory. If you want to allow ditect connection for root, you should first transfer your ssh public key with scp using account yvon, connect as yvon, become root using su and install your ssh public key in /root/.ssh/authorized_keys2. KVM: Re-configuration of nodesThese virtual machine are already configured using the xosautoconfig tool. However, if you modify some configuration parameters, the node IP addresses for instance, it is necessary to report these modifications XtreemOS configuration files. In the general case, running command xosautoconfig as root should automatically update these files. If you want to change the hostname and/or IP, you can either edit the /var/lib/libvirt/network/default.xml and /etc/hosts of the guest or provide a /etc/hosts file on all hosts. If you install this file in /etc/xos/xosautoconfig/conf/etc/hosts, xosautoconfig will automatically replicate it in /etc/hosts. KVM: Problem with expired user certificateThe virtual machines come with already installed service and user certificates. As the validy of user certificates is 1 month by default, those installed in the images might be obsolete. If you have one of the following errors when you run xps, you need to regenerate the user certificate. root@xos-core ~# xps -a xps: Error getting user jobs: -1 (Generic exception) certificate expired on 20100527115829GMT+00:00 root@xos-core ~# root@xos-node1 ~# xps -a xps: Error getting user jobs: -1 (Generic exception) NotAfter: Thu May 27 13:58:29 CEST 2010 root@xos-node1 ~# Use the following request to renew the certificate: root@xos-core ~# mv /root/.xos/truststore/certs/yvon.crt /root/.xos/truststore/certs/yvon-prev.crt root@xos-core ~# get-xos-cert xos-core:6730 vo-yvon users -u yvon -P xtreemos -K /root/.xos/truststore/private/yvon.key -k /root/.xos/truststore/private/yvon.key-new.key -c /root/.xos/truststore/certs/yvon.crt Enter user password: Warning: certificate presented by remote host xos-core belongs to xos-core.xtreemos.eu - carrying on as you requested to ignore CDA host certificates which don't belong to the CDA server you connected to. You should only use any credentials issued for testing purposes. Saving certificate chain (user+CDA) in /root/.xos/truststore/certs/yvon-new.crt. root@xos-core ~# (note that it seems necessary to provide the -k option to get-xos-cert also no new key is generated) VitrualBoxThe VirtualBox? VM's were created on VirtualBox? 3.1.4 and 3.1.6. It is our experience the VirtualBox? packages on recent Ubuntu are problematic and installing the latest packages provided at http://virtualbox.org are more reliable. The images can be downloaded as follows: https://transfert.inria.fr/fichiers/d300fdfd52056772b6adee3a8b224fe5/2.1core-32bit.7z https://transfert.inria.fr/fichiers/4ae6c65ef8533d12d7de2b978f43a789/2.1.1.64core.7z https://transfert.inria.fr/fichiers/0ab1628fbe1e9a925bbac369d9c70962/2.1.1.64resource.7z SHA1SUMS 3d693fcb93cb235cc2a8204d13799e5136399f27 2.1core-32bit.7z 05698f589e198426d4b90051be2fb96c14ad48dd 2.1.1.64resource.7z cbddf9b49a4d1bba742ec01bfc9c31262d194645 2.1.1.64core.7z To minimize download time, I have compressed them with lzma compression, so to extract you need 7zip, which can be downloaded from: http://www.7-zip.org/ Tools exist for almost every platform. If you use a Debian-based distibution, those should be the packages to install: sudo aptitude install p7zip-full InstallationUnder VirtualBox?Once Imported, I recommend giving the VM 512Mb or more of ram for the resource node and 768Mb of ram for the coreservices node. VirtualBox? may fail to run the image if hardware virtualization (VT-x/AMD-V under system/acceleration) is not selected. On some systems VT-x/AMD-V also has to be enabled in the BIOS for it to work. ConfigurationThe core node can be used alone: it is also a resource node. For the resource node installation, use the same procedure. 32 Bit MachinesThe network configuration of the images are static and use private IP addresses:192.168.56.101 coredemo.xtreemos.eu 192.168.56.102 demonode1.xtreemos.eu 64 Bit Machines192.168.56.102 xos-core.xtreemos.eu192.168.56.103 xos-node1.xtreemos.eu These nodes are configured using host only networking, thus if you need to access the internet, it is best to enable eth1 (the second network card) in VirtualBox?, run the internet tasks and then ifdown eth1, before running XtreemOS jobs. If you change the networking to NAT VirtualBox? will automatically assign 10.0.0.x to VMs, so you may need to change IP's within the configuration if running more than one node. Known problemsSometime, it seems that the dixi of the resource node is not connected to the core node. grep ERR /var/log/xosd/xosd to check that everything is OK. If not, restart xosd. Preconfigured usersUnix accounts: xtreemos and xuser
Note: Installing virshLet's use the virsh to help us when managing images. To install virsh in Debian-based distributions, you should just install the libvirt-bin package. As follows, we do it by using aptitude: aptitude install libvirt-bin Configuring virsh (libvirt)In our case, we use NAT forwarding (aka virtual networks). So follow this page . If you have a problem as the following one: $ sudo virsh net-start default Connecting to uri: qemu:///system error: Failed to start network default error: internal error 'dnsmasq --strict-order --bind-interfaces --pid-file=/var/run/libvirt/network/default.pid --conf-file= --listen-address 192.168.122.1 --except-interface lo --dhcp-range 192.168.122.2,192.168.122.254' exited with non-zero status 2 and signal 0: dnsmasq: failed to bind listening socket for 192.168.122.1: Address already in use ...sttoping dnsmasq should solve it: /etc/init.d/dnsmasq stop Now, let's run the virsh terminal: $ sudo virsh Connecting to uri: qemu:///system Welcome to virsh, the virtualization interactive terminal. Type: 'help' for help with commands 'quit' to quit virsh # So, you can play with virsh commands. For example, listing the virtual machines: virsh # list Id Name State 7 xos-core running SupportDo not hesitate to join us on IRC #xtreemos-dev on irc.freenode.net if you need help. Good luck. Created by: admin last modification: Tuesday 06 of July, 2010 [08:55:47 UTC] by plinnell |
Search Google Search |