티스토리 뷰

CentOS 5 KVM Create a Virtual Machine#2


Create a Virtual Machine#2

 

Create a Virtual Machine from a template you just created.



1. Create a Virtual Machine from the template that is created in previous page.


# copy disk image and XML file for a new Virtual Machine

[root@centos5 ~]# virt-clone --original template --name mail --file /var/kvm/images/mail.img 

Cloning /var/kvm/images/template.img | 20 GB 01:44

Clone 'mail' created successfully.


[root@centos5 ~]# virsh start mail --console 

Domain mail started

Connected to domain mail


CentOS release 5.11 (Final)

Kernel 2.6.18-398.el5 on an x86_64

www.srv.world login:




2. New GuestOS' network is failed to boot because it is the same with existing GuestOS's one. So Change the network settings for new one.


[root@www ~]# ifconfig -a 

eth1 Link encap:Ethernet HWaddr 52:54:00:67:8C:A1

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)

Interrupt:11

lo Link encap:Local Loopback

inet addr:127.0.0.1 Mask:255.0.0.0

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)


[root@www ~]# cd /etc/sysconfig/network-scripts 


[root@www network-scripts]# mv ifcfg-eth0 ifcfg-eth1 


[root@www network-scripts]# vi ifcfg-eth1

# change the name and MAC address to correct one

DEVICE=eth1

BOOTPROTO=dhcp

HWADDR=52:54:00:67:8C:A1

ONBOOT=yes


[root@www network-scripts]# /etc/rc.d/init.d/network restart 

Shutting down loopback interface:[  OK  ]

Bringing up loopback interface:[  OK  ]

Bringing up interface eth1:

Determining IP information for eth1... done.

[  OK  ]


[root@www network-scripts]# ifconfig 

eth1 Link encap:Ethernet HWaddr 52:54:00:67:8C:A1

inet addr:10.0.0.205 Bcast:10.0.0.255 Mask:255.255.255.0

UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

RX packets:12 errors:0 dropped:0 overruns:0 frame:0

TX packets:10 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:1000

RX bytes:1216 (1.1 KiB) TX bytes:1277 (1.2 KiB)

Interrupt:11 Base address:0xc000

lo Link encap:Local Loopback

inet addr:127.0.0.1 Mask:255.0.0.0

UP LOOPBACK RUNNING MTU:16436 Metric:1

RX packets:6 errors:0 dropped:0 overruns:0 frame:0

TX packets:6 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:0

RX bytes:828 (828.0 b) TX bytes:828 (828.0 b)


※ Next manual


저작자 표시 비영리 변경 금지
신고

'EN > CentOS 5' 카테고리의 다른 글

CentOS 5 Install VMware Player  (0) 2016.05.29
CentOS 5 KVM basic Operations  (0) 2016.05.28
CentOS 5 KVM Create a Virtual Machine#2  (0) 2016.05.28
CentOS 5 KVM Create a Virtual Machine#1  (0) 2016.05.28
CentOS 5 KVM Install KVM  (0) 2016.05.28
CentOS 5 Configure iSCSI Initiator  (0) 2016.05.28
댓글