|
本帖最后由 secoug 于 2019-8-22 22:03 编辑
逻辑卷快照和虚拟化:
- [root@station157 ~]# lvcreate -s -L 200M /dev/rhel/winserver
- Logical volume "lvol0" created.
复制代码 当使用这个快照,超过200M的变化量时,块照会被自动回收(摧毁)。
Aug 20 20:39:25 station157 kernel: device-mapper: snapshots: Invalidating snapshot: Unable to allocate exception.
Aug 20 20:39:25 station157 lvm[26597]: WARNING: Snapshot rhel-lvol0 changed state to: Invalid and should be removed.
Aug 20 20:39:25 station157 dmeventd[26597]: No longer monitoring snapshot rhel-lvol0.
file-print-server-environment
graphical-server-environment
infrastructure-server-environment
virtualization-host-environment
web-server-environment
找group:
- grep -A 1 'group' d08a56b3b4cba8aaeba3c84aa776e58bd6ffb78281d5c8296d2c382f0bf54913-comps-Server.x86_64.xml
复制代码- %post
- KS_IPADDR=$(ifconfig | head -n 2 | tail -n 1 | cut -c 14- | cut -d ' ' -f 1)
- KS_IPADDR_SHORT=$(ifconfig | head -n 2 | tail -n 1 | cut -c 14- | cut -d ' ' -f 1 | cut -d '.' -f 4)
- KS_DEVICE=$( ls /etc/sysconfig/network-scripts/ifcf* | grep -v ifcfg-lo | cut -d '/' -f 5)
- KS_DEVICE_SHORT=$( ls /etc/sysconfig/network-scripts/ifcf* | grep -v ifcfg-lo | cut -d '/' -f 5 | cut -d '-' -f 2)
- cat > /etc/sysconfig/network-scripts/$KS_DEVICE <<EOF
- DEVICE=$KS_DEVICE_SHORT
- IPADDR=$KS_IPADDR
- NETMASK=255.255.255.0
- GATEWAY=192.168.0.254
- EOF
- echo "station$KS_IPADDR_SHORT.example.com" >/etc/hostname
- echo "$KS_IPADDR station$KS_IPADDR_SHORT.example.com station$KS_IPADDR_SHORT" >> /etc/hosts
- %end
复制代码 如果推的时候遇到:
是因为分配给虚拟机的内存小于等于1G
|
|