VMwate + Ubuntu cluster configuration (SSH without password)

Source: Internet
Author: User
Sometimes we do operations on the cluster, and there is no real machine to build the environment, then we can use a virtual machine to simulate a cluster environment. Although the performance is extremely low, the intuitive and easy operation is not comparable to the real cluster. My computer is a 64-bit Windows 7, corei7 quad-core processor, 8 GB memory desktop, I built four Ubuntu in VMware, each virtual machine 1 CPUcore, MB memory. Four virtual machines run without pressure. Previous Article (SLURM installation configuration http :/

Sometimes we do operations on the cluster, and there is no real machine to build the environment, then we can use a virtual machine to simulate a cluster environment. Although the performance is extremely low, the intuitive and easy operation is not comparable to the real cluster. My computer is a 64-bit Windows 7, corei7 quad-core processor, 8 GB memory desktop, I built four Ubuntu in VMware, each virtual machine has one CPU core, MB memory. Four virtual machines run without pressure.

The previous article (SLURM installation configuration http://www.linuxidc.com/Linux/2012-10/71552.htm) is actually a job of cluster configuration, but it is installed on a single node. Then I copied three copies of the VM.

The first thing to do is to connect machines. Use the default NAT network configuration in VMware to implement mutual communication between virtual machines. As we all know, IP addresses are very difficult to enter, so we hope to give each machine a name. For example, my name is master, worker1, worker2, and worker3. Each computer has a name. You can modify it in/etc/hostname. After modification, restart and refresh. We also need to let the machine know the name of another machine. Of course, please ignore me when doing DNS resolution or anything. Before the DNS appears, we still have the/etc/hosts file available. Modify the content.

102.16124.129 master

102.16124.132 worker1


102.16124.143 worker2


102.16124.20.worker3


Ssh is a common tool in linux. In scientific computing, ssh is required for running MPI, And the password cannot be entered manually. Therefore, we need to configure an ssh environment without a password.

I am very lazy, reference http://www.linuxidc.com/Linux/2011-04/35116.htm

(1) On the master

Ssh-keygen-t rsa

Press ENTER

(2) On the master

Cat id_rsa.pub> authorized_keys

(3) copy the id_rsa, id_rsa.pub, and authorized_keys files to the/home/username/. ssh/directory of all machines.

Finished.

Finally, run SLURM on multiple computers.

Www.linuxidc.com @ master :~ $ Sinfo
PARTITION AVAIL TIMELIMIT NODES STATE NODELIST
Debug * up infinite 3 idle worker [1-3]
Www.linuxidc.com @ master :~ $ Srun-N3-l/bin/hostname
1: worker2
0: worker1
2: worker3

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.