HOWTO: WindowsServer2016/2019 VM create on OpenNebula(Sunstone)
Information
Step of creating Windows Server Virtual Machine (VM) 2016/2019 on OpenNebula(Sunstone).
References.)
How to create Windows VM? - Community Support - OpenNebula Community Windows VM template build up? - Community Support - OpenNebula Community
1. Create Storage - Images
You must create three image files.
- empty image
- ISO disk
- Virtio ISO disk
1-1 . Create empty image
Select "Empty disk image" and input Size(For example 60GB).
- Type: datablock
- DEV_PREFIX: vd
1-2 . Create ISO disk
Download ISO data from Microsoft HP and upload iso file to /var/tmp/ in your front-end server(or upload a new one from your computer).
[root@opennebula-cp tmp]# pwd /var/tmp [root@opennebula-cp tmp]# ls -l | grep 2016 -rw-r--r-- 1 oneadmin oneadmin 6179063808 May 2 21:07 win2016.iso
Please set owner and group 'oneadmin'.
Next,create CD-ROM image in GUI(sunstone).
- Type: Read Only CD-ROM
- Path: Input your ISO image full-path(ex./var/tmp/xxxx.iso)
- Target device:hda
- Image mapping driver:raw
1-3. Create Virtio image
If you forget to create virtio image,you cannot register vm disk when installing Windows Server.
Download virtio ISO data from fedora official site.
Index of /groups/virt/virtio-win/direct-downloads/archive-virtio/virtio-win-0.1.171-1
Please upload iso file to /var/tmp/ in your front-end server as well windows server iso(or upload a new one from your computer).
[root@opennebula-cp tmp]# pwd /var/tmp [root@opennebula-cp tmp]# ls -l | grep virt -rw-r--r-- 1 oneadmin oneadmin 371732480 May 21 2019 virtio-win-0.1.171.iso
Next,create CD-ROM image in GUI(sunstone).
- Type: Read Only CD-ROM
- Path: Input your ISO image full-path(ex./var/tmp/xxxx.iso)
- DEV_PREFIX:hd
- Image mapping driver:raw
2. Create template.
You must create template file to use you created three images.
2-1. General setting
2-2. disk0 setting
Please select windows iso image.
2-3. disk1 setting
Please select virtio image.
2-4. disk2 setting
Please select empty image disk.
2-5. Boot order setting
Check three box and please arrange in the order Win ISO => virtio iso => empty image disk
2-6. Tag setting(Only WindowsServer 2016)
If you want to create Windows Server 2016 vm, you must set tag. If you forget to set tag, getting to blue screen after deploy vm and cannot deploy. You don't need to set tag in case Windows Server 2019.
- Tag:
SandyBridge
This completes the template settings. Please create vm from this template.
3. Create and install VM
You create vm and wait for a while until RUNNING status.
Once in the RUNNING status, please open VNC viewer and install along with guide. (In advance, it is necessary to open IP and/or port your firewall rules.Default port is 29876.)
[root@opennebula-cp ~]# cat -n /etc/one/sunstone-server.conf | grep vnc_proxy_port 121 # If not set, will use the port section of :vnc_proxy_port 125 :vnc_proxy_port: 29876
reference
Sunstone Installation & Configuration — OpenNebula 5.8.5 documentation
Image Capture(Sorry Japanese only.)
Please choose "ドライバーの読み込み"
You can find drive.
Now you can use this template to instantiate a VM.
I look forward to helping you.