http://docs.openstack.org/image-guide/content/
- virt-manager
- VirtIO driver
- Sysprep
- Cloudbase.init
Requirements:
windows7 iso file:
http://www.w7forums.com/threads/official-windows-7-sp1-iso-image-downloads.12325/
select version by language ~
virtIO iso file:
http://alt.fedoraproject.org/pub/alt/virtio-win/latest/images/bin/
select iso file to download ~
cloudbase.init fle:
http://www.cloudbase.it/cloud-init-for-windows-instances/
Here select https://www.cloudbase.it/downloads/CloudbaseInitSetup_Beta.msi file to download ~
1. Using virt-manager
yum install libvirt
yum install qemu-kvm
yum install virt-manager
service libvirtd start
virt-manager
New VM -> Name: vm_windows& -> Choose "Local install media(ISO image or CDROM)"
CPUs 2
Select managed or other existing storage ( This is for adding virtual CD of installing VirtIO Driver)
New volume Name: vm_windows7.img
Format: qcow2
Max Capacity: 20000MB(20GB)
Allocation: 20000MB(20GB)
Forward
click customize configuration before install (This is for adding new hardware)
Finish
Add Hardware
select managed or other existing storage
Browse: /root/openstack-images/virtio-win-0.1-74.iso
Device type: IDE cdrom
Click Begin Installation
Click Next ~
2. Load driver as shown below ~
Begin to install ~
Restart ~
User: kisti
PW: ****
It will be shown as follow~
3. sysprep Run
In windows7, there is a tool called sysprep for use as a virtual machine image.
C:\Windows\System32\sysprep
execute sysprep.exe file
Click General (일반화)
OK(it needs to restart the windows7)
Install cloudbase.init
5. Other settings
Ethernet 컨트롤러 driver install
computer right click -> 관리-> 장치 관리자
load VirtIO driver and update ~ After updated as shown bellow~
shutdown Windows ~
6. Get image file
In the default directory /var/lib/libvirt/images, will find vm_windows7.img file ~
Run this command, virsh undefine vm_windows7
then you can use this image file to create virtual machine with windows7 in openstack ~
하다 보면 생성된 이미지가 블루 스크린(blue screen)이 뜨면서 설치 오류가 나는걸 볼수 있는데 해결 방법은 guest windows7에 microsoft .Net framework를 설치하면 된다.
따로 설치할 필요없이 윈도우 오피스를 깔면 포함되어 설치가 된다.