我开始学习如何用libvirt创build一个好的虚拟化堆栈。 我创build了一个LVM卷组,它公开了一个由Linux RAID构成的设备块。 我的想法是给每个虚拟机一个逻辑卷,但一个人build议我使用存储池,而不是像 <pool type='logical'> <name>VG_foo</name> <uuid>foo</uuid> <capacity unit='bytes'>0</capacity> <allocation unit='bytes'>0</allocation> <available unit='bytes'>0</available> <source> <device path='/dev/md2'/> <name>vg_foo</name> <format type='lvm2'/> </source> <target> <path>/dev/vg_foo</path> <permissions> <mode>0755</mode> <owner>-1</owner> <group>-1</group> </permissions> </target> </pool> 我已经阅读libvirt存储文件,但我不明白的区别
我正在使用以下脚本安装新的Fedora服务器虚拟机 virt-install \ –name theta-1 \ –ram 8000 \ –disk path=/dev/vg/t1.img \ –vcpus 8 \ –os-type linux \ –os-variant fedora25 \ –network bridge=br0 \ –graphics none \ –console pty,target_type=serial \ –location=/home/user/Fedora-Server-dvd-x86_64-25-1.3.iso \ –extra-args 'console=ttyS0,115200n8 serial' 但是,当我运行它(作为root用户) Installation starts… Getting file .treeinfo… | 1.5 kB 00:00:00 Getting file vmlinuz… | 6.5 MB 00:00:00 Getting file initrd.img… […]
我有qemu-kvm版本的Centos 6: qemu-kvm.x86_64 2:0.12.1.2-2.448.el6_6.4 在戴尔Precision上使用2x至强5110 当我运行VM qemu-kvm进程占用100%的CPU并在VM上启动Windows需要很长时间。 我不知道为什么。 任何人都可以帮忙 我的虚拟机configuration: <domain type='qemu'> <name>window7</name> <uuid>0f606bdd-735f-d4fd-ac1d-ec37b4814d30</uuid> <memory unit='KiB'>1433600</memory> <currentMemory unit='KiB'>1433600</currentMemory> <vcpu placement='static'>2</vcpu> <os> <type arch='x86_64' machine='rhel6.6.0'>hvm</type> <boot dev='hd'/> <boot dev='cdrom'/> <bootmenu enable='yes'/> </os> <features> <acpi/> <pae/> </features> <cpu mode='custom' match='exact'> <model fallback='allow'>core2duo</model> <vendor>Intel</vendor> <feature policy='require' name='pbe'/> <feature policy='require' name='tm2'/> <feature policy='require' name='ds'/> <feature policy='require' name='ss'/> <feature policy='require' […]
我有一些服务器应用程序失败,因为他们的虚拟机在数据库虚拟机之前启动。 无论如何要configurationlibvirt以一定的顺序启动它们,并在其中一些可能的插入延迟? 在Ubuntu 12.04 x64上运行libvirt 0.9.8。 大多数客人也是Ubuntu服务器12.04。
[root@kvm ~]# virsh create /root/ns1.jesse64.xml error: Failed to create domain from /root/ns1.jesse64.xml error: internal error: process exited while connecting to monitor: qemu-kvm: -machine pc-i440fx-trusty,accel=kvm,usb=off: Unsupported machine type 所以我运行/ usr / libexec / qemu-kvm -machine? 看看 Supported machines are: none empty machine pc RHEL 7.0.0 PC (i440FX + PIIX, 1996) (alias of pc-i440fx-rhel7.0.0) pc-i440fx-rhel7.0.0 RHEL 7.0.0 […]
我正在使用VMware Workstation v7虚拟机中的OpenStack项目testingNova Compute,并得到这个错误: libvirtError: internal error no supported architecture for os type 'hvm' 这是因为虚拟机无法运行硬件加速的Xen虚拟机(hvm),即guest虚拟机没有Intel-VT或AMD-V支持。 根据VMware,“ 运行嵌套虚拟机 ”,我可以启用这个支持添加这些参数到“.vmx”文件: guestOS = "vmkernel" monitor_control.vt32 = "TRUE" monitor_control.restrict_backdoor = "TRUE" 但是,它不起作用,在虚拟机内运行'grep vmx / proc / cpuinfo'不报告Intel-VT支持,也从“cpu-checker”包运行“kvm-ok” # kvm-ok INFO: Your CPU does not support KVM extensions KVM acceleration can NOT be used 我可以configurationVMware Workstation运行KVM加速还是Xen HVM? 谢谢!
我想添加固定地址到特定的虚拟主机,因此我closures了虚拟机,并使用sudo virsh net-edit somenet 。 join行后 <host mac='52:54:00:26:61:22' name='virt.example.com' ip='192.168.111.111' /> 我保存并退出。 然后我用同样的命令再次检查,之前的状态恢复了,我的更改没有了。 同时,当我查看/etc/libvirt/qemu/networks/somenet.xml ,我的更改已被应用。 如果我再次启动我的虚拟机,它将从DHCP池( 192.168.111.170 )获得IP,但不是我上面定义的地址。 当我改变后重新启动libvirt-service,情况似乎是一样的:在configuration文件中是我的变化,与virsh我看到香草状态和虚拟机得到错误的IP。 这里有什么问题? 编辑。 在这里添加完整的XML。 这里是conf我看到/etc下面: <network> <name>somenet</name> <uuid>80d85710-23bb-1ab6-79e6-cd65c6739714</uuid> <bridge name='virbr1' stp='on' delay='0' /> <mac address='52:54:00:90:75:1A'/> <domain name='example.com'/> <ip address='192.168.111.1' netmask='255.255.255.0'> <dhcp> <range start='192.168.111.100' end='192.168.111.254' /> <host mac='52:54:00:26:61:22' name='virt.example.com' ip='192.168.111.111' /> </dhcp> </ip> </network> 这里是conf我看到与virsh : <network> <name>somenet</name> […]
我有一个通过libvirt(CentOS 7)configuration的LXC OS容器(CentOS 7): <domain type='lxc'> <name>lxc-test1.example.com</name> <uuid>5a715193-55ef-49d7-a4f6-ac5c27bce838</uuid> <memory unit='KiB'>2097152</memory> <currentMemory unit='KiB'>2097152</currentMemory> <vcpu placement='static'>4</vcpu> <os> <type arch='x86_64'>exe</type> <init>/sbin/init</init> </os> <features> <privnet/> </features> <clock offset='utc'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> <devices> <emulator>/usr/libexec/libvirt_lxc</emulator> <filesystem type='mount' accessmode='passthrough'> <source dir='/var/lib/libvirt/filesystems/lxc-test1.example.com'/> <target dir='/'/> </filesystem> <interface type='bridge'> <mac address='00:16:3e:c3:6c:78'/> <source bridge='br_v123'/> </interface> <console type='pty'> <target type='lxc' port='0'/> </console> </devices> </domain> 当容器启动时,它不会按照其在本地/etc/sysconfig/network-scripts/ifcfg-eth0定义的那样正确设置其networking TYPE=Ethernet BOOTPROTO=none […]
我有一个工作的虚拟主机是Ubuntu的服务器清醒(10.4)。 我已经使用了一段时间,并在Lucid上创build了几个function的客人。 今天我升级到小牛,然后升级到纳蒂(11.4)。 升级进展顺利,所有我的老客人都来了,function正常。 我创build了一个新的来宾,当它出现,并且似乎没有在日志中的错误,我不能ping或ssh到它。 $ virsh start stg-app2(无错误)…在'virsh list'中显示为'running' 在转换为qcow映像之前,我能够捕获guest虚拟机的interfaces文件(看起来不错): cat /tmp/somepath/etc/networking/interfaces # The primary network interface auto eth0 iface eth0 inet static address 192.168.1.193 netmask 255.255.255.0 network 192.168.1.0 broadcast 192.168.1.255 gateway 192.168.1.1 # dns-* options are implemented by the resolvconf package, if installed dns-nameservers 192.168.1.1 dns-search defaultdomain 创build日志: $ sudo vmbuilder kvm ubuntu […]
我正在使用cgroups来限制虚拟机所使用的libvirt对cgroups的支持。 所以,我从虚拟机的'.img'文件所在的驱动器上的'ls -lL'中获取设备的主要/次要编号。 但是,当我试图限制IO,我得到一个错误 – root@Silver:/sys/fs/cgroup/blkio/sysdefault/libvirt/qemu/debian1# echo "8:6 1048576" > blkio.throttle.read_bps_device bash: echo: write error: No such device 任何想法我做错了什么?