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

How to restore the image file to the openstack startup image by clonezilla

2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)05/31 Report--

Today, I will talk to you about how clonezilla restores the image file to openstack boot image. Many people may not know much about it. In order to make you understand better, the editor summarized the following content for you. I hope you can get something according to this article.

1. This experiment is completed on node20 (centos6.5), IP:192.168.10.20.

As a prerequisite, clonezilla has backed up the data of the win7 physical machine to a certain machine (this lab backup is in the 192.168.10.20:/home directory) (Note: before backing up win7, you need to use a registration file to change the disk interface to IDE)

2. Start a kvm virtual machine with the virt-install command on node20: (virt-install command: yum install python-virt*)

Qemu-img create-f raw / home/clonezilla/windows7-good.raw 1200G

/ / Note it must be in raw format, and the size size must be greater than the total disk size of the original physical machine, otherwise an error will be reported later.

Virt-install-n "p2v-win7"-vcpus 2-r 1024-- virt-type kvm-- disk path=/home/clonezilla/windows7-good.raw,bus=ide,cache=writeback-- network bridge=virbr0,model=virtio-- boot cdrom,hd,network,menu=on-- vnc-- vncport=5980-- vnclisten=0.0.0.0-- os-type windows-- os-variant=win7-- force-- cdrom / home/clonezilla/clonezilla-live-2.3.1-18-amd64.iso

/ / Note: mid-term-the bus after disk must be ide, otherwise a 0x00000007 error will occur when win7 starts.

3. Next, connect the system with vnc-view, and select the optical drive cdrom clonezilla-live to start:

/ / Note ssh_server is selected in the above steps

/ / configure the specific ip according to the specific situation in the above figure

/ / Note: the above ip of 192.168.10.20 is the server ip where the win7 recovery image file is saved. (make sure that the current virtual machine is connected to the ip)

/ / the local startup command uses-- network bridge=virbr0,model=virtio, which indicates that the virtual machine is connected with the host virbr0 bridge.

/ / but if you want this virtual machine ip to communicate with other physical machines, you need to bind eth0 and virtbr0 with the brctl addif virtbr0 eth0 command

/ / Please find your own information for more details on how the virtual machine communicates with the external network.

As can be seen from the above picture, a physical machine of win7 has been successfully transformed into a virtual machine taken over by kvm.

4. If you need to turn the virtual machine into an openstack image, upload the / home/clonezilla/windows7-good.raw image file to openstack directly with the glance command: (it is recommended to convert the raw format to qcow2 format first, which takes less upload time)

Glance add disk_format=raw container_format=ovf name=winxp is_public=True

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