Linux Note 12--Virtual machine

Source: Internet
Author: User
Tags set time time and date

Management ******************** for virtual machines
# # 1. Install # #

1. Direct Installation

Select Virtual machine settings

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M01/89/14/wKiom1gHCwaAFe_dAADFxte5c9A403.png "style=" float: none; "title=" 1.PNG "alt=" Wkiom1ghcwaafe_daadfxte5c9a403.png "/>

Add a virtual machine

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M01/89/12/wKioL1gHCwfzvR62AABJ0OS_i8E379.png "style=" float: none; "title=" 2.PNG "alt=" Wkiol1ghcwfzvr62aabj0os_i8e379.png "/>

Select Local image Installation

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M00/89/14/wKiom1gHCweDNEOFAABngFt5zn8374.png "style=" float: none; "title=" 3.PNG "alt=" Wkiom1ghcwedneofaabngft5zn8374.png "/>

Select Image



650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M02/89/14/wKiom1gHCwiSkRNBAABkvDriOsw203.png "style=" float: none; "title=" 4.PNG "alt=" Wkiom1ghcwiskrnbaabkvdriosw203.png "/>

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M02/89/12/wKioL1gHCwyA_6NyAACNxpaY2Gk263.png "style=" float: none; "title=" 6.PNG "alt=" Wkiol1ghcwya_6nyaacnxpay2gk263.png "/>

Direct Select Next

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/89/14/wKiom1gHCw3jVSYBAABvfcVwYrs427.png "style=" float: none; "title=" 7.PNG "alt=" Wkiom1ghcw3jvsybaabvfcvwyrs427.png "/>

Setting the CPU and memory size

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/89/12/wKioL1gHCw7B0Xj4AABTWP_49po816.png "style=" float: none; "title=" 8.PNG "alt=" Wkiol1ghcw7b0xj4aabtwp_49po816.png "/>

Select disk Size

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/89/14/wKiom1gHCw6iQR5JAABoDm09Jik487.png "style=" float: none; "title=" 9.PNG "alt=" Wkiom1ghcw6iqr5jaabodm09jik487.png "/>

Set the virtual machine name

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M02/89/14/wKiom1gHCw_zgbOkAABwex4AnA8794.png "style=" float: none; "title=" 11.PNG "alt=" Wkiom1ghcw_zgbokaabwex4ana8794.png "/>

Enter the Installation interface

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M02/89/12/wKioL1gHCxDBLyQeAAA_OOgRqYQ925.png "style=" float: none; "title=" 12.PNG "alt=" Wkiol1ghcxdblyqeaaa_oogrqyq925.png "/>

Select language

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M00/89/14/wKiom1gHCxCBsvvgAABq18IEshI297.png "style=" float: none; "title=" 13.PNG "alt=" Wkiom1ghcxcbsvvgaabq18ieshi297.png "/>

Set time and date

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M00/89/12/wKioL1gHCxGTbIg0AACoTsGoeUs492.png "style=" float: none; "title=" 14.PNG "alt=" Wkiol1ghcxgtbig0aacotsgoeus492.png "/>

Select time Zone

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/89/14/wKiom1gHCxaC5mKZAASa1I4brlU731.png "style=" float: none; "title=" 15.PNG "alt=" Wkiom1ghcxac5mkzaasa1i4brlu731.png "/>

Add language

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M01/89/12/wKioL1gHCxfykh2RAADEw_dmR7w378.png "style=" float: none; "title=" 16.PNG "alt=" Wkiol1ghcxfykh2raadew_dmr7w378.png "/>

Choose GUI Mode

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M02/89/12/wKioL1gHCxnStENNAAG4REGHIq0701.png "style=" float: none; "title=" 18.PNG "alt=" Wkiol1ghcxnstennaag4reghiq0701.png "/>

Select Manual Installation

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M00/89/14/wKiom1gHCxqw4sQ-AABOR4lSrOQ869.png "style=" float: none; "title=" 19.PNG "alt=" Wkiom1ghcxqw4sq-aabor4lsroq869.png "/>

Click the Blue String

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M01/89/12/wKioL1gHCxuDAu3TAAAXfV07gLs964.png "style=" float: none; "title=" 22.PNG "alt=" Wkiol1ghcxudau3taaaxfv07gls964.png "/>

Setting up the system partition

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M00/89/12/wKioL1gHCx2yxeUWAAFAN4RhSc4069.png "style=" float: none; "title=" 24.PNG "alt=" Wkiol1ghcx2yxeuwaafan4rhsc4069.png "/>

Accept it

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/89/14/wKiom1gHCx3zWT9bAACPKBC0Iow309.png "style=" float: none; "title=" 26.PNG "alt=" Wkiom1ghcx3zwt9baacpkbc0iow309.png "/>

You can start the installation now and wait for the installation to complete.


650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/89/16/wKioL1gHS--wKIzMAAANyOw0Ptg920.png "title=" capture. PNG "alt=" Wkiol1ghs--wkizmaaanyow0ptg920.png "/>


2. command to install 650) this.width=650; "Src=" http://s4.51cto.com/wyfs02/M01/89/12/ Wkiol1ghcx-tv8ebaabasvmnmia395.png "title=" 30.PNG "style=" Float:none; "alt=" wkiol1ghcx-tv8ebaabasvmnmia395.png "/ >

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M02/89/12/wKioL1gHCxDBLyQeAAA_OOgRqYQ925.png "title=" 12.PNG "Style=" Float:none; "alt=" Wkiol1ghcxdblyqeaaa_oogrqyq925.png "/>

Subsequent installation as described above


3. Script Installation 650) this.width=650; "Src=" http://s3.51cto.com/wyfs02/M02/89/14/ Wkiom1ghcydbyfg5aaamefanpgg797.png "title=" 32.PNG "style=" Float:none; "alt=" wkiom1ghcydbyfg5aaamefanpgg797.png "/ >650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M00/89/14/wKiom1gHCyCCmlipAAA-2URZFmg399.png "title=" 31.PNG "style=" Float:none; "alt=" Wkiom1ghcyccmlipaaa-2urzfmg399.png "/>


650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M02/89/12/wKioL1gHCxDBLyQeAAA_OOgRqYQ925.png "title=" 12.PNG "Style=" Float:none; "alt=" Wkiol1ghcxdblyqeaaa_oogrqyq925.png "/> follow up installation as described above


# # 2. Management # #

Virt-managerturn on the Graphics management tool
Virt-viewer VmnameShow Virtual machines
Virsh ListLists the runningVMS
Virsh List--allList allVMS
Virsh Start VmnameRun the specifiedVMS
Virsh Shurdown VmnameNormal End designationVMS
Virsh Destry VmnameForce end specifiedVMS
Virsh Create Vmname.xmltemporarily restores the specifiedVMS,Vmnamerepresents a front-end management file
Virsh define Vmname.xmlPermanent RecoveryVMS
Virsh undefine vmname.xmlDeleteVMSfront-end management, storage is not deleted


Cases:

Turn on virtual machine management

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M01/89/19/wKiom1gHTM2wQAW1AACp1FGDxZg351.png "style=" float: none; "title=" capture. PNG "alt=" Wkiom1ghtm2wqaw1aacp1fgdxzg351.png "/>

Turn on the virtual machine

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/89/16/wKioL1gHTM7B9W3OAAFnWvmmQ5Y679.png "style=" float: none; "Title=" Captures 1. PNG "alt=" Wkiol1ghtm7b9w3oaafnwvmmq5y679.png "/>

Graceful shutdown of virtual machines

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/89/16/wKioL1gHTM6B-FpTAAB3X7BcWrg248.png "style=" float: none; "Title=" Captures 2. PNG "alt=" Wkiol1ghtm6b-fptaab3x7bcwrg248.png "/>

Force shutdown of virtual machines

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/89/19/wKiom1gHTM-hzqt1AABqnaLNDzY824.png "style=" float: none; "Title=" Captures 3. PNG "alt=" Wkiom1ghtm-hzqt1aabqnalndzy824.png "/> Show all virtual machines

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/89/16/wKioL1gHTM-TA99PAAA_r_66424601.png "style=" float: none; "Title=" Captures 4. PNG "alt=" Wkiol1ghtm-ta99paaa_r_66424601.png "/>



# 3. Virtual Machine Snapshot # #
Qemu-img create-f qcow2-b **.qcow2 **.qcow2


Create a virtual machine snapshot

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/89/16/wKioL1gHTufw2n1uAAAPf6Yd_SE733.png "title=" 1.PNG " alt= "Wkiol1ghtufw2n1uaaapf6yd_se733.png"/>

1. Restore a virtual machine directly from a virtual machine snapshot

Deleting a virtual machine

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/89/19/wKiom1gHT-vRYgwPAAA2Hx2ghlA773.png "style=" float: none; "title=" 1.PNG "alt=" Wkiom1ght-vrygwpaaa2hx2ghla773.png "/>

Select an image that already exists

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/89/16/wKioL1gHT-uRGm3bAABoVnDwnRY596.png "style=" float: none; "title=" 2.PNG "alt=" Wkiol1ght-urgm3baabovndwnry596.png "/>

Select Image

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/89/19/wKiom1gHT--QTMZ7AABaoyElngg554.png "style=" float: none; "title=" 3.PNG "alt=" Wkiom1ght--qtmz7aabaoyelngg554.png "/>

Set virtual memory and CPU size

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/89/16/wKioL1gHT--R0M-AAABPoOBgQvs787.png "style=" float: none; "title=" 4.PNG "alt=" Wkiol1ght--r0m-aaabpoobgqvs787.png "/>

Set the virtual machine name

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M02/89/19/wKiom1gHT--iIqAzAABxJ7fq2sY921.png "style=" float: none; "title=" 5.PNG "alt=" Wkiom1ght--iiqazaabxj7fq2sy921.png "/>

Recovering a virtual machine from a virtual machine snapshot script

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M02/89/19/wKiom1gHT_CBsV9mAACuftjJQtA636.png "style=" float: none; "title=" 6.PNG "alt=" Wkiom1ght_cbsv9maacuftjjqta636.png "/>

Delete virtual machine hello1, restore to Hello

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M02/89/16/wKioL1gHT_DgtxkLAAA9Q878zxQ902.png "style=" float: none; "title=" 7.PNG "alt=" Wkiol1ght_dgtxklaaa9q878zxq902.png "/>


Exercises

Virtual Machine Management Scripts

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M01/89/19/wKiom1gHWLLjtYfsAAChKro1Yik905.png "style=" float: none; "title=" capture. PNG "alt=" Wkiom1ghwlljtyfsaachkro1yik905.png "/>

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M01/89/17/wKioL1gHWLKzXPfCAABQb7C6p5Y219.png "style=" float: none; "title=" 2.PNG "alt=" Wkiol1ghwlkzxpfcaabqb7c6p5y219.png "/>

Test

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M02/89/19/wKiom1gHWLPAR9VEAACKmtWHg4Q466.png "style=" float: none; "title=" 3.PNG "alt=" Wkiom1ghwlpar9veaackmtwhg4q466.png "/>



Linux Note 12--Virtual machine

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.