centos-KVM virtual machine installed win7

The first part is a graphical installation, followed by a command installation, VNC is the time for a command can be installed on the virtual machine the remote system installation, if the installation is a graphic may not install VNC

1, the installation qemu-kvm, libvirt, virt-install, virt-manager

qemu-kvm is used to create a virtual hard disk

libvirt to manage virtual machines

virt-install to create a virtual machine

virt-manager graphical interface to manage virtual machines

[root@kvm-node1 ~]# yum install -y qemu-kvm libvirt virt-install virt-manager

 

2, install vnc, remote tool with a graphical interface

yum install tigervnc tigervnc-server

Modify user profiles: / etc / sysconfig / vncservers

Remove these two lines before the "#", that is to say the comments of these two lines to be removed.

VNCSERVERS="1:root 2:root"VNCSERVERARGS[1]="-geometry 1024x768 -depth 32"

VNCSERVERARGS[2]="-geometry 1024x768 -depth 32"

service vncserver start

(Client connection ip: 1 or ip: 2)

 

3, the card is configured in bridge mode

The original configuration of the network card eth0

DEVICE=eth0

TYPE=Ethernet

UUID=a83db05f-7e28-4ab0-acf5-66e4d1ba7746

ONBOOT=yes

NM_CONTROLLED=yes

BOOTPROTO=none

HWADDR=E4:1F:13:2C:FB:60

IPADDR=172.16.1.134

PREFIX=24

GATEWAY=172.16.1.1

DNS1 = 114114114114

DEFROUTE = yes

IPV4_FAILURE_FATAL=yes

IPV6INIT=no

NAME="System eth0"

 

New NIC br0

DEVICE=br0

ONBOOT=yes

TYPE=Bridge

BOOTPROTO=static

IPADDR=172.16.1.134

PREFIX=24

GATEWAY=172.16.1.1

DNS1 = 114114114114

DEFROUTE = yes

 

The configuration changes to the network card eth0

DEVICE=eth0

BRIDGE=br0

TYPE=Ethernet

UUID=a83db05f-7e28-4ab0-acf5-66e4d1ba7746

ONBOOT=yes

NM_CONTROLLED=no

BOOTPROTO=static

HWADDR=E4:1F:13:2C:FB:60

NAME="System eth0"

 

Restart the network service network restart

 

4, the service start vnc, vnc by the remote server to start kvm graphical management interface in the terminal input command virt-manager

 Click on the file below the computer icon pops up the New Virtual Machine page

 

 

 

 Selection system of the installation package, system type, system version

 

 

 

Select the number of CPU cores and behind the memory size has been click Next. The final step when click Advanced Settings, select the bridge, the card is just the new br0

 

 

 

After completing the list more than one virtual machine, double-click on the pop-up virtual machine (after the installation is complete picture system) the following screen

 

 If you have not turned on virtual systems need to click run in the virtual machine boot up

 

 

 

There are two modes console view is common to use view

 

 

 

details are set parameters or add remove hardware page

 

 

 

 

After the bridge is not provided, if the display driver card, the card can choose different modes here

 

 

 

 

----------------------------------------------------------------------------------------------------------------------------------

Command-line installation, configuration After the bridge card, enter the following command attention \ can not have spaces behind

 

virt-install \

--name win72 \

--the-variant win7 \

--virt-type sqm \

--vcpus 2 \

--disk path=/win7data/win7.img,size=15 \

--accelerate \

--cdrom /var/www/test.com/cn_windows_7_ultimate_x64_dvd_x15-66043.iso \

--noautoconsole \

--vnc \

--vncport = 5915 \

--vnclisten = 0.0.0.0 \

--ram 512 \

--network bridge=br0,model=e1000

 After command execution virtual machine has been turned on, wait for the installation of the system in the background, this time using vnc remote to the virtual machine to perform the installation, enter ip + port, port configuration here 5915, vnc default port is 5900, so there is ip + port (15)

 

Guess you like

Origin www.cnblogs.com/newbee-yun/p/11506008.html
Recommended