2014年4月16日发布
Reference:
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)"
Use ISI image:
/root/openstack-images/X17-24329.iso
OS type:
Windows 7
Memory 2048MB
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)
4. Install cloudbase.init
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를 설치하면 된다.
따로 설치할 필요없이 윈도우 오피스를 깔면 포함되어 설치가 된다.
오픈스택을 위한 윈도우 이미지 생성 과정 발생 가능한 문제점들:
1. black screen - no bootable devcie
디폴트 포맷으로 *.img 확장자인 qcow2포맷 파일이 만들어지는데 확장자는 img지만 포맷은 qcow2다. 하여 다시 *.qcow2포맷으로 바꿀 필요 없다.
2. blue screen
만든 이미지를 오픈스택에 가져다 가상머신을 생성하면 부팅되다가 블루스크린이 뜨는 경우가 있다.
해결 방법은 http://poolsidemenace.wordpress.com/2011/06/16/porting-windows-to-openstack/
이 사이트 참고 하면 .NET framework를 설치하는 것으로 해결하는 것을 볼수 있다.
microsoft office를 설치하면 .NET fraemwork이 설치되는 것으로 해결하였다.
3. update해주는 것을 원칙으로 ~ |