HOWTO: WindowsServer2016/2019 VM create on OpenNebula(Sunstone)

Information

Step of creating Windows Server Virtual Machine (VM) 2016/2019 on OpenNebula(Sunstone).

  • OpenNebula version: 5.9.90

  • Environment: Hypervisor is KVM and OS is CentOS 7(Front-end and Host).

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.

  1. empty image
  2. ISO disk
  3. Virtio ISO disk

1-1 . Create empty image

Select "Empty disk image" and input Size(For example 60GB).

  • Type: datablock
  • DEV_PREFIX: vd f:id:mukkun0824:20200503144402p:plain

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

f:id:mukkun0824:20200503145015p:plain

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

f:id:mukkun0824:20200503150629p:plain

2. Create template.

You must create template file to use you created three images.

2-1. General setting

f:id:mukkun0824:20200503152052p:plain

2-2. disk0 setting

Please select windows iso image. f:id:mukkun0824:20200503152131p:plain

2-3. disk1 setting

Please select virtio image. f:id:mukkun0824:20200503152138p:plain

2-4. disk2 setting

Please select empty image disk. f:id:mukkun0824:20200503152301p:plain

2-5. Boot order setting

Check three box and please arrange in the order Win ISO => virtio iso => empty image disk
f:id:mukkun0824:20200503152411p:plain

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

f:id:mukkun0824:20200503153125p:plain

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. f:id:mukkun0824:20200503153424p:plain

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.)

f:id:mukkun0824:20200503154406p:plain f:id:mukkun0824:20200503154422p:plain

f:id:mukkun0824:20200503154502p:plain f:id:mukkun0824:20200503154517p:plain f:id:mukkun0824:20200503154534p:plain

Please choose "ドライバーの読み込み"

f:id:mukkun0824:20200503155034p:plain
driver

f:id:mukkun0824:20200503154606p:plain f:id:mukkun0824:20200503154432p:plain

You can find drive. f:id:mukkun0824:20200503154625p:plain

Now you can use this template to instantiate a VM.

I look forward to helping you.