вторник, 12 ноября 2019 г.

debian 9/10 установка lxd

Вообщем работает, но очень долго останавливался.
 "A stop job is running for Service for snap application lxd.daemon" running for 10 minutes at shutdown #39

$ sudo apt install bridge-utils
$ sudo nano /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
# The primary network interface
#auto enp0s31f6
#iface enp0s31f6 inet dhcp
#iface enp0s31f6 inet static
#address 192.168.0.5
#netmask 255.255.255.0
#gateway 192.168.0.1
#dns-nameservers 8.8.8.8
#auto enp0s31f6

##Bridge  Name ###
auto br0

# Bridge setup
iface br0 inet static
   bridge_ports enp0s31f6
       address 192.168.0.5
       broadcast 192.168.0.255
       netmask 255.255.255.0
       gateway 192.168.0.1
   bridge_stp off
   bridge_fd 9

$ sudo apt install snapd

$ sudo snap install lxd


$ sudo usermod -a -G lxd ${USER}
$ sudo -i
# lxd init
Would you like to use LXD clustering? (yes/no) [default=no]:
Do you want to configure a new storage pool? (yes/no) [default=yes]:
Name of the new storage pool [default=default]:
Name of the storage backend to use (btrfs, ceph, dir, lvm) [default=btrfs]: dir
Would you like to connect to a MAAS server? (yes/no) [default=no]:
Would you like to create a new local network bridge? (yes/no) [default=yes]: no
Would you like to configure LXD to use an existing bridge or host interface? (yes/no) [default=no]: yes
Name of the existing bridge or host interface: br0
Would you like LXD to be available over the network? (yes/no) [default=no]:
Would you like stale cached images to be updated automatically? (yes/no) [default=yes]
Would you like a YAML "lxd init" preseed to be printed? (yes/no) [default=no]:

====================================================================
Обратить внимание что при перезагрузке после установки snap lxd зависает на 10 минут
 "A stop job is running for Service for snap application lxd.daemon" running for 10 minutes at shutdown #39
Проблема пока не решена

Обход #39  убить lxd shutdown руками:
$ sudo systemctl stop snap.lxd.daemon
$ ps aux | grep lxd
$ ps aux | grep "lxd shutdown"
root      1196  0.0  0.7 209872 29380 ?        Sl   11:33   0:00 lxd shutdown
$ sudo kill 1196
$ sudo reboot
or
$ sudo poweroff

$ sudo journalctl -u snap.lxd.daemon
====================================================================

$ lxc launch images:debian/10 deb10 

Восстановление на другом компьютере:
$ lxc image import /home/user/ud1804-2019-11-10.tar.gz.tar.gz --alias ud1804-backup
Образ, импортирован с снимком: b900ce0db69f0a57afd52af682f8a47229b5ea8fcdfa2a566af2034a6f6766a2
$ lxc launch ud1804-backup ud1804
### lxc image delete ud1804-backup

$ lxc image import /home/user/test-2019-11-12.tar.gz.tar.gz --alias test-backup
Image imported with fingerprint: f442e1c60b9c1353f3d665a61e67bb7c13d383fe65af530fbe7f482699233d56

$ lxc launch test-backup test




Комментариев нет:

Отправить комментарий