Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Example Analysis of making centos-win2k16 by Image on openstack Cloud platform

2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

Editor to share with you the openstack cloud platform image production centos-win2k16 example analysis, I hope you will learn something after reading this article, let's discuss it together!

1.1 Image Information

1.2 Virtio driver information

Download address: https://cloudbase.it/downloads/CloudbaseInitSetup_Stable_x64.msi

2. KVM environment preparation

2.1 Virtualization software is installed on the physical machine that makes the image

Yum group install "Virtualization Host" >

2.3 create an empty image file

Qemu-img create-f qcow2 centos-7.6.qcow2 5G

Create a virtual machine virt-install-- name centos-7.6-- ram 1024-- cdrom=/home/ username / CentOS-7.6-x86_64-bin-DVD1.iso-- disk path=/home/ username / centos-7.6.qcow2-- noautoconsole-- os-type=linux

2.5 call up the qemu console

Virt-manager

3. Create Linux (CentOS7.6) image template 3.1 set the first login to change the password

Passwd-e root

3.2 disable SELINUX

Sed-I'/ ^ SELINUX/s/enforcing/permissive/g' / etc/selinux/config

3. Turn off Firewall

Systemctl disable firewall

3.4 GRUB configuration

* * [root@localhost ~] # * * cat / etc/default/grub | tail-n 1

* * [root@localhost ~] # * * GRUB_CMDLINE_LINUX_DEFAULT = "console=tty0 console=ttyS0,115200n8"

Grub2-mkconfig-o / boot/grub2/grub.cfg

Qemu-guest-agent cloudbase-init in Centos7.6 has been installed and started by default.

3.5 Edit / etc/cloud/cloud.cfg configuration file and cloud_init_modules add:

... -resolv-conf...

And since the requirement is to allow root users to remotely ssh virtual machines, the configuration should be modified to the following items in the / etc/cloud/cloud.cfg file:

Disable_root: 0 ssh_pwauth: 1

Add the following line to / etc/sysconfig/network to avoid problems accessing the EC2 metadata service:

NOZEROCONF=yes

3.6 time server

3.7 shut down the virtual machine

Poweroff

3.8 compress and reset the mirror

Virt-sysprep-d centos-7.6

Virt-sparsify-compress centos-7.6.qcow2 centos-7.6-cloud.qcow2

3.9 upload to the cloud platform (you need to log in to Openstack users with appropriate permissions)

Openstack image create-disk-format qcow2-public-file Centos_7.6.qcow2 Centos_7.6-property hw_qemu_guest_agent=yes

4. Create a Windows Server (2K16Std) image template

4.1 create a virtual machine to create an empty qcow2 file

Qemu-img create-f qcow2 win_2016.qcow2 15g

Virt-install-name win2k16-vcpus 2-ram 2048-cdrom=/windows/win/cn_windows_server_2016_x64_dvd_9718765.iso-disk path=win_2016.qcow2-channel unix,path=/var/lib/libvirt/qemu/channel/target/win2k16.agent,mode=bind,target_type=virtio,name=org.qemu.guest_agent.0

4.2 acquisition of Virtio-win driver installation software

Wget https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/latest-virtio/virtio-win.iso

Add a mirror to the mirror of a virtual machine

Install the driver at the beginning of the installation

Register for the balloon service

4.4 Open a remote connection

4.5 disk policy configuration

4.7 time server

Compress mirror image

Virt-sparsify-compress win16.qcow2 win_16.qcow2

Upload to the cloud platform

Openstack image create-- disk-format qcow2-- public-- file win_16.qcow2 win_16.qcow2-- property hw_qemu_guest_agent=yes-property os_admin_user=administrator

After reading this article, I believe you have a certain understanding of "sample Analysis of openstack Cloud platform Image production centos-win2k16". If you want to know more about it, welcome to follow the industry information channel. Thank you for reading!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report