KVM之从网上镜像安装虚拟机Centos6.10--04

确认镜像地址

CentOS6.10镜像地址
http://mirrors.163.com/centos/6.10/os/x86_64/

开始安装虚拟机

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
[root@kvm image]# virt-install --name vm3_from_internet --disk path=/kvm/image/vm3_from_internet,size=18 --ram 1024 --vcpus 1 --os-type linux --os-variant rhel6 --network bridge=br0 --location=http://mirrors.163.com/centos/6.10/os/x86_64/ --graphics none --console pty,target_type=serial --extra-args 'console=ttyS0,115200n8 serial' # 回车开始将会有一系列的输出在终端打印
Starting install...
Retrieving file vmlinuz... | 4.1 MB 00:00:00
Retrieving file initrd.img... | 39 MB 00:00:03
Allocating 'vm3_from_internet' | 18 GB 00:00:00
Connected to domain vm3_from_internet
Escape character is ^]
Initializing cgroup subsys cpuset
Initializing cgroup subsys cpu
Linux version 2.6.32-754.el6.x86_64 (mockbuild@x86-01.bsys.centos.org) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-23) (GCC) ) #1 SMP Tue Jun 19 21:26:04 UTC 2018
Command line: console=ttyS0,115200n8 serial method=http://mirrors.163.com/centos/6.10/os/x86_64/
KERNEL supported cpus:
Intel GenuineIntel
AMD AuthenticAMD
Centaur CentaurHauls
BIOS-provided physical RAM map:
BIOS-e820: 0000000000000000 - 000000000009fc00 (usable)
BIOS-e820: 000000000009fc00 - 00000000000a0000 (reserved)
BIOS-e820: 00000000000f0000 - 0000000000100000 (reserved)
BIOS-e820: 0000000000100000 - 000000003fff7000 (usable)
BIOS-e820: 000000003fff7000 - 0000000040000000 (reserved)
BIOS-e820: 00000000feffc000 - 00000000ff000000 (reserved)
BIOS-e820: 00000000fffc0000 - 0000000100000000 (reserved)
SMBIOS version 2.4 @ 0xF6210
SMBIOS 2.4 present.
Hypervisor detected: KVM
last_pfn = 0x3fff7 max_arch_pfn = 0x400000000
x86 PAT enabled: cpu 0, old 0x7040600070406, new 0x7010600070106
init_memory_mapping: 0000000000000000-000000003fff7000
RAMDISK: 3d8d8000 - 3ffefc9a
ACPI: Deleted _OSI(Windows 2012)
ACPI: Deleted _OSI(Windows 2013)
ACPI: RSDP 00000000000f61e0 00014 (v00 BOCHS )
ACPI: RSDT 000000003ffffad7 00030 (v01 BOCHS BXPCRSDT 00000001 BXPC 00000001)
ACPI: FACP 000000003ffff177 00074 (v01 BOCHS BXPCFACP 00000001 BXPC 00000001)
ACPI: DSDT 000000003fffe040 01137 (v01 BOCHS BXPCDSDT 00000001 BXPC 00000001)
ACPI: FACS 000000003fffe000 00040
ACPI: SSDT 000000003ffff1eb 00874 (v01 BOCHS BXPCSSDT 00000001 BXPC 00000001)
ACPI: APIC 000000003ffffa5f 00078 (v01 BOCHS BXPCAPIC 00000001 BXPC 00000001)
Setting APIC routing to flat.
No NUMA configuration found
Faking a node at 0000000000000000-000000003fff7000
Bootmem setup node 0 0000000000000000-000000003fff7000
NODE_DATA [0000000000009000 - 000000000003cfff]
bootmap [000000000003d000 - 0000000000044fff] pages 8
(7 early reservations) ==> bootmem [0000000000 - 003fff7000]
#0 [0000000000 - 0000001000] BIOS data page ==> [0000000000 - 0000001000]
#1 [0000006000 - 0000008000] TRAMPOLINE ==> [0000006000 - 0000008000]
#2 [0001000000 - 0002050a64] TEXT DATA BSS ==> [0001000000 - 0002050a64]
#3 [003d8d8000 - 003ffefc9a] RAMDISK ==> [003d8d8000 - 003ffefc9a]
#4 [000009fc00 - 0000100000] BIOS reserved ==> [000009fc00 - 0000100000]
#5 [0002051000 - 00020510b9] BRK ==> [0002051000 - 00020510b9]
#6 [0000008000 - 0000009000] PGTABLE ==> [0000008000 - 0000009000]
found SMP MP-table at [ffff8800000f6380] f6380
kvm-clock: Using msrs 4b564d01 and 4b564d00
kvm-clock: cpu 0, msr 0:1c3db81, boot clock
Zone PFN ranges:
DMA 0x00000001 -> 0x00001000
DMA32 0x00001000 -> 0x00100000
Normal 0x00100000 -> 0x00100000
Movable zone start PFN for each node
early_node_map[2] active PFN ranges
0: 0x00000001 -> 0x0000009f
0: 0x00000100 -> 0x0003fff7
ACPI: PM-Timer IO Port: 0x608
Setting APIC routing to flat.
ACPI: LAPIC (acpi_id[0x00] lapic_id[0x00] enabled)
ACPI: LAPIC_NMI (acpi_id[0xff] dfl dfl lint[0x1])
ACPI: IOAPIC (id[0x00] address[0xfec00000] gsi_base[0])
IOAPIC[0]: apic_id 0, version 17, address 0xfec00000, GSI 0-23
ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
ACPI: INT_SRC_OVR (bus 0 bus_irq 5 global_irq 5 high level)
ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)
ACPI: INT_SRC_OVR (bus 0 bus_irq 10 global_irq 10 high level)
ACPI: INT_SRC_OVR (bus 0 bus_irq 11 global_irq 11 high level)
Using ACPI (MADT) for SMP configuration information
SMP: Allowing 1 CPUs, 0 hotplug CPUs
PM: Registered nosave memory: 000000000009f000 - 00000000000a0000
PM: Registered nosave memory: 00000000000a0000 - 00000000000f0000
PM: Registered nosave memory: 00000000000f0000 - 0000000000100000
Allocating PCI resources starting at 40000000 (gap: 40000000:beffc000)
Booting paravirtualized kernel on KVM
NR_CPUS:4096 nr_cpumask_bits:1 nr_cpu_ids:1 nr_node_ids:1
PERCPU: Embedded 33 pages/cpu @ffff880002200000 s104088 r8192 d22888 u2097152
pcpu-alloc: s104088 r8192 d22888 u2097152 alloc=1*2097152
pcpu-alloc: [0] 0
kvm-clock: cpu 0, msr 0:2218b81, primary cpu clock
kvm-stealtime: cpu 0, msr 2212d00
Built 1 zonelists in Node order, mobility grouping on. Total pages: 258353
Policy zone: DMA32
Kernel command line: console=ttyS0,115200n8 serial method=http://mirrors.163.com/centos/6.10/os/x86_64/
PID hash table entries: 4096 (order: 3, 32768 bytes)
Memory: 976436k/1048540k available (5520k kernel code, 392k absent, 71712k reserved, 6909k data, 1340k init)
Kernel/User page tables isolation: enabled
Hierarchical RCU implementation.
NR_IRQS:33024 nr_irqs:256
Console: colour *CGA 80x25
console [ttyS0] enabled
allocated 4194304 bytes of page_cgroup
please try 'cgroup_disable=memory' option if you don't want memory cgroups
Detected 2099.902 MHz processor.
Calibrating delay loop (skipped) preset value.. 4199.80 BogoMIPS (lpj=2099902)
pid_max: default: 32768 minimum: 301
Security Framework initialized
SELinux: Initializing.
Dentry cache hash table entries: 131072 (order: 8, 1048576 bytes)
Inode-cache hash table entries: 65536 (order: 7, 524288 bytes)
Mount-cache hash table entries: 256
Initializing cgroup subsys ns
Initializing cgroup subsys cpuacct
Initializing cgroup subsys memory
Initializing cgroup subsys devices
Initializing cgroup subsys freezer
Initializing cgroup subsys net_cls
Initializing cgroup subsys blkio
Initializing cgroup subsys perf_event
Initializing cgroup subsys net_prio
mce: CPU supports 10 MCE banks
Speculative Store Bypass: Vulnerable
FEATURE SPEC_CTRL Not Present
FEATURE IBPB_SUPPORT Not Present
Spectre V2 : Mitigation: Full retpoline
alternatives: switching to unfair spinlock
SMP alternatives: switching to UP code
Freeing SMP alternatives: 38k freed
ACPI: Core revision 20090903
ftrace: converting mcount calls to 0f 1f 44 00 00
ftrace: allocating 22051 entries in 87 pages
Enabling x2apic
Enabled x2apic
APIC routing finalized to physical x2apic.
..TIMER: vector=0x30 apic1=0 pin1=2 apic2=-1 pin2=-1
CPU0: Intel Westmere E56xx/L56xx/X56xx (Nehalem-C) stepping 01
APIC calibration not consistent with PM-Timer: 93ms instead of 100ms
APIC delta adjusted to PM-Timer: 6249985 (5824949)
Performance Events: unsupported p6 CPU model 44 no PMU driver, software events only.
NMI watchdog disabled (cpu0): hardware events not enabled
Brought up 1 CPUs
Total of 1 processors activated (4199.80 BogoMIPS).
devtmpfs: initialized
regulator: core version 0.5
NET: Registered protocol family 16
ACPI: bus type pci registered
PCI: Using configuration type 1 for base access
bio: create slab <bio-0> at 0
ACPI: Interpreter enabled
ACPI: (supports S0 S5)
ACPI: Using IOAPIC for interrupt routing
ACPI: No dock devices found.
PCI: Using host bridge windows from ACPI; if necessary, use "pci=nocrs" and report a bug
ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-ff])
pci_root PNP0A03:00: host bridge window [io 0x0000-0x0cf7]
pci_root PNP0A03:00: host bridge window [io 0x0d00-0xffff]
pci_root PNP0A03:00: host bridge window [mem 0x000a0000-0x000bffff]
pci_root PNP0A03:00: host bridge window [mem 0x40000000-0xfebfffff]
PCI host bridge to bus 0000:00
pci_bus 0000:00: root bus resource [io 0x0000-0x0cf7]
pci_bus 0000:00: root bus resource [io 0x0d00-0xffff]
pci_bus 0000:00: root bus resource [mem 0x000a0000-0x000bffff]
pci_bus 0000:00: root bus resource [mem 0x40000000-0xfebfffff]
pci 0000:00:01.3: quirk: [io 0x0600-0x063f] claimed by PIIX4 ACPI
pci 0000:00:01.3: quirk: [io 0x0700-0x070f] claimed by PIIX4 SMB
ACPI: PCI Interrupt Link [LNKA] (IRQs 5 *10 11)
ACPI: PCI Interrupt Link [LNKB] (IRQs 5 *10 11)
ACPI: PCI Interrupt Link [LNKC] (IRQs 5 10 *11)
ACPI: PCI Interrupt Link [LNKD] (IRQs 5 10 *11)
ACPI: PCI Interrupt Link [LNKS] (IRQs *9)
vgaarb: loaded
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
PCI: Using ACPI for IRQ routing
NetLabel: Initializing
NetLabel: domain hash size = 128
NetLabel: protocols = UNLABELED CIPSOv4
NetLabel: unlabeled traffic allowed by default
Switching to clocksource kvm-clock
pnp: PnP ACPI init
ACPI: bus type pnp registered
pnp: PnP ACPI: found 6 devices
ACPI: ACPI bus type pnp unregistered
NET: Registered protocol family 2
IP route cache hash table entries: 32768 (order: 6, 262144 bytes)
TCP established hash table entries: 131072 (order: 9, 2097152 bytes)
TCP bind hash table entries: 65536 (order: 8, 1048576 bytes)
TCP: Hash tables configured (established 131072 bind 65536)
TCP reno registered
NET: Registered protocol family 1
pci 0000:00:00.0: Limiting direct PCI/PCI transfers
pci 0000:00:01.0: PIIX3: Enabling Passive Release
pci 0000:00:01.0: Activating ISA DMA hang workarounds
ACPI: PCI Interrupt Link [LNKD] enabled at IRQ 11
pci 0000:00:04.0: PCI INT A -> Link[LNKD] -> GSI 11 (level, high) -> IRQ 11
pci 0000:00:04.0: PCI INT A disabled
ACPI: PCI Interrupt Link [LNKA] enabled at IRQ 10
pci 0000:00:04.1: PCI INT B -> Link[LNKA] -> GSI 10 (level, high) -> IRQ 10
pci 0000:00:04.1: PCI INT B disabled
ACPI: PCI Interrupt Link [LNKB] enabled at IRQ 10
pci 0000:00:04.2: PCI INT C -> Link[LNKB] -> GSI 10 (level, high) -> IRQ 10
pci 0000:00:04.2: PCI INT C disabled
ACPI: PCI Interrupt Link [LNKC] enabled at IRQ 11
pci 0000:00:04.7: PCI INT D -> Link[LNKC] -> GSI 11 (level, high) -> IRQ 11
pci 0000:00:04.7: PCI INT D disabled
Trying to unpack rootfs image as initramfs...
Freeing initrd memory: 40031k freed
sha256_ssse3: Using SSSE3 optimized SHA-256 implementation
futex hash table entries: 256 (order: 2, 16384 bytes)
audit: initializing netlink socket (disabled)
type=2000 audit(1594113609.004:1): initialized
HugeTLB registered 2 MB page size, pre-allocated 0 pages
VFS: Disk quotas dquot_6.5.2
Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
msgmni has been set to 1985
ksign: Installing public key data
Loading keyring
- Added public key 283EE91FE7BCC01A
- User ID: CentOS (Kernel Module GPG key)
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 250)
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered (default)
pci_hotplug: PCI Hot Plug PCI Core version: 0.5
pciehp: PCI Express Hot Plug Controller Driver version: 0.4
acpiphp: ACPI Hot Plug PCI Controller Driver version: 0.5
acpiphp: Slot [2] registered
acpiphp: Slot [3] registered
acpiphp: Slot [5] registered
acpiphp: Slot [6] registered
acpiphp: Slot [7] registered
acpiphp: Slot [8] registered
acpiphp: Slot [9] registered
acpiphp: Slot [10] registered
acpiphp: Slot [11] registered
acpiphp: Slot [12] registered
acpiphp: Slot [13] registered
acpiphp: Slot [14] registered
acpiphp: Slot [15] registered
acpiphp: Slot [16] registered
acpiphp: Slot [17] registered
acpiphp: Slot [18] registered
acpiphp: Slot [19] registered
acpiphp: Slot [20] registered
acpiphp: Slot [21] registered
acpiphp: Slot [22] registered
acpiphp: Slot [23] registered
acpiphp: Slot [24] registered
acpiphp: Slot [25] registered
acpiphp: Slot [26] registered
acpiphp: Slot [27] registered
acpiphp: Slot [28] registered
acpiphp: Slot [29] registered
acpiphp: Slot [30] registered
acpiphp: Slot [31] registered
input: Power Button as /devices/LNXSYSTM:00/LNXPWRBN:00/input/input0
ACPI: Power Button [PWRF]
[Firmware Bug]: No valid trip found
GHES: HEST is not enabled!
Non-volatile memory driver v1.3
Linux agpgart interface v0.103
crash memory driver: version 1.1
Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
ial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
00:05: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
brd: module loaded
loop: module loaded
input: Macintosh mouse button emulation as /devices/virtual/input/input1
Fixed MDIO Bus: probed
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ehci_hcd 0000:00:04.7: PCI INT D -> Link[LNKC] -> GSI 11 (level, high) -> IRQ 11
ehci_hcd 0000:00:04.7: EHCI Host Controller
ehci_hcd 0000:00:04.7: new USB bus registered, assigned bus number 1
ehci_hcd 0000:00:04.7: irq 11, io mem 0xfebc1000
ehci_hcd 0000:00:04.7: USB 2.0 started, EHCI 1.00
usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb1: Product: EHCI Host Controller
usb usb1: Manufacturer: Linux 2.6.32-754.el6.x86_64 ehci_hcd
usb usb1: SerialNumber: 0000:00:04.7
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 6 ports detected
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
uhci_hcd: USB Universal Host Controller Interface driver
uhci_hcd 0000:00:04.0: PCI INT A -> Link[LNKD] -> GSI 11 (level, high) -> IRQ 11
uhci_hcd 0000:00:04.0: UHCI Host Controller
uhci_hcd 0000:00:04.0: new USB bus registered, assigned bus number 2
uhci_hcd 0000:00:04.0: irq 11, io base 0x0000c060
usb usb2: New USB device found, idVendor=1d6b, idProduct=0001
usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb2: Product: UHCI Host Controller
usb usb2: Manufacturer: Linux 2.6.32-754.el6.x86_64 uhci_hcd
usb usb2: SerialNumber: 0000:00:04.0
usb usb2: configuration #1 chosen from 1 choice
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 2 ports detected
uhci_hcd 0000:00:04.1: PCI INT B -> Link[LNKA] -> GSI 10 (level, high) -> IRQ 10
uhci_hcd 0000:00:04.1: UHCI Host Controller
uhci_hcd 0000:00:04.1: new USB bus registered, assigned bus number 3
uhci_hcd 0000:00:04.1: irq 10, io base 0x0000c080
usb usb3: New USB device found, idVendor=1d6b, idProduct=0001
usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb3: Product: UHCI Host Controller
usb usb3: Manufacturer: Linux 2.6.32-754.el6.x86_64 uhci_hcd
usb usb3: SerialNumber: 0000:00:04.1
usb usb3: configuration #1 chosen from 1 choice
hub 3-0:1.0: USB hub found
hub 3-0:1.0: 2 ports detected
uhci_hcd 0000:00:04.2: PCI INT C -> Link[LNKB] -> GSI 10 (level, high) -> IRQ 10
uhci_hcd 0000:00:04.2: UHCI Host Controller
uhci_hcd 0000:00:04.2: new USB bus registered, assigned bus number 4
uhci_hcd 0000:00:04.2: irq 10, io base 0x0000c0a0
usb usb4: New USB device found, idVendor=1d6b, idProduct=0001
usb usb4: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb4: Product: UHCI Host Controller
usb usb4: Manufacturer: Linux 2.6.32-754.el6.x86_64 uhci_hcd

第一步

配置IP

应用配置

使用文本模式

欢迎界面

全部重新初始化

设置时间

设置root密码

分区确认

改变所有磁盘

剩下的就是漫长的安装等待过长

安装完毕后重启即可

至此可以看到已经安装完成

退出安装好的虚拟机

退出当前虚拟机。退出虚拟控制台使用键盘上的 Ctrl + ] 键。

查看当前虚拟机运行状态

1
2
3
4
[root@kvm image]# virsh list
Id Name State
----------------------------------------------------
6 vm3_from_internet running

再次使用virsh连接vm3_from_internet

1
2
3
4
5
6
7
8
9
10
[root@kvm ~]# virsh console vm3_from_internet
Connected to domain vm3_from_internet
Escape character is ^]
CentOS release 6.10 (Final)
Kernel 2.6.32-754.el6.x86_64 on an x86_64
localhost.localdomain login: root
Password:
Last login: Tue Jul 7 09:35:38 on ttyS0

关于console连接虚拟机的说明

        为什么我们可以使用console连接通过网络安装的虚拟机呢?是因为在进行网络安装的时候使用了这些参数:–console pty,target_type=serial –extra-args ‘console=ttyS0,115200n8 serial’ ,而这些参数不支持本地镜像安装。当然,如果你硬是想要用virsh console 去连接本地安装的虚拟机 ,那也是可以的。只不过,要登录登陆本地虚拟机做以下配置:

在 /etc/securetty 文件中添加登录控制台ttyS0: 

1
[root@vm1 ~]# echo "ttyS0" >> /etc/securetty

在grub 配置文件中加入 console=ttyS0 (注:该配置必须与kernel 在同一行,不允许在新行)

1
2
3
4
5
6
7
8
9
[root@vm1 ~]# egrep -v '^$|#' /etc/grub.conf
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title CentOS 6 (2.6.32-754.el6.x86_64)
root (hd0,0)
kernel /vmlinuz-2.6.32-754.el6.x86_64 ro root=/dev/mapper/VolGroup-lv_root rd_NO_LUKS LANG=en_US.UTF-8 rd_NO_MD rd_LVM_LV=VolGroup/lv_swap SYSFONT=latarcyrheb-sun16 crashkernel=auto rd_LVM_LV=VolGroup/lv_root KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet console=ttyS0
initrd /initramfs-2.6.32-754.el6.x86_64.img

在初始化启动模式文件中加入 S0:12345:respawn:/sbin/agetty ttyS0 115200

1
[root@vm1 ~]# echo "S0:12345:respawn:/sbin/agetty ttyS0 115200" >> /etc/inittab

重启虚拟机

1
[root@vm1 ~]# init 6

重启完成后在kvm物理机上通过console连接

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
[root@kvm ~]# virsh console vm1
Connected to domain vm1
Escape character is ^]
CentOS release 6.10 (Final)
Kernel 2.6.32-754.el6.x86_64 on an x86_64
localhost.localdomain login: root
Password:
Last login: Tue Jul 7 20:32:13 from 192.168.0.43
i[root@vm1 ~]# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
link/ether 52:54:00:28:93:1d brd ff:ff:ff:ff:ff:ff

        通过主机名可以看到已经成功登陆

分享到