How do I set up ephemeral storage for windows images?

Asked by One-Man-Bucket

Hi!

I'm running a nova cloud (essex) with both linux and windows
instances. I want the windows images to boot with an ephemeral
pre-formatted ntfs drive.

I've tried setting:
virt_mkfs="windows=mkfs.ntfs --force --fast --label %(fs_label)s %(target)s"

in nova.conf and I've also set the os_type metadata on the windows
image:
~ $ nova image-show 0d86a3bc-f55b-4718-8350-8eb967d3a111
+------------------+--------------------------------------+
| Property | Value |
+------------------+--------------------------------------+
| created | 2012-10-26T13:56:33Z |
| id | 0d86a3bc-f55b-4718-8350-8eb967d3a111 |
| metadata os_type | windows |
| minDisk | 0 |
| minRam | 0 |
| name | win2k8sqlserver2k8 |
| progress | 100 |
| status | ACTIVE |
| updated | 2012-10-29T11:37:22Z |
+------------------+--------------------------------------+

I've also tried setting the os_type param when booting the instance:

 nova boot --meta os_type=windows --hint=os_type=windows --image 0d86a3bc-f55b-4718-8350-8eb967d3a111 --flavor m1.windowsbig test

Even after all this nova still uses ext4:
2012-10-29 12:41:24 DEBUG nova.utils
[req-33b476e7-6412-4caa-ba51-839c36ab35b0
ec731931e03544d89e46468a3a268d9b 526fedd9083647fbbbc167261f10ecfc]
Running cmd (subprocess): mkfs.ext4 -L ephemeral0 -F
/var/lib/nova/instances/_base/ephemeral_0_20_windows from (pid=10597)
execute /usr/lib/python2.7/dist-packages/nova/utils.py:219

The ephemeral drive shows up in the instance and I can format it after booting the instance. But I need it to be recognized as a drive at boot. How can I fix this?

Cheers,
Erik

Question information

Language:
English Edit question
Status:
Solved
For:
OpenStack Compute (nova) Edit question
Assignee:
No assignee Edit question
Solved by:
One-Man-Bucket
Solved:
Last query:
Last reply:
Revision history for this message
One-Man-Bucket (erik-lindblad) said :
#1

Ok, I figured out my problem. My nova.conf BEFORE:

virt_mkfs="default=mkfs.ext4 -L %(fs_label)s -F %(target)s"
virt_mkfs="windows=mkfs.ntfs --force --fast --label %(fs_label)s %(target)s"

This is from the docs, but it's not right. Removing the citation marks made it work as expected:
virt_mkfs=default=mkfs.ext4 -L %(fs_label)s -F %(target)s
virt_mkfs=windows=mkfs.ntfs --force --fast --label %(fs_label)s %(target)s