vioserial驱动)https://fedorapeople.org/groups/virt/virtio-win/

时间:2021-10-10 07:35:55

################################################# #win2008镜像制作 #openstack windows 2008镜像 制作 #筹备Windows安置iso镜像 #下载Virtio驱动 #下载页面https://fedoraproject.org/wiki/Windows_Virtio_Drivers#Direct_download #Virtio驱动(仅包罗磁盘、网卡驱动) https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/archive-virtio/virtio-win-0.1.141-1/virtio-win-0.1.141_amd64.vfd #qemu-ga重置暗码使用 https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/archive-qemu-ga/qemu-ga-win-7.4.5-1/qemu-ga-x64.msi #ISO包罗全部驱动(需要里面的Balloon,vioserial驱动) https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/archive-virtio/virtio-win-0.1.141-1/virtio-win-0.1.141.iso #下载 cloudbase-init https://cloudbase.it/cloudbase-init/#download #创建kvm虚拟机 ## win2008 Kname=win2008 qemu-img create -f qcow2 /kvm/img/$Kname.qcow2 15G virt-install --name $Kname --arch=x86_64 --ram 2048 --vcpus 2 --os-type windows --network network=default,model=virtio --cdrom=http://www.mamicode.com/kvm/iso/cn_windows_server_2008_r2.iso --disk path=http://www.mamicode.com/kvm/iso/virtio-win-0.1.141_amd64.vfd,device=floppy --disk path=http://www.mamicode.com/kvm/img/$Kname.qcow2,format=qcow2,device=disk,bus=virtio --boot cdrom --graphics vnc,port=5908 #安置Virtio驱动、qemu-ga、cloudbase-init ################################################# #yum install libvirt libguestfs-tools -y Kname=win2008 virsh list --all #执行清理任务 virt-sysprep -d $Kname #压缩 #cd /kvm/img/ virt-sparsify --compress $Kname.qcow2 $Kname-.qcow2 ls -hl /kvm/img/$Kname* ################################################# #上传到glance #win2008 openstack image create "win2008" --file win2008-.qcow2 --disk-format qcow2 --container-format bare --property hw_qemu_guest_agent=yes --public ################################################# #提示:创建虚机后,,初度启动需要重置administrator暗码才华使用 #################################################