메뉴 닫기

openstack Linux Compute Node에 window image 설치

오픈 스택에 Window 가상 서버를 생성하고 운영하려면 Windows OS Compute Node에 cloudbase에서 배포하는 nova compute  오픈 소스를 설치 해야 합니다.

하지만 오픈 소스이다 보니 버그도 많고 수시로 변경 되는 버전에 따라 운영에 문제가 생기는 경우가 굉장히 많습니다.

그래서 대안으로 Window OS가 아닌 linux OS Compute Node에 Windows 가상 서버를 설치 테스트 해보겠습니다.

설치시 disk 및 네트웍 관련 드라이버를 설치 해야 하기에 https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/archive-virtio/virtio-win-0.1.126-2/ 사이트에서 virtio를 미리 다운로드 받은후 진행 하시기 바랍니다.

 

  • 작업 flow
root@controller:~# openstack image create "virtio" --file virtio-win-0.1.126.iso --disk-format iso --container-format bare   --public
+------------------+----------------------------------------------------------------------------------------------------------+
| Field            | Value                                                                                                    |
+------------------+----------------------------------------------------------------------------------------------------------+
| checksum         | b8379138ae5f8d0adecb839f9debf875                                                                         |
| container_format | bare                                                                                                     |
| created_at       | 2017-07-11T05:21:51Z                                                                                     |
| disk_format      | iso                                                                                                      |
| file             | /v2/images/3d8ce865-ba1d-4a01-9137-26f5f56bcd10/file                                                     |
| id               | 3d8ce865-ba1d-4a01-9137-26f5f56bcd10                                                                     |
| min_disk         | 0                                                                                                        |
| min_ram          | 0                                                                                                        |
| name             | virtio                                                                                                   |
| owner            | 23cb609941d342bc8c92a881f68cb2f5                                                                         |
| properties       | direct_url='rbd://c2ec84dc-7cb3-4208-be66-27ebaa07bddc/images/3d8ce865-ba1d-4a01-9137-26f5f56bcd10/snap' |
| protected        | False                                                                                                    |
| schema           | /v2/schemas/image                                                                                        |
| size             | 155856896                                                                                                |
| status           | active                                                                                                   |
| tags             |                                                                                                          |
| updated_at       | 2017-07-11T05:21:56Z                                                                                     |
| virtual_size     | None                                                                                                     |
| visibility       | public                                                                                                   |
+------------------+----------------------------------------------------------------------------------------------------------+
virtio 출처 : https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/archive-virtio/virtio-win-0.1.126-2/

root@controller:~# cinder create --image virtio 1
+--------------------------------+--------------------------------------+
|            Property            |                Value                 |
+--------------------------------+--------------------------------------+
|          attachments           |                  []                  |
|       availability_zone        |                 nova                 |
|            bootable            |                false                 |
|      consistencygroup_id       |                 None                 |
|           created_at           |      2017-07-11T06:58:06.000000      |
|          description           |                 None                 |
|           encrypted            |                False                 |
|               id               | 36b49c81-2bc5-46fe-ad3a-8a3abbd630e3 |
|            metadata            |                  {}                  |
|        migration_status        |                 None                 |
|          multiattach           |                False                 |
|              name              |                 None                 |
|     os-vol-host-attr:host      |                 None                 |
| os-vol-mig-status-attr:migstat |                 None                 |
| os-vol-mig-status-attr:name_id |                 None                 |
|  os-vol-tenant-attr:tenant_id  |   d0346e24a9c14e7f86b35833aa33f94d   |
|       replication_status       |               disabled               |
|              size              |                  1                   |
|          snapshot_id           |                 None                 |
|          source_volid          |                 None                 |
|             status             |               creating               |
|           updated_at           |                 None                 |
|            user_id             |   c3c0d20614ce42f6a57361f267bdc017   |
|          volume_type           |                 None                 |
+--------------------------------+--------------------------------------+

root@controller:~# cinder create 30
+--------------------------------+--------------------------------------+
|            Property            |                Value                 |
+--------------------------------+--------------------------------------+
|          attachments           |                  []                  |
|       availability_zone        |                 nova                 |
|            bootable            |                false                 |
|      consistencygroup_id       |                 None                 |
|           created_at           |      2017-07-11T06:58:43.000000      |
|          description           |                 None                 |
|           encrypted            |                False                 |
|               id               | 24299e2b-e7d3-40bc-98b7-446930006c73 |
|            metadata            |                  {}                  |
|        migration_status        |                 None                 |
|          multiattach           |                False                 |
|              name              |                 None                 |
|     os-vol-host-attr:host      |                 None                 |
| os-vol-mig-status-attr:migstat |                 None                 |
| os-vol-mig-status-attr:name_id |                 None                 |
|  os-vol-tenant-attr:tenant_id  |   d0346e24a9c14e7f86b35833aa33f94d   |
|       replication_status       |               disabled               |
|              size              |                  30                  |
|          snapshot_id           |                 None                 |
|          source_volid          |                 None                 |
|             status             |               creating               |
|           updated_at           |                 None                 |
|            user_id             |   c3c0d20614ce42f6a57361f267bdc017   |
|          volume_type           |                 None                 |
+--------------------------------+--------------------------------------+

root@controller:~# cinder list
nova volume+--------------------------------------+-----------+------+------+-------------+----------+-------------+
|                  ID                  |   Status  | Name | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+-----------+------+------+-------------+----------+-------------+
| 24299e2b-e7d3-40bc-98b7-446930006c73 | available |  -   |  30  |      -      |  false   |             |
| 36b49c81-2bc5-46fe-ad3a-8a3abbd630e3 | available |  -   |  1   |      -      |   true   |             |
+--------------------------------------+-----------+------+------+-------------+----------+-------------+

root@controller:~# openstack image create "win_2012_iso" --file Windows_2012_R2_64Bit_Ko_Svr_Std_and_DataCtr_Core_MLF_X19-05188.ISO --disk-format iso --container-format bare   --public
+------------------+---------------------------------------------------------------------------------+
| Field            | Value                                                                           |
+------------------+---------------------------------------------------------------------------------+
| checksum         | 9adaa44e9369f86460fc9a9d8791f511                                                |
| container_format | bare                                                                            |
| created_at       | 2017-07-11T06:57:12Z                                                            |
| disk_format      | iso                                                                             |
| file             | /v2/images/cc3f94f0-dd94-423b-978d-28879c7a9e55/file                            |
| id               | cc3f94f0-dd94-423b-978d-28879c7a9e55                                            |
| min_disk         | 0                                                                               |
| min_ram          | 0                                                                               |
| name             | win_2012_iso                                                                    |
| owner            | d0346e24a9c14e7f86b35833aa33f94d                                                |
| properties       | direct_url='file:///var/lib/glance/images/cc3f94f0-dd94-423b-978d-28879c7a9e55' |
| protected        | False                                                                           |
| schema           | /v2/schemas/image                                                               |
| size             | 4389398528                                                                      |
| status           | active                                                                          |
| tags             |                                                                                 |
| updated_at       | 2017-07-11T06:57:30Z                                                            |
| virtual_size     | None                                                                            |
| visibility       | public                                                                          |
+------------------+---------------------------------------------------------------------------------+

root@controller:~# nova boot --image win_2012_iso --flavor 2 --nic net-id=acaaec10-13b5-4dd0-a623-d826595095a3 --block-device id=36b49c81-2bc5-46fe-ad3a-8a3abbd630e3,source=volume,dest=volume,bus=ide,device=/dev/vdc,type=cdrom,size=1,bootindex=2 --block-device source=volume,id=24299e2b-e7d3-40bc-98b7-446930006c73,dest=volume,size=30,device=/dev/vdb,bootindex=1  win
+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Property                             | Value                                                                                                                                                            |
+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| OS-DCF:diskConfig                    | MANUAL                                                                                                                                                           |
| OS-EXT-AZ:availability_zone          |                                                                                                                                                                  |
| OS-EXT-SRV-ATTR:host                 | -                                                                                                                                                                |
| OS-EXT-SRV-ATTR:hostname             | win                                                                                                                                                              |
| OS-EXT-SRV-ATTR:hypervisor_hostname  | -                                                                                                                                                                |
| OS-EXT-SRV-ATTR:instance_name        | instance-00000038                                                                                                                                                |
| OS-EXT-SRV-ATTR:kernel_id            |                                                                                                                                                                  |
| OS-EXT-SRV-ATTR:launch_index         | 0                                                                                                                                                                |
| OS-EXT-SRV-ATTR:ramdisk_id           |                                                                                                                                                                  |
| OS-EXT-SRV-ATTR:reservation_id       | r-yij9o3gg                                                                                                                                                       |
| OS-EXT-SRV-ATTR:root_device_name     | -                                                                                                                                                                |
| OS-EXT-SRV-ATTR:user_data            | -                                                                                                                                                                |
| OS-EXT-STS:power_state               | 0                                                                                                                                                                |
| OS-EXT-STS:task_state                | scheduling                                                                                                                                                       |
| OS-EXT-STS:vm_state                  | building                                                                                                                                                         |
| OS-SRV-USG:launched_at               | -                                                                                                                                                                |
| OS-SRV-USG:terminated_at             | -                                                                                                                                                                |
| accessIPv4                           |                                                                                                                                                                  |
| accessIPv6                           |                                                                                                                                                                  |
| adminPass                            | 8UCLYdTDSqX9                                                                                                                                                     |
| config_drive                         |                                                                                                                                                                  |
| created                              | 2017-07-11T07:52:39Z                                                                                                                                             |
| description                          | -                                                                                                                                                                |
| flavor                               | smile2 (2)                                                                                                                                                       |
| hostId                               |                                                                                                                                                                  |
| host_status                          |                                                                                                                                                                  |
| id                                   | 255eadc9-5a85-4d73-9860-88a38ab66739                                                                                                                             |
| image                                | win_2012_iso (cc3f94f0-dd94-423b-978d-28879c7a9e55)                                                                                                              |
| key_name                             | -                                                                                                                                                                |
| locked                               | False                                                                                                                                                            |
| metadata                             | {}                                                                                                                                                               |
| name                                 | win                                                                                                                                                              |
| os-extended-volumes:volumes_attached | [{"id": "36b49c81-2bc5-46fe-ad3a-8a3abbd630e3", "delete_on_termination": false}, {"id": "24299e2b-e7d3-40bc-98b7-446930006c73", "delete_on_termination": false}] |
| progress                             | 0                                                                                                                                                                |
| security_groups                      | default                                                                                                                                                          |
| status                               | BUILD                                                                                                                                                            |
| tenant_id                            | d0346e24a9c14e7f86b35833aa33f94d                                                                                                                                 |
| updated                              | 2017-07-11T07:52:40Z                                                                                                                                             |
| user_id                              | c3c0d20614ce42f6a57361f267bdc017                                                                                                                                 |
+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+

root@controller:~# cinder list
+--------------------------------------+--------+------+------+-------------+----------+--------------------------------------+
|                  ID                  | Status | Name | Size | Volume Type | Bootable |             Attached to              |
+--------------------------------------+--------+------+------+-------------+----------+--------------------------------------+
| 24299e2b-e7d3-40bc-98b7-446930006c73 | in-use |  -   |  30  |      -      |  false   | 255eadc9-5a85-4d73-9860-88a38ab66739 |
| 36b49c81-2bc5-46fe-ad3a-8a3abbd630e3 | in-use |  -   |  1   |      -      |   true   | 255eadc9-5a85-4d73-9860-88a38ab66739 |
+--------------------------------------+--------+------+------+-------------+----------+--------------------------------------+

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x