KVM或Xen遇到Unable to retrieve http images/install.img

简介:

用virt-install安装kvm或xen,如果是用URL安装,会遇到这个问题:

Unable to retrieve http://192.168.22.242/images/install.img

或者 Unable to retrieve http://mirrors.sohu.com/centos/6.5/os/x86_64/images/install.img 


解决方法

1,首先启动httpd服务,打开iptables的80端口,保证页面能访问

2,检查ip转发是否开启

1
2
3
4
5
6
7
cat  /etc/sysctl .conf | grep  ip_forward
net.ipv4.ip_forward = 1
如果没有开启,则
vim  /etc/sysctl .conf
net.ipv4.ip_forward = 1
   
/sbin/sysctl   -p



3,查看网络 

是否没有配置br0,只是yum安装的

1
2
3
# brctl show
bridge namebridge idSTP enabledinterfaces
virbr08000.feffffffffffyesvif4.0


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
cp   /etc/sysconfig/network-scripts/ifcfg-eth0   /etc/sysconfig/network-scripts/ifcfg-br0
   
cat  /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
TYPE=Ethernet
UUID=****
ONBOOT= yes
NM_CONTROLLED=no
BOOTPROTO=static
BRIDGE=br0
DEFROUTE= yes
IPV4_FAILURE_FATAL= yes
IPV6INIT=no
NAME= "System eth0"
HWADDR=****
  
cat  /etc/sysconfig/network-scripts/ifcfg-br0 
DEVICE=br0
TYPE=Bridge
ONBOOT= yes
NM_CONTROLLED=no
BOOTPROTO=none
IPADDR=****
PREFIX=**
GATEWAY=****
DNS1=114.114.114.114
DOMAIN=114.114.114.114
DEFROUTE= yes
NAME= "System br0"
  
service network restart


1
2
3
4
# brctl show
bridge name    bridge  id            STP enabled    interfaces
br             08000.0800278072e5  no             eth0
virbr          08000.feffffffffff   yes             vif4.0


4,virt-install 后面接虚拟网卡的参数 -w bridge:br0


5,检查http挂载的iso目录.treeinfo

[images-x86_64]


initrd = images/pxeboot/initrd.img

kernel = isolinux/vmlinuz

[images-xen]

kernel = isolinux/vmlinuz

initrd = isolinux/initrd.img










本文转自 chengxuyonghu 51CTO博客,原文链接:http://blog.51cto.com/6226001001/1577561,如需转载请自行联系原作者
目录
相关文章
关于 CentOS8出现“Error: Failed to download metadata for repo ‘AppStream‘: xxxx” 的解决方法
关于 CentOS8出现“Error: Failed to download metadata for repo ‘AppStream‘: xxxx” 的解决方法
关于 CentOS8出现“Error: Failed to download metadata for repo ‘AppStream‘: xxxx” 的解决方法
|
5月前
centos8 Failed to download metadata for repo ‘base‘: Cannot download repomd.xml
centos8 Failed to download metadata for repo ‘base‘: Cannot download repomd.xml
173 1
|
3月前
|
缓存 Linux 开发工具
【各种问题处理】Error: Failed to download metadata for repo ‘appstream‘
【1月更文挑战第13天】【各种问题处理】Error: Failed to download metadata for repo ‘appstream‘
|
缓存 关系型数据库 MySQL
解决CentOS执行yum命令出现File contains parsing errors:file:///etc/yum.repos.d/CentOS-Base.repo
解决CentOS执行yum命令出现File contains parsing errors:file:///etc/yum.repos.d/CentOS-Base.repo
解决CentOS执行yum命令出现File contains parsing errors:file:///etc/yum.repos.d/CentOS-Base.repo
|
Linux 开发工具 Docker
Docker报错: Failed to download metadata for repo ‘appstream‘: Cannot prepare internal mirrorlist
Docker报错: Failed to download metadata for repo ‘appstream‘: Cannot prepare internal mirrorlist
247 0
|
缓存 Linux 开发工具
【已解决】Error: Failed to download metadata for repo ‘appstream‘: Cannot prepare internal mirrorlist
【已解决】Error: Failed to download metadata for repo ‘appstream‘: Cannot prepare internal mirrorlist
10963 1
【已解决】Error: Failed to download metadata for repo ‘appstream‘: Cannot prepare internal mirrorlist
|
KVM 虚拟化
Yum配置kvm时出现---Connot retrieve repository matedata balbalabal....
Yum配置kvm时出现---Connot retrieve repository matedata balbalabal....
Yum配置kvm时出现---Connot retrieve repository matedata balbalabal....
|
网络协议 Linux 开发工具
wget: unable to resolve host address ‘ftp.gnu.org’(CentOS 7的网络配置)
最近准备在linux环境下做开发,综合参考选了CentOS7 。然后在使用wget命令下载 tar.gz 包时出现了小问题
484 0
wget: unable to resolve host address ‘ftp.gnu.org’(CentOS 7的网络配置)
|
Linux Go
centos8 appstream大坑Failed to download metadata for repo appstream: Cannot prepare internal mirrorlis
centos8 appstream大坑Failed to download metadata for repo appstream: Cannot prepare internal mirrorlis
251 0
错误:为 repo ‘appstream‘ 下载元数据失败 : Cannot prepare internal mirrorlist: No URLs in mirrorlist
repos.d中更新一下源,使用vault.centos.org代替mirror.centos.org。执行以下两行代码进行修改。
781 2
错误:为 repo ‘appstream‘ 下载元数据失败 : Cannot prepare internal mirrorlist: No URLs in mirrorlist