15.6.5. 스냅샷 하위 항목
15.6.5.1. 스냅샷 하위 항목
가상 머신은 디스크 상태를 여러 스냅샷으로 저장하고 복원합니다. 이는 다른 컬렉션과 유사하게 작동하는
rel="snapshot"
하위 수집을 통해 표현되고 관리됩니다.
각 가상 머신 스냅샷은 다음 하위 요소가 포함된 개별
스냅샷
요소로 표시됩니다.
요소 | 유형 | 설명 | 속성 |
---|---|---|---|
vm id= | GUID | 이 스냅샷과 관련된 가상 머신의 ID 및 URI입니다. | |
link rel="restore" | 관계 | 가상 머신의 스냅샷을 복원하는 링크입니다. | |
link rel="prev" | 관계 | 이 가상 시스템의 이전 스냅샷에 대한 링크입니다. | |
type | string | 스냅샷의 유형입니다. 예를 들면 active 또는 regular 입니다. | |
date | XSD:dateTime 형식: YYYY-MM-DDThh:mm:ss | 스냅샷이 생성된 날짜 및 시간입니다. | |
snapshot_status | string | 스냅샷의 현재 상태입니다. | |
persist_memorystate | 부울 | 스냅샷을 만들 때 가상 머신의 메모리 상태도 포함할지 여부를 정의합니다. |
참고
PUT
를 사용하여 스냅샷 요소를 수정할 수 없습니다.
예 15.39. 가상 머신 스냅샷의 XML 표현
<snapshot id="00000000-0000-0000-0000-000000000000" href="/ovirt-engine/api/vms/00000000-0000-0000-0000-000000000000/snapshots/ 00000000-0000-0000-0000-000000000000"> <actions> <link rel="restore" href="/ovirt-engine/api/vms/00000000-0000-0000-0000-000000000000/snapshots/ 00000000-0000-0000-0000-000000000000/restore"/> <link rel="prev" href="/ovirt-engine/api/vms/00000000-0000-0000-0000-000000000000/snapshots/ </actions> <vm id="00000000-0000-0000-0000-000000000000" href="/ovirt-engine/api/vms/00000000-0000-0000-0000-000000000000"/> <description>Virtual Machine 1 - Snapshot A</description> <type>active</type> <date>2010-08-16T14:24:29</date> <snapshot_status>ok</snapshot_status> <persist_memorystate>false</persist_memorystate> </snapshot>
All-Content: true
헤더가 있는 가상 머신 스냅샷에 대한 GET
요청을 사용하여 스냅샷 표현과 함께 추가 OVF 데이터를 포함합니다.
Accept
헤더는 기본적으로 비워진 경우 application/xml
로, 데이터는 XML 태그를 방해하지 않도록 HTML 엔티티로 표시됩니다. Accept: application/json
헤더를 지정하면 표준 XML 태그로 데이터가 반환됩니다. 이 예제 표현은 가독성을 개선하기 위해 표준 블록 형식에서 포맷되었습니다.
예 15.40. 스냅샷에 대한 추가 ovf 데이터의 XML 표현
GET /ovirt-engine/api/vms/42ec2621-7ad6-4ca2-bd68-973a44b2562e/snapshots HTTP/1.1 All-Content: true <?xml version='1.0' encoding='UTF-8'?> <ovf:Envelope xmlns:ovf=\"http://schemas.dmtf.org/ovf/envelope/1/\" xmlns:rasd=\"http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData\" xmlns:vssd=\"http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_VirtualSystemSettingData\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" ovf:version=\"3.5.0.0\"> <References> <File ovf:href=\"ad353554-f668-46cf-aa3c-e57383de2c92/40456d92-3687-4a85-bab3-87b4cc7af459\" ovf:id=\"40456d92-3687-4a85-bab3-87b4cc7af459\" ovf:size=\"10737418240\" ovf:description=\"Active VM\"/> <Nic ovf:id=\"be14bfc8-3dbd-4ac1-ba02-c6dfa7fc707c\"/> </References> <Section xsi:type=\"ovf:NetworkSection_Type\"> <Info>List of networks</Info><Network ovf:name=\"Network 1\"/> </Section> <Section xsi:type=\"ovf:DiskSection_Type\"> <Info>List of Virtual Disks</Info> <Disk ovf:diskId=\"40456d92-3687-4a85-bab3-87b4cc7af459\" ovf:size=\"10\" ovf:actual_size=\"0\" ovf:vm_snapshot_id=\"a209216d-2909-4802-8886-02aad55dccc8\" ovf:parentRef=\"\" ovf:fileRef=\"ad353554-f668-46cf-aa3c-e57383de2c92/40456d92-3687-4a85-bab3-87b4cc7af459\" ovf:format=\"http://www.vmware.com/specifications/vmdk.html#sparse\" ovf:volume-format=\"RAW\" ovf:volume-type=\"Preallocated\" ovf:disk-interface=\"VirtIO\" ovf:boot=\"true\" ovf:disk-alias=\"VM_01_Disk1\" ovf:wipe-after-delete=\"false\"/> </Section> <Content ovf:id=\"out\" xsi:type=\"ovf:VirtualSystem_Type\"> <CreationDate>2015/02/09 13:53:53</CreationDate> <ExportDate>2015/02/10 00:39:24</ExportDate> <DeleteProtected>false</DeleteProtected> <SsoMethod>guest_agent</SsoMethod> <IsSmartcardEnabled>false</IsSmartcardEnabled> <TimeZone>Etc/GMT</TimeZone><default_boot_sequence>0</default_boot_sequence> <Generation>1</Generation> <VmType>1</VmType> <MinAllocatedMem>1024</MinAllocatedMem> <IsStateless>false</IsStateless> <IsRunAndPause>false</IsRunAndPause> <AutoStartup>false</AutoStartup> <Priority>1</Priority> <CreatedByUserId>fdfc627c-d875-11e0-90f0-83df133b58cc</CreatedByUserId> <IsBootMenuEnabled>false</IsBootMenuEnabled> <IsSpiceFileTransferEnabled>true</IsSpiceFileTransferEnabled> <IsSpiceCopyPasteEnabled>true</IsSpiceCopyPasteEnabled> <Name>VM_01</Name> <TemplateId>00000000-0000-0000-0000-000000000000</TemplateId> <TemplateName>Blank</TemplateName> <IsInitilized>true</IsInitilized> <Origin>3</Origin> <DefaultDisplayType>1</DefaultDisplayType> <TrustedService>false</TrustedService> <OriginalTemplateId>00000000-0000-0000-0000-000000000000</OriginalTemplateId> <OriginalTemplateName>Blank</OriginalTemplateName> <UseLatestVersion>false</UseLatestVersion> <Section ovf:id=\"42ec2621-7ad6-4ca2-bd68-973a44b2562e\" ovf:required=\"false\" xsi:type=\"ovf:OperatingSystemSection_Type\"> <Info>Guest Operating System</Info> <Description>other</Description> </Section> <Section xsi:type=\"ovf:VirtualHardwareSection_Type\"> <Info>1 CPU, 1024 Memeory</Info> <System> <vssd:VirtualSystemType>ENGINE 3.5.0.0</vssd:VirtualSystemType> </System> <Item> <rasd:Caption>1 virtual cpu</rasd:Caption> <rasd:Description>Number of virtual CPU</rasd:Description> <rasd:InstanceId>1</rasd:InstanceId> <rasd:ResourceType>3</rasd:ResourceType> <rasd:num_of_sockets>1</rasd:num_of_sockets> <rasd:cpu_per_socket>1</rasd:cpu_per_socket> </Item> <Item> <rasd:Caption>1024 MB of memory</rasd:Caption> <rasd:Description>Memory Size</rasd:Description> <rasd:InstanceId>2</rasd:InstanceId> <rasd:ResourceType>4</rasd:ResourceType> <rasd:AllocationUnits>MegaBytes</rasd:AllocationUnits> <rasd:VirtualQuantity>1024</rasd:VirtualQuantity> </Item> <Item> <rasd:Caption>VM_01_Disk1</rasd:Caption> <rasd:InstanceId>40456d92-3687-4a85-bab3-87b4cc7af459</rasd:InstanceId> <rasd:ResourceType>17</rasd:ResourceType> <rasd:HostResource>ad353554-f668-46cf-aa3c-e57383de2c92/40456d92-3687-4a85-bab3-87b4cc7af459</rasd:HostResource> <rasd:Parent>00000000-0000-0000-0000-000000000000</rasd:Parent> <rasd:Template>00000000-0000-0000-0000-000000000000</rasd:Template> <rasd:ApplicationList></rasd:ApplicationList> <rasd:StoragePoolId>00000002-0002-0002-0002-000000000255</rasd:StoragePoolId> <rasd:CreationDate>2015/02/09 13:54:41</rasd:CreationDate> <rasd:LastModified>1970/01/01 00:00:00</rasd:LastModified> <rasd:last_modified_date>2015/02/10 00:39:22</rasd:last_modified_date> <Type>disk</Type> <Device>disk</Device> <rasd:Address>{slot=0x06, bus=0x00, domain=0x0000, type=pci, function=0x0}</rasd:Address> <BootOrder>1</BootOrder> <IsPlugged>true</IsPlugged> <IsReadOnly>false</IsReadOnly> <Alias>virtio-disk0</Alias> </Item> <Item> <rasd:Caption>Ethernet adapter on ovirtmgmt</rasd:Caption> <rasd:InstanceId>be14bfc8-3dbd-4ac1-ba02-c6dfa7fc707c</rasd:InstanceId> <rasd:ResourceType>10</rasd:ResourceType> <rasd:OtherResourceType>ovirtmgmt</rasd:OtherResourceType> <rasd:ResourceSubType>3</rasd:ResourceSubType> <rasd:Connection>ovirtmgmt</rasd:Connection> <rasd:Linked>true</rasd:Linked> <rasd:Name>nic1</rasd:Name> <rasd:MACAddress>00:1a:4a:87:cb:00</rasd:MACAddress> <rasd:speed>1000</rasd:speed> <Type>interface</Type> <Device>bridge</Device> <rasd:Address>{slot=0x03, bus=0x00, domain=0x0000, type=pci, function=0x0}</rasd:Address> <BootOrder>0</BootOrder> <IsPlugged>true</IsPlugged> <IsReadOnly>false</IsReadOnly> <Alias>net0</Alias> </Item> <Item> <rasd:Caption>USB Controller</rasd:Caption> <rasd:InstanceId>3</rasd:InstanceId> <rasd:ResourceType>23</rasd:ResourceType> <rasd:UsbPolicy>DISABLED</rasd:UsbPolicy> </Item> <Item> <rasd:Caption>Graphical Controller</rasd:Caption> <rasd:InstanceId>17bbf0db-7cf0-4529-9b53-dee6dee41cfd</rasd:InstanceId> <rasd:ResourceType>20</rasd:ResourceType> <rasd:VirtualQuantity>1</rasd:VirtualQuantity> <rasd:SinglePciQxl>false</rasd:SinglePciQxl> <Type>video</Type> <Device>qxl</Device> <rasd:Address>{slot=0x02, bus=0x00, domain=0x0000, type=pci, function=0x0}</rasd:Address> <BootOrder>0</BootOrder> <IsPlugged>true</IsPlugged> <IsReadOnly>true</IsReadOnly> <Alias>video0</Alias> <SpecParams> <vram>32768</vram> <heads>1</heads> </SpecParams> </Item> <Item> <rasd:Caption>CDROM</rasd:Caption> <rasd:InstanceId>7ce1bd14-d98a-43ba-beee-520bdfd9c698</rasd:InstanceId> <rasd:ResourceType>15</rasd:ResourceType> <Type>disk</Type> <Device>cdrom</Device> <rasd:Address>{bus=1, controller=0, type=drive, target=0, unit=0}</rasd:Address> <BootOrder>0</BootOrder> <IsPlugged>true</IsPlugged> <IsReadOnly>true</IsReadOnly> <Alias>ide0-1-0</Alias></Item> <Item> <rasd:ResourceType>0</rasd:ResourceType> <rasd:InstanceId>8758c42f-7523-461b-82bb-41d91e46fd36</rasd:InstanceId> <Type>controller</Type> <Device>usb</Device> <rasd:Address>{slot=0x01, bus=0x00, domain=0x0000, type=pci, function=0x2}</rasd:Address> <BootOrder>0</BootOrder> <IsPlugged>true</IsPlugged> <IsReadOnly>false</IsReadOnly> <Alias>usb0</Alias> </Item> <Item> <rasd:ResourceType>0</rasd:ResourceType> <rasd:InstanceId>58f1a596-553e-4e95-9331-64b5d8cebe2e</rasd:InstanceId> <Type>controller</Type> <Device>ide</Device> <rasd:Address>{slot=0x01, bus=0x00, domain=0x0000, type=pci, function=0x1}</rasd:Address> <BootOrder>0</BootOrder> <IsPlugged>true</IsPlugged> <IsReadOnly>false</IsReadOnly> <Alias>ide0</Alias> </Item> <Item> <rasd:ResourceType>0</rasd:ResourceType> <rasd:InstanceId>2f4f8aa5-25eb-4a31-b841-50dc48fce4a7</rasd:InstanceId> <Type>channel</Type> <Device>unix</Device> <rasd:Address>{bus=0, controller=0, type=virtio-serial, port=1}</rasd:Address> <BootOrder>0</BootOrder> <IsPlugged>true</IsPlugged> <IsReadOnly>false</IsReadOnly> <Alias>channel0</Alias> </Item> <Item> <rasd:ResourceType>0</rasd:ResourceType> <rasd:InstanceId>edaac3ed-2ab6-48b1-ae77-cc98f8b45bd8</rasd:InstanceId> <Type>channel</Type> <Device>unix</Device> <rasd:Address>{bus=0, controller=0, type=virtio-serial, port=2}</rasd:Address> <BootOrder>0</BootOrder> <IsPlugged>true</IsPlugged> <IsReadOnly>false</IsReadOnly> <Alias>channel1</Alias> </Item> <Item> <rasd:ResourceType>0</rasd:ResourceType> <rasd:InstanceId>8dfed248-5164-41d3-8b6e-46aef9798d84</rasd:InstanceId> <Type>channel</Type> <Device>spicevmc</Device> <rasd:Address>{bus=0, controller=0, type=virtio-serial, port=3}</rasd:Address> <BootOrder>0</BootOrder> <IsPlugged>true</IsPlugged> <IsReadOnly>false</IsReadOnly> <Alias>channel2</Alias> </Item> <Item> <rasd:ResourceType>0</rasd:ResourceType> <rasd:InstanceId>d184185e-ee19-442a-88f5-6a48f14164e1</rasd:InstanceId> <Type>controller</Type> <Device>virtio-scsi</Device> <rasd:Address>{slot=0x04, bus=0x00, domain=0x0000, type=pci, function=0x0}</rasd:Address> <BootOrder>0</BootOrder> <IsPlugged>true</IsPlugged> <IsReadOnly>false</IsReadOnly> <Alias>scsi0</Alias> </Item> <Item> <rasd:ResourceType>0</rasd:ResourceType> <rasd:InstanceId>374d219e-e2ff-4755-a544-d537c87e82df</rasd:InstanceId> <Type>controller</Type> <Device>virtio-serial</Device> <rasd:Address>{slot=0x05, bus=0x00, domain=0x0000, type=pci, function=0x0}</rasd:Address> <BootOrder>0</BootOrder> <IsPlugged>true</IsPlugged> <IsReadOnly>false</IsReadOnly> <Alias>virtio-serial0</Alias> </Item> <Item> <rasd:ResourceType>0</rasd:ResourceType> <rasd:InstanceId>cf3d7121-9db0-4fd1-bd12-50ce4e1ce379</rasd:InstanceId> <Type>balloon</Type> <Device>memballoon</Device> <rasd:Address>{slot=0x07, bus=0x00, domain=0x0000, type=pci, function=0x0}</rasd:Address> <BootOrder>0</BootOrder> <IsPlugged>true</IsPlugged> <IsReadOnly>true</IsReadOnly> <Alias>balloon0</Alias> <SpecParams> <model>virtio</model> </SpecParams> </Item> </Section> </Content> </ovf:Envelope>
실행 중인 가상 머신의 스냅샷(활성 스냅샷)을 생성하거나
POST
메서드를 사용하여 종료할 수 있습니다.
예 15.41. 가상 머신 스냅샷 생성
POST /ovirt-engine/api/vms/00000000-0000-0000-0000-000000000000/snapshots/ HTTP/1.1 Accept: application/xml Content-type: application/xml <snapshot> <description>Snapshot description</description> </snapshot>
중요
OpenStack 볼륨(Cinder) 디스크를 사용하는 가상 머신의 실시간 스냅샷을 생성하기 전에 게스트 파일 시스템을 수동으로 정지해야 합니다. 자세한 내용은 15.7.14절. “가상 머신 파일 시스템 작업 중단” 및 15.7.15절. “가상 머신 파일 시스템 작업” 을 참조하십시오.
스냅샷 표시에서
rel="restore"
작업 링크를 사용하여 가상 머신 스냅샷을 복원할 수 있습니다.
예 15.42. 가상 머신 스냅샷 복원
POST /ovirt-engine/api/vms/00000000-0000-0000-0000-000000000000/snapshots/00000000-0000-0000-0000-000000000000/restore HTTP/1.1 Accept: application/xml Content-type: application/xml <action/>