是否有可能将libvirt的networkingfilter应用到KVM客人,而无需手动编辑XML(用于脚本)? 或者有没有简单的方法将networkingfilterconfiguration推入现有的XML? 例如,我有客人的configuration: <interface type='bridge'> <mac address='52:54:00:d6:b6:a9'/> <source bridge='bridge0'/> <model type='virtio'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> </interface> 我需要做到这一点: <interface type='bridge'> <mac address='52:54:00:d6:b6:a9'/> <source bridge='bridge0'/> <model type='virtio'/> <filterref filter='clean-traffic'> <parameter name='IP' value='192.168.0.20'/> </filterref> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> </interface> 谢谢!
对于一个实验,我试图通过libvirt启动尽可能多的虚拟机,但是有超过1000个虚拟机正在运行,我得到一个错误:“无法创buildpipe道:太多打开的文件”。 任何想法如何解决这个问题? 我已经把所有用户的ulimit软限制设置为4096,但是在检查/ proc /'libvirt守护进程的进程pid'/限制它仍然说软限制是1024(硬限制设置为4096)。 当通过“ulimit -Sn”或“ulimit -Hn”检查任何用户的ulimit时,限制似乎按照预期设置。 这在Ubuntu 12.04服务器上发生,使用libvirtd 0.9.8
我无法通过使用Xen和libvirt运行的虚拟机访问networking。 我一直在尝试不同的东西,在网上阅读类似的post几天,但我真的坚持在这一点上。 如果有人能提供一些见解,将不胜感激。 我有一个虚拟机,我在主机上运行一个网桥设置为br0和192.168.60.0/24子网上的接口eth0。 libvirtconfigurationxml的networking部分是: <interface type='bridge'> <mac address='ff:a0:d1:e5:07:de'/> <source bridge='br0'/> <script path='/etc/xen/scripts/vif-bridge'/> <model type='virtio' /> </interface> 当我启动VM时,在主机上创build一个vif6.0接口,并且ifconfig输出是: br0 Link encap:Ethernet HWaddr 00:A0:D1:C3:07:DE inet addr:192.168.60.33 Bcast:192.168.60.255 Mask:255.255.255.0 inet6 addr: fe80::2a0:d1ff:fee5:7de/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:13 errors:0 dropped:0 overruns:0 frame:0 TX packets:40 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:3570 (3.4 KiB) […]
我用libvirt使用Xen,并试图在桥接接口上进行设置。 我能够安装一个操作系统,一切正常,如我所料。 如果保存“virsh dumpxml guest”的xml输出,编辑接口的mac地址,然后用这个新的xml文件定义domU,我发现stream量不再从vif0.0接口转发到br0。 guest虚拟机上的ifcfg-eth0文件被自动更新以反映新的mac地址,并且ifconfig输出看起来相同。 有谁知道为什么会发生这种情况,或者如何正确地更改libvirtconfiguration的mac地址?
使用最新的Ubuntu 13.04; 我已经安装了lxc和其他各种工具 这是我的XML定义: <domain type='lxc'> <name>vm1</name> <memory>500000</memory> <os> <type>exe</type> <init>/bin/bash</init> </os> <vcpu>1</vcpu> <clock offset='utc'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>destroy</on_crash> <devices> <emulator>/usr/lib/libvirt/libvirt_lxc</emulator> <interface type='network'> <source network='default'/> </interface> <console type='pty' /> </devices> </domain> 我定义它: virsh –connect lxc:/// define application-test.xml 但是当我尝试开始时: root@lxc:~# virsh –connect lxc:/// start vm1 error: Failed to start domain vm1 error: internal error guest failed to […]
我在Ubuntu 12.04 amd64主机上安装了由KVM安装的CentOS 6.4映像。 这是centos.img的磁盘布局 # virt-filesystems –long -h –all -a centos.img Name Type VFS Label MBR Size Parent /dev/sda1 filesystem ext4 – – 500M – **/dev/vg_centos/lv_root filesystem ext4 – – 2.5G -** /dev/vg_centos/lv_swap filesystem swap – – 2.0G – /dev/vg_centos/lv_root lv – – – 2.5G /dev/vg_centos /dev/vg_centos/lv_swap lv – – – 2.0G /dev/vg_centos /dev/vg_centos […]
我试图为KVMconfigurationnwfilter,但到目前为止,我还没有设法找出一个工作configuration。 networking设置:dom0(Debian 7.1,内核3.2.46-1,libvirt 0.9.12)通过eth0(外部子网192.168.17.0/24的一部分)连接,并有一个附加的子网192.168.128.160/28路由到它的主地址192.168.17.125。 主机的子网在virsh中被configuration为网桥: <network> <name>foo</name> <forward dev='eth0' mode='route'> <interface dev='eth0'/> </forward> <bridge name='foo-br0' stp='off' delay='0' /> <ip address='192.168.128.161' netmask='255.255.255.240'> </ip> </network> domU被configuration为使用该网桥(DomU中configuration的静态IP): <interface type='network'> <source network='foo'/> <target dev='vnet0'/> <model type='virtio'/> <filterref filter='test-eth0'> <parameter name='CTRL_IP_LEARNING' value='none'/> <parameter name='IP' value='192.168.128.162'/> </filterref> <alias name='net0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> </interface> 用一个空的filter,连接正常工作。 现在,如果添加文档( http://libvirt.org/formatnwfilter.html#nwfwriteexample )中build议的示例规则集,则传入的 ICMP可以工作(但不传出),并且入站SSHstream量与出站DNS一起被阻止。 […]
这会导致什么? ls显示qcow2是241G,在VM中它只有〜160GB的驱动器,没有未分区的空间。 赢7虚拟机,主机= EXT4 2.6内核virsh 0.9.10 file format: qcow2 virtual size: 160G (171798692352 bytes) disk size: 241G cluster_size: 65536 Snapshot list: ID TAG VM SIZE DATE VM CLOCK 1 1373999350 1.9G 2013-07-16 14:29:10 1321:53:10.348
我已经部署了大量的qemu / KVM虚拟机,通过libvirt进行pipe理。 它们都是CentOS 5或者6主机和客户机(内核缺less9p文件系统标志,所以“mount”共享文件系统将不起作用)。 我想从主机传递一个任意的string(或一个或多个键/值对,或一个文件,如果这是最简单的)从客人。 要求:1)不要改变networking设置(即在主机上没有主机/来宾本地networking和NFS)2)不需要客户机上的新/定制内核3)理想情况下,我们可以通过libvirt来完成。 但是这看起来不太可能,所以这不是必需的 有任何想法吗? 我在这里找不到以下内容:1)libvirt XML中的“mount”文件系统的东西(正如我所说的,CentOS缺less9p内核标志,所以这是一个没有去)2)在主机上的NFS导出(除非我添加一个专用networking,否则我根本无法做到这一点)3)将smbios序列号设置为…不pipe任何string。
我有2台运行Windows客户端的KVM服务器。 我想创build一个Windows 7上的Qcow2图像,安装所需的基础软件,然后使其成为一个只读的支持图像,顶部将有一个qcow2覆盖,这将被读取写入。 我将把副本映像放在第二台服务器上,然后每当我需要创build一个副本时,我只需要复制一个副本,并在第二台服务器上创build一个新的虚拟机,支持图像,而这个覆盖作为可写图像。 这应该是创build第一台服务器的时间点克隆的快速方法,并且由于覆盖层应该小于使用单个qcow2映像,因此会节省时间。 libvirt 0.10