KVM的各种坑

1. 编译的坑

费了老大劲,找到这帮人的邮件往来,才知道这里面有一个命令写错来,一行一行的修改之后,才得以通过编译

记录如下:

diff --git a/qemu-options.hx b/qemu-options.hx
index 4bc9c85..3af60bf 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -2095,18 +2095,13 @@  QEMU supports using either local sheepdog devices or remote networked
devices.

Syntax for specifying a sheepdog device
-@table @list
-``sheepdog:<vdiname>''
-
-``sheepdog:<vdiname>:<snapid>''
-
-``sheepdog:<vdiname>:<tag>''
-
-``sheepdog:<host>:<port>:<vdiname>''
-
-``sheepdog:<host>:<port>:<vdiname>:<snapid>''
-
-``sheepdog:<host>:<port>:<vdiname>:<tag>''
+@table @code
+@item sheepdog:<vdiname>
+@item sheepdog:<vdiname>:<snapid>
+@item sheepdog:<vdiname>:<tag>
+@item sheepdog:<host>:<port>:<vdiname>
+@item sheepdog:<host>:<port>:<vdiname>:<snapid>
+@item sheepdog:<host>:<port>:<vdiname>:<tag>
@end table



2. 在安装完成之后要搭建桥接,妈的,好多文章都是瞎写,乱吵,这里给出终极解决办法

首先,安装必要的程序包,然后从命令行创建Linux网桥。

 
 
  1. $ sudo apt-get install bridge-utils 
  2. $ sudo brctl addbr br0 

下一步是,在/etc/network/interfaces中配置Linux网桥,那样一旦主机启动,该网桥就会自动配置。想使用/etc/network/interfaces,你就要禁用系统上的Network Manager(网络管理器),如果你在使用它的话。按这里给出的指示(http://xmodulo.com/2014/02/disable-network-manager-linux.html)操作,以禁用网络管理器。

禁用了网络管理器后,接下来在/etc/network/interfaces中配置Linux网桥br0,如下所示。

 
 
  1. #auto eth0 
  2. #iface eth0 inet dhcp 
  3. auto br0 
  4. iface br0 inet dhcp 
  5. bridge_ports eth0 
  6. bridge_stp off 
  7. bridge_fd 0 
  8. bridge_maxwait 0 

这里我假设,eth0是主要的网络接口,可以访问外部网络。另外,我还假设,eth0通过DHCP获得其IP地址。请注意:/etc/network/interface中没有etho的配置。etho网桥受制于br0时,Linux网桥br0接过eth0的配置。

重启网络服务,证实Linux网桥已成功配置。如果配置成功,br0应该被赋予eth0的DHCP IP地址,eth0应该没有被赋予任何IP地址。
  1. $ sudo /etc/init.d/networking restart 
  2. $ ifconfig 

3. 创建KVM虚拟机的时候报错

现在先说说解决gedit warning问题:
我在使用gedit打开文件的时候,会提示一堆的警告:
(gedit:9778): Gtk-WARNING **: Attempting to store changes into `/root/.local/share/recently-used.xbel', but failed: Failed to create file '/root/.local/share/recently-used.xbel.LTBP3V': No such file or directory
(gedit:9778): Gtk-WARNING **: Attempting to set the permissions of `/root/.local/share/recently-used.xbel', but failed: No such file or directory
(gedit:9778): Gtk-WARNING **: Attempting to set the permissions of `/root/.local/share/recently-used.xbel', but failed: No such file or directory
(gedit:9778): Gtk-WARNING **: Attempting to store changes into `/root/.local/share/recently-used.xbel', but failed: Failed to create file '/root/.local/share/recently-used.xbel.MN6R3V': No such file or directory
(gedit:9778): Gtk-WARNING **: Attempting to set the permissions of `/root/.local/share/recently-used.xbel', but failed: No such file or directory

根据上面的提示,以及网上查的资料,知道的怎么解决:
直接在终端中输入:sudo mkdir -p /root/.local/share/  
即可..呵呵,解决了问题之一。

还有坑,后面我再慢慢加

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值