Create Virtual Machine #22011/05/25 |
Create a Virtual Machine from template.
|
|
[1] | Create a Virtual Machine from template that is made in previous page. |
# copy disk image and XML file for a new Virtual Machine
[root@dlp ~]#
virt-clone --original template --name mail --file /var/kvm/images/mail.img Allocating 'mail.img' | 20 GB 01:44
Clone 'mail' created successfully.
[root@dlp ~]# virsh start mail --console
Domain mail started
Connected to domain mail
Fedora release 15 (Lovelock)
localhost.localdomain login: Kernel 2.6.38.6-26.rc1.fc15.x86_64 on an x86_64 (ttyS0) # complete |
[2] | News GuestOS' network is failed to boot because it is the same to existing GuestOS's one. So Change network settings for new one. |
[root@localhost ~]# ifconfig -a
eth0
Link encap:Ethernet HWaddr 00:16:3E:72:BD:4E BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
lo
[root@localhost ~]# Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) cd /etc/sysconfig/network-scripts
[root@localhost network-scripts]#
vi ifcfg-eth0 # change the name and MAC address to correct one # If you set static IP address, See initial config
DEVICE="eth0"
[root@localhost network-scripts]# BOOTPROTO="dhcp" HWADDR=" 00:16:3E:72:BD:4E "ONBOOT="yes" NM_CONTROLLED="yes" /etc/rc.d/init.d/network restart Restarting network (via systemctl): Bringing up loopback interface: [ OK ] Bringing up interface eth0: Determining IP information for eth0... done. [ OK ] [ OK ] |
Sponsored Link |
|