46 lines
No EOL
976 B
Bash
46 lines
No EOL
976 B
Bash
# sudo dnf install -y guestfs-tools
|
|
|
|
# sudo dnf install virt-viewer ??
|
|
|
|
|
|
|
|
qemu-img create -f qcow2 -o preallocation=metadata test.qcow2 100G
|
|
|
|
virt-resize --expand /dev/sda3 /home/ncox/Downloads/rhel-guest-image-8.4-1269.x86_64.qcow2 ./test.qcow2
|
|
|
|
# Run under sudo - won't work as a user mode install
|
|
sudo virt-install \
|
|
--os-variant rhel8.4 \
|
|
--name test \
|
|
--memory 2048 \
|
|
--disk ./test.qcow2 \
|
|
--import \
|
|
--graphics spice,listen=0.0.0.0 \
|
|
--video virtio \
|
|
--channel spicevmc \
|
|
--wait 0 \
|
|
--cloud-init meta-data=./meta-data,user-data=./user-data \
|
|
|
|
|
|
|
|
--network \
|
|
--network
|
|
|
|
|
|
|
|
|
|
|
|
|
|
--network br0 \
|
|
|
|
|
|
|
|
--extra-args "ip=192.168.1.2::192.168.1.1:255.255.255.0:test.example.com:eth0:none"
|
|
|
|
[root@rhel-8 ~]# virt-install
|
|
--name centos8-2 --memory 10240 --vcpus=2
|
|
--cdrom=/tmp/rhel-server-7.6-x86_64-dvd.iso
|
|
--disk path=/disks/centos8-2.qcow2,size=20,format=qcow2
|
|
--network bridge=nm-bridge --graphics=vnc -v
|
|
|
|
Starting install... |