introduction to virtualization, virsh and virt-manager

150
Introduction to Virtualization, Virsh Commands and Virt-Manager Chin Pin Chang 04/07/2014 1

Upload: walkerchang

Post on 25-Jan-2015

510 views

Category:

Software


14 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Introduction to Virtualization, Virsh and Virt-Manager

Introduction to Virtualization, Virsh Commands and Virt-Manager

Chin Pin Chang

04/07/2014

1

Page 2: Introduction to Virtualization, Virsh and Virt-Manager

Outline• Virtualization

– Introduction– Types of Virtualization – KVM– Practice: KVM Installation

• Virsh Commands– Introduction– Practice: 3 Units

• Virt-Manager • Conclusion• References

2

Page 3: Introduction to Virtualization, Virsh and Virt-Manager

3

Virtualization Introduction

• Virtualization is a broad term that refers to the abstraction of computer physical resources such as servers, network, memory and storage

Page 4: Introduction to Virtualization, Virsh and Virt-Manager

4

Virtualization Introduction (cont.)

• Without Virtualization • With Virtualization

Page 5: Introduction to Virtualization, Virsh and Virt-Manager

5

Why Virtualization• Resource sharing• High utilization of resource• Reduce the number of physical servers• Ability to bring up new server quickly• Easy maintenance and monitoring

Page 6: Introduction to Virtualization, Virsh and Virt-Manager

6

Types of Virtualization• Server Virtualization

– Full virtualization, Paravirtualization, Hardware-assisted virtualization

• Application Virtualization• Desktop Virtualization• Presentation Virtualization• Network Virtualization• Storage Virtualization

Page 7: Introduction to Virtualization, Virsh and Virt-Manager

7

KVM Introduction• KVM (Kernel-based Virtual Machine)

– A Linux kernel module that turns Linux into a hypervisor– Full virtualization

Page 8: Introduction to Virtualization, Virsh and Virt-Manager

8

Install KVM

• Check that your CPU supports hardware virtualization

– 0 indicates that your CPU doesn’t support hardware virtualization

– 1 or more indicates that it supports hardware virtualization

Page 9: Introduction to Virtualization, Virsh and Virt-Manager

9

Install KVM (cont.)

• Check BIOS– Support

– Not support

Page 10: Introduction to Virtualization, Virsh and Virt-Manager

10

Install KVM (cont.)

• Install necessary packages– qemu-kvm– libvirt-bin – ubuntu-vm-builder – bridge-utils

Page 11: Introduction to Virtualization, Virsh and Virt-Manager

11

Add Users to Libvirtd and KVM Groups

• Add user "username" to libvirtd

• Add user " username" to KVM

• Need to re-login

Page 12: Introduction to Virtualization, Virsh and Virt-Manager

12

Verify Installation

• Check groups

• Verify Installation

• Change the device's group

Page 13: Introduction to Virtualization, Virsh and Virt-Manager

13

Install Virt-manager

• Install virt-manager

• Start virt-manager

Page 14: Introduction to Virtualization, Virsh and Virt-Manager

14

Step 1 - Create new virtual machine

Page 15: Introduction to Virtualization, Virsh and Virt-Manager

15

Step 2 – Locate install media

Page 16: Introduction to Virtualization, Virsh and Virt-Manager

16

Step 3 – Specify CPU and Memory

Page 17: Introduction to Virtualization, Virsh and Virt-Manager

17

Step 4 – Specify Storage

Page 18: Introduction to Virtualization, Virsh and Virt-Manager

18

Step 5 – Specify Network

Page 19: Introduction to Virtualization, Virsh and Virt-Manager

19

Install Ubuntu Server

Page 20: Introduction to Virtualization, Virsh and Virt-Manager

20

Virsh Introduction

• Virsh is a command line interface tool for managing VM and the hypervisor

Page 21: Introduction to Virtualization, Virsh and Virt-Manager

21

Virsh Introduction (cont.)

• Virsh Commands Classification– Domain management commands – Domain monitoring commands– Host and hypervisor commands– Interface commands– Network filter commands– Virtual networking commands– Node device commands– Secrets commands– Domain snapshot commands– Storage pool commands– Storage volume commands– Virsh commands

Page 22: Introduction to Virtualization, Virsh and Virt-Manager

22

Virsh Commands

Unit 1Domain Management

Page 23: Introduction to Virtualization, Virsh and Virt-Manager

23

Introduction

• Domain management– Is used to manage VM– Major commands: define, start, destroy, suspend,

resume and so on

Page 24: Introduction to Virtualization, Virsh and Virt-Manager

How to use virsh

24

Page 25: Introduction to Virtualization, Virsh and Virt-Manager

define

Item Content

Description Define, but don't start, a guest domain from an XML file

Input 1. XML file

Example # define vm1.xml

Response Domain vm1 defined from vm1.xml

25

Page 26: Introduction to Virtualization, Virsh and Virt-Manager

Define a VM

26

Page 27: Introduction to Virtualization, Virsh and Virt-Manager

XML for VM

<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'> <name>vm1</name> <uuid>b7cb10e2-c6af-a328-ad75-3e09747f0564</uuid> <memory>524288</memory> <currentMemory>524288</currentMemory> <vcpu>1</vcpu> <os> <type arch='armv7l' machine='vexpress-a15'>hvm</type> <kernel>/root/zImage</kernel> <cmdline>earlyprintk=ttyAMA0 console=ttyAMA0 mem=512M root=/dev/vda rw ip=192.168.20.56::192.168.20.101:vm1:eth0:off --no-log</cmdline> <dtb>/root/guest-vexpress.dtb</dtb> </os> <features> <acpi/> <pae/> </features><!-- <cpu> <model>cortex-a15</model> </cpu> -->

27

Page 28: Introduction to Virtualization, Virsh and Virt-Manager

XML for VM (cont.)

<clock offset='utc'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>destroy</on_crash> <devices> <emulator>/usr/bin/qemu-system-arm</emulator> <disk type='file' device='disk'> <driver name='qemu' type='raw' cache='none'/> <source file='/root/nfs/ubuntu1G.img'/> <target dev='vda' bus='virtio'/> </disk> <interface type='bridge'> <source bridge='virbr0'/> <mac address='52:54:00:12:34:55'/> <model type='virtio'/> </interface> <console type='pty'/> </devices></domain>

28

Page 29: Introduction to Virtualization, Virsh and Virt-Manager

XML parameters

• name– Virtual machine name

• uuid– A globally unique identifier for the virtual machine

• current memory– The actual allocation of memory for the VM

• type– The type of operating system in the virtual machine

• kernel– The fully-qualified path to the kernel image in the host OS

29

Page 30: Introduction to Virtualization, Virsh and Virt-Manager

XML parameters (cont.)

• cmdline– The arguments to be passed to the kernel at boot time

• dtb– The fully-qualified path to the device tree binary image in

the host OS• emulator

– The fully qualified path to the device model emulator binary• disk

– The main container for describing disks• source file

– The resource on the host that is being accessed in the guest

30

Page 31: Introduction to Virtualization, Virsh and Virt-Manager

XML parameters (cont.)

• target– The source can be accessed in the guest

• interface type– A network interface visible to the guest

• source bridge– The interface of the network

• mac address– The address of the network

• model type– The model of emulated network interface

31

Page 32: Introduction to Virtualization, Virsh and Virt-Manager

start

Item Content

Description Start a guest domain, either from the last managed save state, or via a fresh boot if no managed save state is present

Input 1.domain

Example # start vm1

Response Domain vm1 started

32

Page 33: Introduction to Virtualization, Virsh and Virt-Manager

Start VM

33

Page 34: Introduction to Virtualization, Virsh and Virt-Manager

domid

Item Content

Description Convert a domain name or UUID to domain id

Input 1. domain

Example # domid vm1

Response 1

34

Page 35: Introduction to Virtualization, Virsh and Virt-Manager

domname

Item Content

Description Convert a guest domain id or UUID to guest domain name

Input 1. domain

Example # domname 1

Response vm1

35

Page 36: Introduction to Virtualization, Virsh and Virt-Manager

domuuid

Item Content

Description Convert a guest domain name or id to guest domain UUID

Input 1. domain

Example # domuuid vm1

Response b7cb10e2-c6af-a328-ad75-3e09747f0564

36

Page 37: Introduction to Virtualization, Virsh and Virt-Manager

VM Information

• The domain ID

• The domain name

• The domain uuid

37

Page 38: Introduction to Virtualization, Virsh and Virt-Manager

autostart

Item Content

Description Enable and disable the automatic starting of a guest domain when the libvirt daemon starts

Input 1. domain

Example # autostart vm1

Response Domain vm1 marked as autostarted

38

Page 39: Introduction to Virtualization, Virsh and Virt-Manager

Auto start VM

39

Page 40: Introduction to Virtualization, Virsh and Virt-Manager

list

Item Content

Description Returns a list of guest domains

Input N/A

Example # list

Response virsh # list Id Name State ---------------------------------------------------- 1 vm1 running

40

Page 41: Introduction to Virtualization, Virsh and Virt-Manager

List VM

41

Page 42: Introduction to Virtualization, Virsh and Virt-Manager

console

Item Content

Description Connect the virtual serial console for the guest

Input 1. domain

Example # console vm1

Response Connected to domain vm1 Escape character is ^]

42

Page 43: Introduction to Virtualization, Virsh and Virt-Manager

Connect to VM

43

Page 44: Introduction to Virtualization, Virsh and Virt-Manager

Connect to VM (cont.)

44

• Launch Apache service

• Check Apache service

Page 45: Introduction to Virtualization, Virsh and Virt-Manager

Connect to VM (cont.)

• Check the IP of the VM

45

Page 46: Introduction to Virtualization, Virsh and Virt-Manager

Connect to VM (cont.)

• Check /var/www/index.html

• Web page

46

Page 47: Introduction to Virtualization, Virsh and Virt-Manager

suspend

Item Content

Description Suspend a running guest domain

Input 1.domain

Example # suspend vm1

Response Domain vm1 suspended

47

Page 48: Introduction to Virtualization, Virsh and Virt-Manager

Suspend VM

• Web page

48

Page 49: Introduction to Virtualization, Virsh and Virt-Manager

resume

Item Content

Description Resume a guest domain

Input 1.domain

Example # resume vm1

Response Domain vm1 resumed

49

Page 50: Introduction to Virtualization, Virsh and Virt-Manager

Resume VM

• Web page

50

Page 51: Introduction to Virtualization, Virsh and Virt-Manager

save

Item Content

Description Save the running state of a guest domain to a file

Input 1.domain 2.file

Example # save vm1 image

Response Domain vm1 saved to image

51

Page 52: Introduction to Virtualization, Virsh and Virt-Manager

restore

Item Content

Description Restore a guest domain

Input 1.file

Example # restore image

Response Domain restored from image

52

Page 53: Introduction to Virtualization, Virsh and Virt-Manager

53

Save and Restore scenario

S0

Save the VM

Restore the VM

Start the VM

Modify index.htm

S0S2S1

Step 4Step 3Step 2Step 1

Page 54: Introduction to Virtualization, Virsh and Virt-Manager

Step 1

• Save the VM

• The saved file

54

Page 55: Introduction to Virtualization, Virsh and Virt-Manager

Step 2 and 3

• Start the VM• Modify /var/www/index.html

• Web page

55

Page 56: Introduction to Virtualization, Virsh and Virt-Manager

Step 4

• Restore the VM

• Web page

56

Page 57: Introduction to Virtualization, Virsh and Virt-Manager

destroy

Item Content

Description Immediately terminates a running guest domain, releasing any resources in use by it

Input 1.domain

Example # destroy vm1

Response Domain vm1 destroyed

57

Page 58: Introduction to Virtualization, Virsh and Virt-Manager

Destroy VM

58

Page 59: Introduction to Virtualization, Virsh and Virt-Manager

The memory information of the host

• Before destroying the VM

• After destroying the VM

59

Page 60: Introduction to Virtualization, Virsh and Virt-Manager

undefine

Item Content

Description Remove the configuration for an inactive guest domain

Input 1.domain

Example # undefine vm1

Response Domain vm1 has been undefined

60

Page 61: Introduction to Virtualization, Virsh and Virt-Manager

Undefine VM

61

Page 62: Introduction to Virtualization, Virsh and Virt-Manager

62

Virsh Commands

Unit 2Interface Management and

Network Management

Page 63: Introduction to Virtualization, Virsh and Virt-Manager

63

Introduction

• Interface management– To create an interface on the host for VM

Page 64: Introduction to Virtualization, Virsh and Virt-Manager

64

iface-define

Item Content

Description Define a physical host network interface

Input 1. XML file

Example # iface-define br1.xml

Response Interface br1 defined from br1.xml

Page 65: Introduction to Virtualization, Virsh and Virt-Manager

65

Define an interface

• Interface br1

Page 66: Introduction to Virtualization, Virsh and Virt-Manager

66

XML for Interface<interface type='bridge' name='br1'> <start mode='onboot'/> <bridge> <interface type='vlan' name='bond0.1'> <vlan tag='1'> <interface name='bond1'/> </vlan> </interface> </bridge> </interface>

Page 67: Introduction to Virtualization, Virsh and Virt-Manager

XML parameters

• interface type– Network interface type

• interface name– The name of interface

• bridge type – The type of bridge

• vlan tag– Use to tag of the vlan

67

Page 68: Introduction to Virtualization, Virsh and Virt-Manager

68

iface-start

Item Content

Description Enables and starts a physical host network interface

Input 1. interface

Example # iface-start br1

Response Interface br1 started

Page 69: Introduction to Virtualization, Virsh and Virt-Manager

69

Start interface

Page 70: Introduction to Virtualization, Virsh and Virt-Manager

70

iface-name

Item Content

Description Returns the physical host interface name for a MAC address

Input 1. interface(MAC address)

Example # iface-name 3a:a0:42:19:ca:b2

Response br1

Page 71: Introduction to Virtualization, Virsh and Virt-Manager

71

iface-mac

Item Content

Description Returns the MAC address for a physical host network interface

Input 1. interface

Example # iface-mac br1

Response 3a:a0:42:19:ca:b2

Page 72: Introduction to Virtualization, Virsh and Virt-Manager

72

Interface Information

• The interface name

• The interface mac

Page 73: Introduction to Virtualization, Virsh and Virt-Manager

73

iface-destroy

Item Content

Description Shut down and disable a physical host network interface

Input 1. interface

Example # iface-destroy br1

Response Interface br1 destroyed

Page 74: Introduction to Virtualization, Virsh and Virt-Manager

74

Destroy interface

Page 75: Introduction to Virtualization, Virsh and Virt-Manager

75

iface-undefine

Item Content

Description Removes the configuration information for a physical host network interface

Input 1. interface

Example # iface-undefine br1

Response Interface br1 undefined

Page 76: Introduction to Virtualization, Virsh and Virt-Manager

76

Undefine interface

Page 77: Introduction to Virtualization, Virsh and Virt-Manager

77

Introduction

• Network management– Libvirt has the capability to define virtual networks

which can then be used by domains and linked to actual network devices

Page 78: Introduction to Virtualization, Virsh and Virt-Manager

78

net-define

Item Content

Description Adds a new permanent virtual network from an XML file, without starting it

Input 1. file

Example # net-define vlan1.xml

Response Network vlan1 defined from vlan1.xml

Page 79: Introduction to Virtualization, Virsh and Virt-Manager

79

Define network

• Network vlan1

Page 80: Introduction to Virtualization, Virsh and Virt-Manager

80

XML for Network<network > <name>vlan1</name> <forward mode='bridge'/> <bridge name='br1' /></network>

Page 81: Introduction to Virtualization, Virsh and Virt-Manager

XML parameters

• name– Virtual network name

• forward mode– Inclusion of the forward element indicates that the virtual

network is to be connected to the physical LAN

• bridge name– The name of a bridge device

81

Page 82: Introduction to Virtualization, Virsh and Virt-Manager

82

net-start

Item Content

Description Starts a (previously defined) inactive virtual network

Input 1. network

Example # net-start vlan1

Response Network vlan1 started

Page 83: Introduction to Virtualization, Virsh and Virt-Manager

83

Start network

Page 84: Introduction to Virtualization, Virsh and Virt-Manager

84

net-autostart

Item Content

Description Enable or disable the automatic starting of a virtual network, when the libvirt daemon starts

Input 1. network

Example # net-autostart vlan1

Response Network vlan1 marked as autostarted

Page 85: Introduction to Virtualization, Virsh and Virt-Manager

85

Auto start network

Page 86: Introduction to Virtualization, Virsh and Virt-Manager

86

net-infoItem Content

Description Displays basic information for a virtual network

Input 1. network

Example # net-info vlan1

Response

Name vlan1 UUID f1f1cd7e-b623-4d7e-94c8-2047da1decef Active: yes Persistent: yes Autostart: yes Bridge: br1

Page 87: Introduction to Virtualization, Virsh and Virt-Manager

87

Network Information

Page 88: Introduction to Virtualization, Virsh and Virt-Manager

88

net-name

Item Content

Description When given a network UUID, returns its corresponding network name

Input 1. network

Example # net-name f1f1cd7e-b623-4d7e-94c8-2047da1decef

Response vlan1

Page 89: Introduction to Virtualization, Virsh and Virt-Manager

89

net-uuid

Item Content

Description When given a network name, returns its corresponding UUID

Input 1. network

Example # net-uuid vlan1

Response f1f1cd7e-b623-4d7e-94c8-2047da1decef

Page 90: Introduction to Virtualization, Virsh and Virt-Manager

90

Network Information

• The network name

• The network uuid

Page 91: Introduction to Virtualization, Virsh and Virt-Manager

91

net-destroy

Item Content

Description Shuts down a running virtual network

Input 1. network

Example # net-destroy vlan1

Response Network vlan1 destroyed

Page 92: Introduction to Virtualization, Virsh and Virt-Manager

92

Destroy network

Page 93: Introduction to Virtualization, Virsh and Virt-Manager

93

net-undefine

Item Content

Description Removes an inactive virtual network from the libvirt configuration

Input 1. network

Example # net-undefine vlan1

Response Network vlan1 has been undefined

Page 94: Introduction to Virtualization, Virsh and Virt-Manager

94

Undefine network

Page 95: Introduction to Virtualization, Virsh and Virt-Manager

95

Interface and Network scenario

Hostvirbr0

br1 br2

VM1 VM2 VM3

IP: 192.168.1.101 192.168.1.102 192.168.1.103

vlan1

vlan2

Page 96: Introduction to Virtualization, Virsh and Virt-Manager

96

Example

• Define the interfaces br1 and br2

Page 97: Introduction to Virtualization, Virsh and Virt-Manager

97

XML for host

• br1.xml<interface type='bridge' name='br1'> <start mode='onboot'/> <bridge> <interface type='vlan' name='bond0.1'> <vlan tag='1'> <interface name='bond1'/> </vlan> </interface> </bridge> </interface>

Page 98: Introduction to Virtualization, Virsh and Virt-Manager

98

XML for host (cont.)

• br2.xml<interface type='bridge' name='br2'> <start mode='onboot'/> <bridge> <interface type='vlan' name='bond0.2'> <vlan tag=‘2'> <interface name='bond2'/> </vlan> </interface> </bridge> </interface>

Page 99: Introduction to Virtualization, Virsh and Virt-Manager

99

XML for VM• Modify VM1.xml

• Modify VM2.xml

• Modify VM3.xml

Page 100: Introduction to Virtualization, Virsh and Virt-Manager

100

Define VM

• Define VM1, VM2 and VM3

Page 101: Introduction to Virtualization, Virsh and Virt-Manager

101

Start VM

• Start VM1, VM2 and VM3

Page 102: Introduction to Virtualization, Virsh and Virt-Manager

102

Start interface

• Start interface br1 and br2

Page 103: Introduction to Virtualization, Virsh and Virt-Manager

103

Connect to VM

• Assign IP (192.168.0.101) to VM1

Page 104: Introduction to Virtualization, Virsh and Virt-Manager

104

Connect to VM (cont.)

• Assign IP (192.168.0.102) to VM2

Page 105: Introduction to Virtualization, Virsh and Virt-Manager

105

Connect to VM (cont.)

• Assign IP (192.168.0.103) to VM3

Page 106: Introduction to Virtualization, Virsh and Virt-Manager

106

Result

• VM1 ping VM2

• VM1 ping VM3

Page 107: Introduction to Virtualization, Virsh and Virt-Manager

107

Result (cont.)

• VM3 ping VM1

• VM3 ping VM2

Page 108: Introduction to Virtualization, Virsh and Virt-Manager

108

Virsh Commands

Unit 3Snapshot and Migrate

Page 109: Introduction to Virtualization, Virsh and Virt-Manager

109

Introduction

• Snapshot– Snapshots take the disk, memory, and device state

of a VM at a point-of-time, and save it for future use

• --disk-only– The snapshot will only include disk state

Page 110: Introduction to Virtualization, Virsh and Virt-Manager

110

Snapshot scenario

Create a folder and

modify index.htm

Start the VM

Restart the VM

Revert the

snapshot

Step 4Step 3Step 2Step 1

S0 S3S2S1 S1

Step 5

Page 111: Introduction to Virtualization, Virsh and Virt-Manager

111

snapshot-create

Item Content

Description Create a snapshot (disk and RAM) from XML

Input 1. domain 2. xml

Example # snapshot-create vm1 snaptest.xml

Response Domain snapshot snaptest created from 'snaptest.xml'

Page 112: Introduction to Virtualization, Virsh and Virt-Manager

112

• Start VM• Take a snapshot

Create a snapshot for VM

Page 113: Introduction to Virtualization, Virsh and Virt-Manager

113

Create a folder in VM

• Start VM• Create a folder "test"

Page 114: Introduction to Virtualization, Virsh and Virt-Manager

Launch Apache service

• Check /var/www/index.html

• Web page

114

Page 115: Introduction to Virtualization, Virsh and Virt-Manager

Launch Apache service (cont.)

• Modify the /var/www/index.html

• Web page

115

Page 116: Introduction to Virtualization, Virsh and Virt-Manager

116

snapshot-revert

Item Content

Description Reverts a domain to a given snapshot

Input 1. domain 2. snapshotname

Example # snapshot-revert vm1 snaptest

Response N/A

Page 117: Introduction to Virtualization, Virsh and Virt-Manager

117

Revert snapshot

• Folder

• Web page

Page 118: Introduction to Virtualization, Virsh and Virt-Manager

118

snapshot-delete

Item Content

Description Removes a snapshot, and all of it's children, from a domain

Input 1. domain 2. snapshotname

Example # snapshot-delete --domain vm1 snaptest --metadata

Response Domain snapshot snaptest deleted

Page 119: Introduction to Virtualization, Virsh and Virt-Manager

119

Delete snapshot

Page 120: Introduction to Virtualization, Virsh and Virt-Manager

120

Introduction

• Migrate– Migration is the process of moving a virtual

machine from one host or storage location to another

Page 121: Introduction to Virtualization, Virsh and Virt-Manager

121

Migration

Source

VMDownload

a file

Destination

VMDownload

a file

Migration

Network

IP: 192.92.26.120 IP: 192.92.26.108

NFS/Data/image

VMimage

Page 122: Introduction to Virtualization, Virsh and Virt-Manager

122

Set up NFS server for images

• Install NFS server packages – nfs-common– nfs-kernel-server

• Set shared path and permission

Page 123: Introduction to Virtualization, Virsh and Virt-Manager

123

Set up NFS server for images (cont.)

• Start NFS server

• Check NFS path

Page 124: Introduction to Virtualization, Virsh and Virt-Manager

124

Set up NFS client – hypervisor

• Install NFS client packages – nfs-common

• Mount image

• Check

Page 125: Introduction to Virtualization, Virsh and Virt-Manager

125

Set up NFS client – hypervisor (cont.)

• Restart NFS server

• Check image on client

Page 126: Introduction to Virtualization, Virsh and Virt-Manager

126

migrate

Item Content

Description Migrates a guest domain to another host

Input 1.domain 2.dest uri

Example # migrate vm1 qemu+ssh://140.92.26.108/system

Response pass

Page 127: Introduction to Virtualization, Virsh and Virt-Manager

127

Start VM

Page 128: Introduction to Virtualization, Virsh and Virt-Manager

128

Download a file to VM

Page 129: Introduction to Virtualization, Virsh and Virt-Manager

129

Migrate VM to destination host

• Source host

The URI of the destination host

Page 130: Introduction to Virtualization, Virsh and Virt-Manager

130

After migration

• Destination host

Page 131: Introduction to Virtualization, Virsh and Virt-Manager

131

Verify the file

• The file size

Page 132: Introduction to Virtualization, Virsh and Virt-Manager

132

Virt-manager Introduction• The virt-manager (Virtual Machine Manager)

application is a graphic user interface for managing virtual machines through libvirt

Page 133: Introduction to Virtualization, Virsh and Virt-Manager

133

Main window

Page 134: Introduction to Virtualization, Virsh and Virt-Manager

134

Connection window

Page 135: Introduction to Virtualization, Virsh and Virt-Manager

Define VM

135

Page 136: Introduction to Virtualization, Virsh and Virt-Manager

Start VM

136

Page 137: Introduction to Virtualization, Virsh and Virt-Manager

Connect to VM

137

Page 138: Introduction to Virtualization, Virsh and Virt-Manager

Verify connection

138

• Virt-manager

Page 139: Introduction to Virtualization, Virsh and Virt-Manager

Suspend VM

139

Page 140: Introduction to Virtualization, Virsh and Virt-Manager

Resume VM

140

Page 141: Introduction to Virtualization, Virsh and Virt-Manager

Save VM

141

Page 142: Introduction to Virtualization, Virsh and Virt-Manager

Save VM (cont.)

142

Page 143: Introduction to Virtualization, Virsh and Virt-Manager

Restore VM

143

Page 144: Introduction to Virtualization, Virsh and Virt-Manager

Clone VM

144

Page 145: Introduction to Virtualization, Virsh and Virt-Manager

Check CPU usage of VM

145

Page 146: Introduction to Virtualization, Virsh and Virt-Manager

Destroy VM

146

Page 147: Introduction to Virtualization, Virsh and Virt-Manager

Delete VM

147

Page 148: Introduction to Virtualization, Virsh and Virt-Manager

148

Conclusion

• Virtualization– High utilization of physical resource

• Virsh – The main interface for managing virtualization

environment through Libvirt• Virt-manager

– Graphic user interface for managing virtualization environment through Libvirt

Page 149: Introduction to Virtualization, Virsh and Virt-Manager

149

Question

• Mail:[email protected]

Page 150: Introduction to Virtualization, Virsh and Virt-Manager

150

References• http://libvirt.org/• http://en.wikipedia.org/wiki/Virtualization• http://en.wikipedia.org/wiki/Kernel-based_Virtual_Machine • http://www.slideshare.net/trupti242/virtuallization-

questions#• https://access.redhat.com/site/documentation/en-US/

Red_Hat_Enterprise_Linux/• http://trac.nchc.org.tw/cloud• https://help.ubuntu.com/community/KVM/Installation• http://www.ubuntu-tw.org/modules/tinyd0/