У Вас устаревшая версия браузера. Скачайте современный Firefox, Chrome, Opera или Яндекс браузер для комфортного просмотра!
  √ Программы, √ Сайты, √ Исходники, √ C++,
√ Библиотеки, √ Хостинг, √ Домены
= ООО МааСофтваре, +7(999)633-15-17
support@maasoftware.ru, 9:00-17:00 MSK
 
Debian 9: установка KVM для виртуализации
/ Помощь
Частично взято с https://www.hiroom2.com/2017/06/26/debian-9-install-kvm/

1 Install qemu-kvm and libvirt

Install qemu-kvm package and some packages for virtual machine operation.

# apt-get install qemu-kvm libvirt0 virt-manager bridge-utils spice-client-gtk

Reboot system.

# reboot

2 Bridge interface

The bridge interface is needed for accessing virtual machine via network from other machine.

For example /etc/network/interfaces:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

#source /etc/network/interfaces.d/*

# The loopback network interface
#auto lo
#iface lo inet loopback

# The primary network interface
#auto eth0
#allow-hotplug eth0
#iface eth0 inet dhcp

#auto eth0
allow-hotplug enp0s31f6
#iface enp0s31f6 inet static
# address 192.168.0.28
# netmask 255.255.255.0
# network 192.168.0.0
# broadcast 192.168.0.255
# gateway 192.168.0.1
# dns-nameservers 192.168.0.1

auto br0
iface br0 inet static
address 192.168.0.28
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.0.1
dns-nameservers 192.168.0.1
bridge_ports enp0s31f6
bridge_stp off
bridge_fd 0
bridge_maxwait 0

3 libvirt group

The user in libvirt group can run libvirt command without sudo.

# gpasswd libvirt -a <username>

4 Create iso directory

Create iso directory for sharing iso images with libvirt group. Move debian-9.0.0-amd64-netinst.iso to iso directory.

# mkdir /var/lib/libvirt/iso
# mv debian-9.1.0-amd64-netinst.iso /var/lib/libvirt/iso/
# chown libvirt-qemu:libvirt /var/lib/libvirt/iso/debian-9.1.0-amd64-netinst.iso

5 Create certificates

Create tls certificate. You can use self-signed certiicates as shown in other topic on our server. The virt-manager can't create & start VM with out of sertificates.

6 Create virtual machine with virt-manager

The virt-manager is a GUI frontend tool for libvirt. Create virtual machine with virt-manager.

$ virt-manager

Click "New Virtual Machine" at the upper left.

 


Select install media. This article uses debian-9.0.0-amd64-netinst.iso in iso directory.

 

Select "Browse" button at "Use ISO image".

 

The iso directory cannot be found yet. Click "+" icon for adding iso directory. Input storage pool name and select "dir:Filesystem Directory".

 

Input storage pool path.

 

The iso directory can be found. Select debian-9.0.0-amd64-netinst.iso.

 

debian-9.0.0-amd64-netinst.iso is selected. Select OS type for memory size calculation. The memory size can be changed after this.

 

Input core number and memory size.

 

Create storage.

 

Select network. bridge or NAT.

 

OS installation on virtual machine is starting.


26 августа 2017 года, суббота,
Автор: ООО МааСофтваре
 
Помощь

Рейтинг:

Назад  Наверх

/ Помощь
Март 2024
   Пн   Вт   Ср   Чт   Пт   Сб   Вс   
           1   2   3   
   4   5   6   7   8   9   10   
   11   12   13   14   15   16   17   
   18   19   20   21   22   23   24   
   25   26   27   28   29   30   31   
 29 марта 2024 года, пятница 
Пользователь
Авторизация
e-mail:

пароль:


Регистрация
Поделиться
 0  0
Новости
[...] Архив новостей.
Сейчас на сайте
Гостей: 0
Пользователей: 0
Роботов: 9
Всего пользователей: 33
Другие ресурсы
Copyright © 2012-2024 ООО МааСофтваре   
Посетителей сегодня: 1, всего: 20, максимально: 2, начиная с 22.07.2023, вы просматриваете эту страницу 1 раз(а). Заходите ещё!!!