I have create a template for Windows Server 2019 and created a VM using that template. During the creation of the VM it ask for the driver installation . It is only showing the diver of windows 10, 8, 7 . I have downloaded the Windows virtio image from the opennebula appstore .
How can I Create a template for Windows Server 2012, 2016, 2019.
I was able to get Windows server 2019 to work, were you able to run this step from the docs? My ONE system is down right now while I’m doing some upgrades, I can check what was on the virtio driver CD when it’s back up.
Are you able to tell if the NIC virtio drivers are loaded?
@christaylor . I am able to create a VM for Windows Server 2019 . But the NIC is different , and the IP are also different from my KVM node NIC i.e It is giving me the default NIC of Realteak.
So, how can we change the NIC and keep same as of the NIC of the node?
What should we use for “Default hardware model to emulate for all NICs” in the interface execpt for virtio? As my sever NIC is of Intel and I have created a bridge connection for public IP.
@christaylor So, why the NIC is assigning the different IP . I can see there is one context.sh file generated in of the Context Drive. There is the information for the interface i.e public, private IP. But the NIC is showing different IP.
The Created VM template has the correct IP .
NIC = [
AR_ID = “0”,
BRIDGE = “br0”,
BRIDGE_TYPE = “linux”,
CLUSTER_ID = “0”,
INBOUND_AVG_BW = “1000”,
INBOUND_PEAK_BW = “1000”,
INBOUND_PEAK_KB = “1000”,
IP = “148.251.146.XX”,
MAC = “02:00:94:fb:92:XX”,
NAME = “NIC0”,
But the VM NIC is assigning the IP of 169.254.222.56 which is not my NIC IP.
onvm show
VM NICS
ID NETWORK BRIDGE IP MAC PCI_ID
0 VNetwork-KVM-5.9.xx br0 148.251.146.xx 02:00:94:fb:92:53
1 NEW-VN-PRIVATE prv0 10.10.15.2 02:00:0a:0a:0f:02
Hmm, something is strange with the configuration. An IP of 169.254.222.56 is a local address a host gets when it can’t get talk to a DHCP server, or something like that.
Maybe you could check the output of the contextualization script on your Windows VM? I think it saves it in c:\one-context or some path like that- sorry, I can’t look on a VM right now. Anyway it has all the output from the context Powershell when the VM starts.Maybe there’s some clue.
Maybe you could try a very simple template with only one public IP on one NIC?
@christaylor There is output file of contextualization script in one of the directory. This file has got all the correct information regarding public IP , gateway and netmask. But this file is not being implement inside the VM and NIC is assigning 169.254.222.56 IP.
Yes, I have tried with the single NIC as well , still same issue.
I’m not sure why it’s not working for you- I’d say, just keep working with it. That IP you’re getting is like a failed DHCP request or something - I’m not sure.
On one of my templates, after the VM boots I see this part in .onecontext\opennebula-context.log:
Configuring Network Settings: Red Hat VirtIO Ethernet Adapter
- Release DHCP Lease
... Failed: 83
- Set Static IP
... Success
- Set Gateway
... Success
- Set DNS Server Search Order
... Success
- Set Dynamic DNS Registration
... Success
- Ping Interface IP 172.16.100.2
... Success (1 tries)
Hi, @christaylor it is working now . I have change the context ios by lates one. Releases · OpenNebula/addon-context-windows · GitHub
But I have to run win virtio exec file manually after login into the VM. After that only the NIC is visible. And it was assigning 169.254.xx.xx range IP. After that I reboot the VM and it start working.
This win virtio exec should be run automatically and also the context script right?O r do we have to do this manually every time we create a Windows server and reboot every time?
No, if the virtio NIC drivers are installed in the image and the contextualization script runs you shouldn’t have to do anything every time the VM boots- the virtio NIC should get set up for connectivity and assigned an IP.
When you created the image the first time and booted Windows, were you able to successfully run the step where it asks to install additional drivers from the virtio CD image? Something like about half way through this video:
When your Windows VM boots do you see something like this in the Device Manager? If you click on the “Events” tab in that properties popup do you see any errors or anything unusual?
I’ve really never run into an error like that before- the only thing I can think of is to start a new template and VM creation and make sure you have the very latest version of the Redhat virtio drivers. It seems like something failed during the driver installation process and it’s only half working. I’m not sure if this helps, but I recall during the template and installation process, when the extra drivers virtual CD is mounted, I installed pretty much everything! Sorry I can’t be more specific, but it’s been a while.