Home > other >  CLOUD
CLOUD

Time:10-11

Case 1: basic management operations with virsh
Case 2: qemu - img basic operation management
Case 3: registration huawei cloud users
Case 4: ECS and basic operation of choose and buy
Case 5: cloud server Web site
Case 1: basic management operations with virsh
1.1 problems
This case require familiar with virsh basic operation, can skillfully use:
List the currently running virtual machine
View the information of the virtual machine
Management of the virtual machine
Set the virtual machine to run automatically boot
Step 1.2
This case shall be carried out according to the following steps,
Step one: the basic operation with virsh
1) list the currently running virtual machine
/root @ room9pc01 ~ # with virsh list Id Name State
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
1 node1 running
Step 2: look at the virtual machine information
/root @ room9pc01 ~ # with virsh dominfo nova
Step three: management of virtual machine

1) start the virtual machine/root @ room9pc01 ~ # with virsh start node1

2) restart the virtual machine/root @ room9pc01 ~ # with virsh reboot node1
3) forced to shut down the virtual machine
/root @ room9pc01 ~ # with virsh destroy node1
4) set the virtual machine to run automatically boot
/root @ room9pc01 ~ # with virsh autostart node1
5) check the virtual machine network card information
/root @ room9pc01 ~ # with virsh domiflist node1
Interface type source model MAC
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Vnet0 bridge VBR virtio 52:54:00:5 f: 8 b: 11
Vnet1 bridge private1 virtio 52:54:00:19: a4: f3
6) check the virtual machine hard disk information
/root @ room9pc01 ~ # with virsh domblklist node1
The target source
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Vda/var/lib/libvirt/images/node1. Img
VDB/var/lib/libvirt/images/disk. The img
Case 2: qemu - img basic operation management
2.1 problems
This case requirements:
Create a new image disk file
Use a backend template file to create a new image disk file
View mirror disk file information
Step 2.2
This case shall be carried out according to the following steps,
Step one: create a new image disk file
Qemu - img command format: qemu - img command parameter file name size
/root @ room9pc01 ~ # qemu - img create -f qcow2 disk. 50 g/img/qcow2 format for creating
Formatting 'disk. Img, FMT=qcow2 size=53687091200 encryption=off cluster_size=65536 lazy_refcounts=off
2) use a backend template file to create a new image disk file
Note: - b use the back-end template file
/root @ room9pc01 ~ # qemu - img create - b disk. Img -f qcow2 disk1. Img
Formatting 'disk1. Img, FMT=qcow2 size=53687091200 backing_file=' disk. Img 'encryption=off cluster_size=65536 lazy_refcounts=off
3) use the back-end template file to create a mirror image of a 16 g disk file
/root @ room9pc01 ~ # qemu - img create - b disk. Img -f qcow2 disk2. Img 16 g
Formatting 'disk1. Img, FMT=qcow2 size=53687091200 backing_file=' disk. Img 'encryption=off cluster_size=65536 lazy_refcounts=off
Step 2: check image file information
/root @ room9pc01 ~ # qemu - img info disk1. Img
Image: disk. Img
The file format: qcow2
Virtual size: 50 g (53687091200 bytes)
Disk size: 196 k
Cluster_size: 65536
The Format specific information: compat: 1.1 lazy refcounts: false | help_topic |
| innodb_index_stats |
| innodb_table_stats |
| ndb_binlog_index |
| plugins |
| proc |
| procs_priv |
| proxies_priv |
| server_cost |
| the servers |
| slave_master_info |
Case 3:3 registered huawei cloud user
3.1 problems
This case requirements:
Visit the website https://huaweicloud.com/
Huawei cloud registered users (phone number validation)
Log in and complete the real-name authentication
For accounts prepaid phone no less than 100 yuan (need not when can withdrawal)
Step 3.2
This case shall be carried out according to the following steps,
Step 1: register huawei cloud
1) access to the website, as shown in figure 1:

Figure 1
2) the registered users, as shown in figure 2:

Figure 2
2) log in and complete the real-name authentication, as shown in figure 3:

Figure 3
S
4 case 4: ECS and basic operation of choose and buy
4.1 problems
This case requirements:
The choose and buy an ECS cloud server
According to pay, general computational vcpus/1 gb, 40 gb hard drive
Dedicated bandwidth according to the traffic image selected CentOS 7.4 x64
The root user, password tedu. Cn1234
Through "remote login" to enter the ECS cloud server system
Step 4.2
This case shall be carried out according to the following steps,
Step 1: choose cloud server
1) choose a cloud server, as shown in figure 4:

Figure 4
2) the results as shown in figure 5

Figure 5
3) ECS basic operation, as shown in figure 6:

Figure 6
5 cases: cloud server Web site
5.1 problems
This case requirements:
The commissioning of the ECS cloud server HTTPD service
Test page
Step 5.2
This case shall be carried out according to the following steps,
Step one: cloud server Web site
1) on ECS cloud server enable HTTPD service
/root @ svr1 ~ # yum - y install HTTPD//HTTPD installed
. .
/root @ svr1 ~ # systemctl restart HTTPD//start the service
/root @ svr1 ~ # systemctl enable HTTPD//set up since the run
/root @ svr1 ~ # systemctl status HTTPD//check the service status
. . Active: the Active (running).. .//is running
2) ECS instance to open a Web service port, as shown in figure 7:
Note: port 22: Linux server remote control
Port: 80 common web service
Port 443: encrypted web service