Linux remote boot

Source: Internet
Author: User
I. under what circumstances do I need to remotely start the instance? If our servers are not deployed locally (in fact this is the case, we host the servers in the IDC), and when more than one server is deployed in the IDC, then we can remotely connect to a server without shutdown... information & nbs

 

I. under what circumstances do I need to remotely start the instance?
If our servers are not deployed locally (normally, we host the servers in the IDC ),
In addition, there are more than one server in the data center. when one of the servers is disabled, we can remotely connect to a server without shutdown,
Then start the instance remotely.
 
2. software required for remote boot
It needs the software wakeonlan,
Where can I get it?
Its official site is: http://sourceforge.net/projects/wake-on-lan/
If you use an rpm package, you can download: http://dag.wieers.com/rpm/packages/wol/ from here
If you use fedora, you can run the yum command to install it:
Yum install wol

3. how to enable remote boot?
Do not rush to shut down your linux server first. Are you sure it supports remote boot?
Step 1: log on to the target server and run the ethtool command to print the Nic information.
[Root @ localhost lhd] # ethtool eth0
Settings for eth0:
Supported ports: [tp mii]
Supported link modes: 10 baseT/Half 10 baseT/Full
100 baseT/Half 100 baseT/Full
Supports auto-negotiation: Yes
Advertised link modes: 10 baseT/Half 10 baseT/Full
100 baseT/Half 100 baseT/Full
Advertised auto-negotiation: Yes
Speed: 100 Mb/s
Duplex: Full
Port: MII
PHYAD: 32
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: pumbg
Wake-on: d
Current message level: 0x00000007 (7)
Link detected: yes

As you can see, ethtool lists all the Nic information. we only care about these two items:
Supports Wake-on: pumbg
Wake-on: d
If the value of wake-on is d, wake on lan is disabled.
If the value is g, wake on lan is enabled.

Because wake on lan is disabled on this machine, use the following command to enable it:
[Root @ localhost lhd] # ethtool-s eth0 wol g

Run the ethtool command to view the information and you will find that:
Wake-on: g

OK. The Nic of the target machine supports remote boot. The local MAC address is as follows:
[Root @ localhost lhd] # ifconfig
Eth0 Link encap: Ethernet HWaddr 00: 03: 0D: 1D: 1F: 97
Inet addr: 192.168.6.101 Mask: 255.255.255.0
Up broadcast running multicast mtu: 1500 Metric: 1
RX packets: 34470 errors: 0 dropped: 0 overruns: 0 frame: 0
TX packets: 35377 errors: 0 dropped: 0 overruns: 0 carrier: 0
Collisions: 0 fig: 1000
RX bytes: 31559763 (30.0 MiB) TX bytes: 5340032 (5.0 MiB)
Interrupt: 5 Base address: 0x2c00
Record the HWaddr 00: 03: 0D: 1D: 1F: 97 item.

Now you can try to disable the target machine.


Step 2: Start the instance

Now we need to log on to the machine that has installed the wakeonlan software, and run the following command on it:

Wol 00: 03: 0D: 1D: 1F: 97
Later, you will find that the target machine has been started and can be logged on.

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.