Linux under KVM installation windows

Source: Internet
Author: User
Tags tightvnc viewer

KVM Install Windows


1. See if the CPU supports virtualization

Cat/proc/cpuinfo | grep--color VMX

2. Installing KVM

Yum install QEMU-KVM libvirt libguestfs-tools virt-install virt-manager libvirt-python-y


3. Start KVM, add boot

Systemctl Start LIBVIRTD

Systemctl Enable LIBVIRTD

View

Systemctl is-enabled LIBVIRTD

Lsmod | grep KVM

4, install Vncserver, easy to install Windows

Yum-y Install Tigervnc tigervnc-server tigervnc-server-module


5. Copy the configuration template file as [email protected]:1.service

Cp/lib/systemd/system/[email protected]/lib/systemd/system/[email Protected]:1.service

>/lib/systemd/system/[email Protected]:1.service

Vim/lib/systemd/system/[email Protected]:1.service

[Unit]

Description=remote Desktop Service (VNC)

After=syslog.target Network.target

[Service]

Type=forking

Execstartpre=/bin/sh-c '/usr/bin/vncserver-kill%i >/dev/null 2>&1 | | :'

Execstart=/usr/sbin/runuser-l root-c "/usr/bin/vncserver%i"

Pidfile=/root/.vnc/%h%i.pid

Execstop=/bin/sh-c '/usr/bin/vncserver-kill%i >/dev/null 2>&1 | | :'

[Install]

Wantedby=multi-user.target

6. Set the VNC user password

vncpasswd

7. Re-loading the system configuration

Systemctl Daemon-reload

8. Start [email protected]:1.service service and set boot

Systemctl start [email protected]:1.service && systemctl Enable [email protected]:1.service

View

Systemctl is-enabled [Email protected]:1.service

##### #如果启动报错 rm-rf/tmp/. x11-unix/* and then start ########.

9. Install Windows

Download Mirror DVD

Hang the disc.

mount/dev/sdb/var/lib/libvirt/images/

10. Install Windows

Virt-install--name=win2008--ram--vcpus=1--disk path=/var/lib/libvirt/images/win2008.img,size=30--accelerate- -cdrom/var/lib/libvirt/images/zh-\ Hans_windows_server_2008_datacenter_enterprise_standard_x86_dvd_ X14-26742.iso--vnc--vncport=5917--vnclisten=0.0.0.0--network bridge=br0,model=virtio--noautoconsole

Windows uses TIGHTVNC Viewer remote connection 10.0.0.121:5917 for graphical installation, reboot during installation, need to manually start Virsh start win2008

Virsh Start win2008

Virsh shutdown win2008

Virsh autostart win2008

Temporarily add a network card

Virsh attach-interface win20018--type network--source Default

Virsh attach-interface win20018--type network--source default--config


Linux under KVM installation windows

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.