分享

请各位大侠帮忙看看虚拟机获取不到IP的问题。

luoyupeng 发表于 2015-12-2 22:40:15 [显示全部楼层] 回帖奖励 阅读模式 关闭右栏 4 34366

info: initramfs: up at 0.68
NOCHANGE: partition 1 is size 2072385. it cannot be grown
info: initramfs loading root from /dev/vda1
info: /etc/init.d/rc.sysinit: up at 0.74
info: container: none
Starting logging: OK
Initializing random number generator... done.
Starting acpid: OK
cirros-ds 'local' up at 0.82
no results found for mode=local. up 0.84. searched: nocloud configdrive ec2
Starting network...
udhcpc (v1.20.1) started
Sending discover...
Sending discover...
Sending discover...
Usage: /sbin/cirros-dhcpc <up|down>
No lease, failing
WARN: /etc/rc3.d/S40-network failed
cirros-ds 'net' up at 181.01
checking http://169.254.169.254/2009-04-04/instance-id
failed 1/20: up 181.02. request failed
failed 2/20: up 183.04. request failed
failed 3/20: up 185.05. request failed
failed 4/20: up 187.06. request failed
failed 5/20: up 189.07. request failed
failed 6/20: up 191.08. request failed
failed 7/20: up 193.09. request failed
failed 8/20: up 195.10. request failed
failed 9/20: up 197.11. request failed
failed 10/20: up 199.12. request failed
failed 11/20: up 201.13. request failed
failed 12/20: up 203.14. request failed
failed 13/20: up 205.15. request failed
failed 14/20: up 207.16. request failed
failed 15/20: up 209.17. request failed
failed 16/20: up 211.18. request failed
failed 17/20: up 213.19. request failed
failed 18/20: up 215.20. request failed
failed 19/20: up 217.21. request failed
failed 20/20: up 219.22. request failed
failed to read iid from metadata. tried 20
no results found for mode=net. up 221.23. searched: nocloud configdrive ec2
failed to get instance-id of datasource
Starting dropbear sshd: OK
=== system information ===
Platform: Fedora Project OpenStack Nova
Container: none
Arch: x86_64
CPU(s): 1 @ 2094.748 MHz
Cores/Sockets/Threads: 1/1/1
Virt-type:
RAM Size: 491MB
Disks:
NAME MAJ:MIN       SIZE LABEL         MOUNTPOINT
vda  253:0   1073741824               
vda1 253:1   1061061120 cirros-rootfs /
=== sshd host keys ===
-----BEGIN SSH HOST KEY KEYS-----
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgwCgud/CVWVZ/hts+BJ8qd+Wkn7H05nKwyT3+JiHhFpl+28RTE5VGadhEt36Dh/I2TJaLyKbZlhJeX55QogQwCQI1G8nmE8fwH0qcxiE2YSKUne9li26eKdBegcpjXHhFx8Bree+0KKbQstHezUnfAruOPjSWX1UjlwG73AEANIyinGD root@cirros
ssh-dss AAAAB3NzaC1kc3MAAACBAIMKDj88gK9KAGpfKXfZ08Yv4BQ/2wmYeVKwAaqLTQxU+Tn5HgoBCHQob1eIPg2FQrjvLEjCuq/hSSC7ZKs2ExSR6Wlcrm3VDofpJ1rF+g9Cp2bShJUAQlk4aEdjnTSQEoO0k8wpRVTeSYFR2sp8FWi3pqWOAiTtl48+6S5ZLxqZAAAAFQDUKVipaTUuEjs5Z1xHbgsMOARWPwAAAIB561lHdvXMLjTcnnxqbydVXRXNpVCKUJhI75RAnTlIB9G67ExuVPp2h49mU14ul1wUS7FVTtXuG7FSMrbbuxwpxEKvzwUXjOiQZSlvxuy0IcH6NnJqJqadiNi3+tmeftDQnA5S/xKl9hOMD4wBVpwWe4KysHpEZihzXwUySdbrygAAAIBwe+M/PhLAPZ2GqeiCPkik7Rjwp4l9o23/f9LoiXjSWDjWEYks38HjBlPUa2XN61rWGOajZkq4FYb/iXt3KRmj0aXyNMOd0uwCYxDfqHbojQJrdbA6FpREZkJCn+HCLdejCySkt1asbb4eobaim0egVmXEghL0pBei9/w5G8TM/A== root@cirros
-----END SSH HOST KEY KEYS-----
=== network info ===
if-info: lo,up,127.0.0.1,8,::1
if-info: eth0,up,,8,fe80::f816:3eff:fe68:bc40
=== datasource: None None ===
=== cirros: current=0.3.3 uptime=221.32 ===
route: fscanf
=== pinging gateway failed, debugging connection ===
############ debug start ##############
### /etc/init.d/sshd start
Starting dropbear sshd: OK
route: fscanf
### ifconfig -a
eth0      Link encap:Ethernet  HWaddr FA:16:3E:68:BC:40  
          inet6 addr: fe80::f816:3eff:fe68:bc40/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:1132 (1.1 KiB)
lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
### route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
route: fscanf
### cat /etc/resolv.conf
cat: can't open '/etc/resolv.conf': No such file or directory
### gateway not found
/sbin/cirros-status: line 1: can't open /etc/resolv.conf: no such file
### pinging nameservers
### uname -a
Linux cirros 3.2.0-68-virtual #102-Ubuntu SMP Tue Aug 12 22:14:39 UTC 2014 x86_64 GNU/Linux
### lsmod
Module                  Size  Used by    Not tainted
nls_iso8859_1          12713  0
nls_cp437              16991  0
vfat                   17585  0
fat                    61512  1 vfat
isofs                  40257  0
ip_tables              27473  0
x_tables               29891  1 ip_tables
pcnet32                42119  0
8139cp                 27360  0
ne2k_pci               13691  0
8390                   18856  1 ne2k_pci
e1000                 108589  0
acpiphp                24231  0
### dmesg | tail
[    0.783216] acpiphp: Slot [31] registered
[    0.787611] e1000: Intel(R) PRO/1000 Network Driver - version 7.3.21-k8-NAPI
[    0.787615] e1000: Copyright (c) 1999-2006 Intel Corporation.
[    0.790263] ne2k-pci.c:v1.03 9/22/2003 D. Becker/P. Gortmaker
[    0.792027] 8139cp: 8139cp: 10/100 PCI Ethernet driver v1.3 (Mar 22, 2004)
[    0.793963] pcnet32: pcnet32.c:v1.35 21.Apr.2008 tsbogend@alpha.franken.de
[    0.797430] ip_tables: (C) 2000-2006 Netfilter Core Team
[    0.828043] usb 1-1: new full-speed USB device number 2 using uhci_hcd
[    1.252202] Refined TSC clocksource calibration: 2094.778 MHz.
[   11.088060] eth0: no IPv6 routers present
### tail -n 25 /var/log/messages
Dec  2 20:07:12 cirros kern.info kernel: [    0.782934] acpiphp: Slot [17] registered
Dec  2 20:07:12 cirros kern.info kernel: [    0.782952] acpiphp: Slot [18] registered
Dec  2 20:07:12 cirros kern.info kernel: [    0.782969] acpiphp: Slot [19] registered
Dec  2 20:07:12 cirros kern.info kernel: [    0.782989] acpiphp: Slot [20] registered
Dec  2 20:07:12 cirros kern.info kernel: [    0.783007] acpiphp: Slot [21] registered
Dec  2 20:07:12 cirros kern.info kernel: [    0.783025] acpiphp: Slot [22] registered
Dec  2 20:07:12 cirros kern.info kernel: [    0.783060] acpiphp: Slot [23] registered
Dec  2 20:07:12 cirros kern.info kernel: [    0.783080] acpiphp: Slot [24] registered
Dec  2 20:07:12 cirros kern.info kernel: [    0.783099] acpiphp: Slot [25] registered
Dec  2 20:07:12 cirros kern.info kernel: [    0.783121] acpiphp: Slot [26] registered
Dec  2 20:07:12 cirros kern.info kernel: [    0.783140] acpiphp: Slot [27] registered
Dec  2 20:07:12 cirros kern.info kernel: [    0.783158] acpiphp: Slot [28] registered
Dec  2 20:07:12 cirros kern.info kernel: [    0.783178] acpiphp: Slot [29] registered
Dec  2 20:07:12 cirros kern.info kernel: [    0.783197] acpiphp: Slot [30] registered
Dec  2 20:07:12 cirros kern.info kernel: [    0.783216] acpiphp: Slot [31] registered
Dec  2 20:07:12 cirros kern.info kernel: [    0.787611] e1000: Intel(R) PRO/1000 Network Driver - version 7.3.21-k8-NAPI
Dec  2 20:07:12 cirros kern.info kernel: [    0.787615] e1000: Copyright (c) 1999-2006 Intel Corporation.
Dec  2 20:07:12 cirros kern.info kernel: [    0.790263] ne2k-pci.c:v1.03 9/22/2003 D. Becker/P. Gortmaker
Dec  2 20:07:12 cirros kern.info kernel: [    0.792027] 8139cp: 8139cp: 10/100 PCI Ethernet driver v1.3 (Mar 22, 2004)
Dec  2 20:07:12 cirros kern.info kernel: [    0.793963] pcnet32: pcnet32.c:v1.35 21.Apr.2008 tsbogend@alpha.franken.de
Dec  2 20:07:12 cirros kern.info kernel: [    0.797430] ip_tables: (C) 2000-2006 Netfilter Core Team
Dec  2 20:07:12 cirros kern.info kernel: [    0.828043] usb 1-1: new full-speed USB device number 2 using uhci_hcd
Dec  2 20:07:13 cirros kern.info kernel: [    1.252202] Refined TSC clocksource calibration: 2094.778 MHz.
Dec  2 20:07:23 cirros kern.debug kernel: [   11.088060] eth0: no IPv6 routers present
Dec  2 20:10:53 cirros authpriv.info dropbear[290]: Running in background
############ debug end   ##############
  ____               ____  ____
/ __/ __ ____ ____ / __ \/ __/
/ /__ / // __// __// /_/ /\ \
\___//_//_/  /_/   \____/___/
   http://cirros-cloud.net

login as 'cirros' user. default password: 'cubswin:)'. use 'sudo' for root.
cirros login:

cat /etc/neutron/neutron.conf
[DEFAULT]
verbose = True
core_plugin = ml2
service_plugins = router
auth_strategy = keystone
allow_overlapping_ips = True
notify_nova_on_port_status_changes = True
notify_nova_on_port_data_changes = True
nova_url = http://controller:8774/v2
nova_region_name = regionOne
nova_admin_username = nova
nova_admin_tenant_id = 53e67eee1fe14542adc295407319ec00
nova_admin_password = 123456
nova_admin_auth_url = http://controller:35357/v2.0
rabbit_host=controller
rabbit_password=123456
rpc_backend=rabbit
[keystone_authtoken]
auth_uri = http://controller:5000/v2.0
identity_uri = http://controller:35357
admin_tenant_name = service
admin_user = neutron
admin_password = 123456
[database]
connection = mysql://neutron:123456@controller/neutron
cat /etc/neutron/dhcp
debug=true
dhcp_driver = neutron.agent.linux.dhcp.Dnsmasq
dhcp_domain=local
auth_url = http://controller:35357/v2.0/
admin_username = neutron
admin_password = 123456
admin_tenant_name = service
interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver
dnsmasq_config_file=/etc/neutron/dnsmasq-neutron.conf
use_namespaces = True
enable_isolated_metadata = True
enable_metadata_network = True
#ip netns exec qdhcp-d194adfc-41e8-4f91-ae75-41900285c460 ip addr
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
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
11: tap9992dbc6-5d: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN
    link/ether fa:16:3e:fb:b2:43 brd ff:ff:ff:ff:ff:ff
    inet 10.0.2.11/24 brd 10.0.2.255 scope global tap9992dbc6-5d
       valid_lft forever preferred_lft forever
    inet 169.254.169.254/16 brd 169.254.255.255 scope global tap9992dbc6-5d
       valid_lft forever preferred_lft forever
    inet6 fe80::f816:3eff:fefb:b243/64 scope link
       valid_lft forever preferred_lft forever
#nova list
+--------------------------------------+------------------+--------+------------+-------------+------------------+
| ID                                   | Name             | Status | Task State | Power State | Networks         |
+--------------------------------------+------------------+--------+------------+-------------+------------------+
| c11c55ce-6def-449f-83a3-db611f5dc2e4 | net101-instance1 | ACTIVE | -          | Running     | NET101=10.0.1.10 |
| a5ea9799-cc6c-4108-a464-3b50fec3b991 | net102-instance1 | ACTIVE | -          | Running     | NET102=10.0.2.10 |
+--------------------------------------+------------------+--------+------------+-------------+------------------+

已有(4)人评论

跳转到指定楼层
luoyupeng 发表于 2015-12-3 14:00:01
问题解决了,我做的vlan模式的配置,controller跟compute的eth1都是接在三层交换机的一个vlan里,但是没有做成trunk,所以不通,
回复

使用道具 举报

arsenduan 发表于 2015-12-3 12:31:05
楼主内网和外网都是怎么分配的。

回复

使用道具 举报

lmlm1234 发表于 2015-12-3 14:08:33
请各位大侠帮忙看看虚拟机获取不到IP的问题
回复

使用道具 举报

luoyupeng 发表于 2015-12-8 16:02:35
arsenduan 发表于 2015-12-3 12:31
楼主内网和外网都是怎么分配的。

我现在还没有加路由,只是一个内网而已,,
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关闭

推荐上一条 /2 下一条