创建虚拟机:
virt-install --name wj-v1.4.1.0411 --vcpus=2 --memory=2048 --disk path=/home/wj/os/osgwV1.4.1.0411.qcow2,bus=virtio,format=qcow2 --boot=hd --network=bridge:br-sgw,virtualport_type=openvswitch,model=virtio --vnc --vnclisten=0.0.0.0 --vncport=9954 --clock offset=utc --force
创建磁盘:
qemu-img create -f qcow2 /home/wj/disk/10g_151.qcow2 10G
增加磁盘:
virsh edit xx
<disk type='file' device='disk'>
<driver name='qemu' type='qcow2'/>
<source file='/home/wj/disk/10g_151.qcow2'/>
<target dev='vdb' bus='virtio'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
</disk>
virsh的一些命令:
virsh list
virsh list --all
virsh start
virsh destroy
virsh shutdown
virsh resume
virsh suspend
virsh edit
virsh undefine
virsh vncdisplay
virsh dominfo
virsh domstate