virt-clone試ãã¦ã¿ã
å æ¥ä½ã£ãikaros(CentOS5.5)ãã³ãã¼
# virt-clone --original ikaros --name nymph --file nymph.img Cloning ikaros.img 100% |=========================| 2.0 GB 01:01 Clone 'nymph' created successfully. // VMè¨å®ãã¡ã¤ã«ãåºæ¥ã¦ã # diff -Naur /etc/libvirt/qemu/{ikaros.xml,nymph.xml} --- /etc/libvirt/qemu/ikaros.xml 2010-10-23 01:24:34.527172445 +0900 +++ /etc/libvirt/qemu/nymph.xml 2010-10-23 21:35:02.843401503 +0900 @@ -1,6 +1,6 @@ <domain type='kvm'> - <name>ikaros</name> - <uuid>4f83ff72-9f49-b76b-0415-e2fe12bbc6e7</uuid> + <name>nymph</name> + <uuid>22ad5503-5075-692d-b309-821d12237f2f</uuid> <memory>524288</memory> <currentMemory>524288</currentMemory> <vcpu>1</vcpu> @@ -21,12 +21,12 @@ <emulator>/usr/bin/kvm</emulator> <disk type='file' device='disk'> <driver name='qemu' type='qcow2'/> - <source file='/home2/ikaros.img'/> + <source file='/home2/nymph.img'/> <target dev='vda' bus='virtio'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> </disk> <interface type='bridge'> - <mac address='52:54:00:e6:cf:b4'/> + <mac address='00:16:36:f7:93:36'/> <source bridge='br0'/> <model type='virtio'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> //å¤æ´ãã¹ãã¨ãã /etc/hosts /etc/sysconfig/network /etc/sysconfig/network/ifcfg-eth0 //ãã¨ã¦ã¼ã¶ã¼ãä½ãã¨ããrootã®ãã¹ã¯ã¼ãå¤ããã¨ãã»ã» macã¢ãã¬ã¹ã¯ä¸è¨ã®VMè¨å®ãã¡ã¤ã«ããåã£ã¦VMã®ifcfg-eth0ã«ã¤ãã useradd nymph -g users
Bringing up interface eth0: Device eth0 has different MAC address than expected, ignoring. [FAILED] # ifconfig eth0 | grep HWaddr | awk '{print $5}' 00:16:36:FC:F5:6C # ifconfig eth0 | grep HWaddr | perl -ane 'print pop(@F), "\n"' 00:16:36:FC:F5:6C âperldoc perlrun ã® -a ã®èª¬æåç §
-
- 追è¨ãããªã®ãããã¨ã
- kvmclone.plで楽々仮想マシン作成 - kj-kiのはてなダイアリー