When managing a VM Guest on the VM Host Server itself, it is possible to access the complete file system of the VM Host Server in order to attach or create virtual hard disks or to attach existing images to the VM Guest. However, this is not possible…
libvirt is a library that provides a common API for managing popular virtualization solutions, among them KVM and Xen. 使用virt-install创建image qemu-img create -f qcow2 /tmp/centos5.8.img 10G virt-install --virt-type qemu --name centos-5.8 --ram 2048 --…
访问Hard Drive 使用-hda –hdb qemu-system-x86_64 -enable-kvm -name ubuntutest  -m 2048 -hda ubuntutest.img -hdb ubuntutest1.img -boot c -vnc :19 -net nic,model=virtio -net tap,ifname=tap0,script=no,downscript=no 访问CD-ROM/DVD-ROM 使用-cdrom 如果想直接挂载Host机器上的CD…
在openstack中,如果我们启动一个虚拟机,我们会看到非常复杂的参数 qemu-system-x86_64 -enable-kvm -name instance-00000024 -S -machine pc-i440fx-trusty,accel=kvm,usb=off -cpu SandyBridge,+erms,+smep,+fsgsbase,+pdpe1gb,+rdrand,+f16c,+osxsave,+dca,+pcid,+pdcm,+xtpr,+tm2,+est,+smx,+v…
RAW raw是默认的格式,格式简单,容易转换为其他的格式.需要文件系统的支持才能支持sparse file 创建image # qemu-img create -f raw flat.img 10GFormatting 'flat.img', fmt=raw size=10737418240 如果我们ls则看到 ls -lh flat.img -rw-r--r-- 1 root root 10G Jun 30 22:27 flat.img 但是并不真正占用10G # du -h flat.im…
Administrating Virtual Machines with QEMU Monitor When QEMU is running, a monitor console is provided for performing interaction with the user. Using the commands available in the monitor console, it is possible to inspect the running operating syste…
Overcommits KVM allows for both memory and disk space overcommit. However, hard errors resulting from exceeding available resources will result in guest failures. CPU overcommit is also supported but carries performance implications. Time Synchroniza…
前面讲了QEMU的qcow2格式的internal snapshot和external snapshot,这都是虚拟机文件格式的功能. 这是文件级别的. 还可以是文件系统级别的,比如很多文件系统支持snapshot,如OCFS2 还可以是block级别的,比如LVM支持snapshot 我们这节来分析openstack中各种snapshot的实现. 在Openstack中,Instance的启动大概有两种,一种是从image启动,一种是从bootable volume启动 启动了的instanc…
安装 对虚拟化的支持通常在BIOS中是禁掉的,必须开启才可以. 对于Intel CPU,我们可以通过下面的命令查看是否支持虚拟化. # grep "vmx" /proc/cpuinfo flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdp…
虚拟网卡由-net nic定义 # qemu-system-x86_64 -enable-kvm -name ubuntutest  -m 2048 -hda ubuntutest.img -vnc :19 -net nic 如果我们在monitor中查看info network 可以看到下面的 有时候,我们看到的是VLAN 0,这里的VLAN和802.1.q一点关系都没有,就是virtual hub的概念,在新的版本里面已经改了. 我们可以在monitor里面 set_link e1000.0…