Does anyone know how to auto-mount an Elastic Block Storage (EBS) volume when starting a Windows 2003 instance in Amazon's Elastic Compute Cloud (EC2)?
相关问题
- Inheritance impossible in Windows Runtime Componen
- how to get running process information in java?
- Is TWebBrowser dependant on IE version?
- JQ: Select when attribute value exists in a bash a
- How can I have a python script safely exit itself?
相关文章
- 如何让cmd.exe 执行 UNICODE 文本格式的批处理?
- 怎么把Windows开机按钮通过修改注册表指向我自己的程序
- Warning : HTML 1300 Navigation occured?
- Bundling the Windows Mono runtime with an applicat
- Windows 8.1 How to fix this obsolete code?
- I cannot locate production log files on Elastic Be
- CosmosDB emulator can't start since port is al
- How to print to stdout from Python script with .py
Setup:
You can use the group policy editor to set this script as your startup script. See http://technet.microsoft.com/en-us/library/cc739591(WS.10).aspx for more information.
I found the following Ruby code at http://www.ioncannon.net/system-administration/199/automounting-amazon-ebs-volumes-on-ec2-instances/ courtesy of Carson McDonald. It's for Linux/Unix but maybe you can re-swizzle this for Ruby on Windows 2003 or have it serve as a model for doing it in some other scripting language.
Note that you could pass things into your image as user data such as the ECS EBS volume ID and the device name (e.g., /dev/sdh in the following example or whatever it would be in Windows for your case). You can access the user data from the instance itself as meta-data as is roughly done below to get the instance-id. More specifically, you'd access http://169.254.169.254/1.0/user-data to get to the user-data.