REF:https://computingforgeeks.com/how-to-install-kvm-on-fedora-29-fedora-28/
(1)$ cat /proc/cpuinfo | egrep "vmx|svm"
(2)$ sudo dnf -y install bridge-utils libvirt virt-install qemu-kvm
(3)$ lsmod | grep kvm
kvm_intel 241664 0 kvm 737280 1 kvm_intel irqbypass 16384 1 kvm
(4)$ sudo dnf -y install virt-top libguestfs-tools
(5)$ sudo systemctl start libvirtd (6)$ sudo systemctl enable libvirtd
(7)$ sudo dnf -y install virt-manager
(8)$ df
檔案系統 1K-區段 已用 可用 已用% 掛載點 devtmpfs 3996188 0 3996188 0% /dev tmpfs 4011856 60700 3951156 2% /dev/shm tmpfs 4011856 1948 4009908 1% /run tmpfs 4011856 0 4011856 0% /sys/fs/cgroup /dev/mapper/fedora_treehrt--fire-root 15718400 6518444 9199956 42% / tmpfs 4011856 37816 3974040 1% /tmp /dev/sdb1 999320 148872 781636 16% /boot tmpfs 802368 16 802352 1% /run/user/42 tmpfs 802368 6984 795384 1% /run/user/1000
(9)$ sudo virt-install --name fed28 --ram 1024 --vcpus 1 --disk path=/fed28.img,size=20 --os-variant fedora28 --os-type linux --network bridge=br0 --graphics none --console pty,target_type=serial --location 'http://fedora.inode.at/releases/28/Server/x86_64/os/' WARNING KVM acceleration not available, using 'qemu' WARNING The requested volume capacity will exceed the available pool space when the volume is fully allocated. (20480 M requested capacity > 8190 M available) ERROR The requested volume capacity will exceed the available pool space when the volume is fully allocated. (20480 M requested capacity > 8190 M available) (Use --check disk_size=off or --check all=off to override)
(9)$ sudo virt-install --name fed28 --ram 1024 --vcpus 1 --disk path=/fed28.img,size=20 --os-variant fedora28 --os-type linux --network bridge=br0 --graphics none --console pty,target_type=serial --location 'http://fedora.inode.at/releases/28/Server/x86_64/os/' --check all=off WARNING KVM acceleration not available, using 'qemu' WARNING The requested volume capacity will exceed the available pool space when the volume is fully allocated. (20480 M requested capacity > 8190 M available) WARNING Did not find 'console=ttyS0' in --extra-args, which is likely required to see text install output from the guest.
Starting install... Retrieving file vmlinuz... | 7.9 MB 00:00:06 Retrieving file initrd.img... | 65 MB 00:00:35 Allocating 'fed28.img' | 20 GB 00:00:00 Connected to domain fed28 Escape character is ^]
:
^]Domain installation still in progress. You can reconnect to the console to complete the installation process. [treehrt@sice ~]$
[treehrt@sice ~]$ ls /fed28.img -l -rw-------. 1 qemu qemu 21478375424 Jan 23 20:51 /fed28.img [treehrt@sice ~]$
(10)$ ps ax|grep virt 1518 ? S 0:00 /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/libexec/libvirt_leaseshelper 1519 ? S 0:00 /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/libexec/libvirt_leaseshelper 5006 ? Ssl 0:00 /usr/sbin/libvirtd 7789 pts/0 S+ 0:00 sudo virt-install --name fed28 --ram 1024 --vcpus 1 --disk path=/fed28.img,size=20 --os-variant fedora28 --os-type linux --network bridge=br0 --graphics none --console pty,target_type=serial --location http://fedora.inode.at/releases/28/Server/x86_64/os/ --check all=off 7791 pts/0 Sl+ 0:04 /usr/bin/python2 /usr/share/virt-manager/virt-install --name fed28 --ram 1024 --vcpus 1 --disk path=/fed28.img,size=20 --os-variant fedora28 --os-type linux --network bridge=br0 --graphics none --console pty,target_type=serial --location http://fedora.inode.at/releases/28/Server/x86_64/os/ --check all=off 7838 ? Ssl 0:00 /usr/sbin/virtlogd 7846 ? Sl 10:42 /usr/bin/qemu-system-x86_64 -name guest=fed28,debug-threads=on -S -object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain-1-fed28/master-key.aes -machine pc-i440fx-2.11,accel=tcg,usb=off,dump-guest-core=off -m 1024 -realtime mlock=off -smp 1,sockets=1,cores=1,threads=1 -uuid 1d9f2ad3-ead7-44a8-99b6-9bb59609d7a5 -display none -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/domain-1-fed28/monitor.sock,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc,driftfix=slew -global kvm-pit.lost_tick_policy=delay -no-hpet -no-reboot -global PIIX4_PM.disable_s3=1 -global PIIX4_PM.disable_s4=1 -boot strict=on -kernel /var/lib/libvirt/boot/virtinst-vmlinuz.l1EqUl -initrd /var/lib/libvirt/boot/virtinst-initrd.img.QeTuKH -append inst.repo=http://fedora.inode.at/releases/28/Server/x86_64/os/ -device ich9-usb-ehci1,id=usb,bus=pci.0,addr=0x3.0x7 -device ich9-usb-uhci1,masterbus=usb.0,firstport=0,bus=pci.0,multifunction=on,addr=0x3 -device ich9-usb-uhci2,masterbus=usb.0,firstport=2,bus=pci.0,addr=0x3.0x1 -device ich9-usb-uhci3,masterbus=usb.0,firstport=4,bus=pci.0,addr=0x3.0x2 -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x4 -drive file=/fed28.img,format=qcow2,if=none,id=drive-virtio-disk0 -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x5,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 -netdev tap,fd=30,id=hostnet0 -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:b2:ec:68,bus=pci.0,addr=0x2 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -chardev socket,id=charchannel0,path=/var/lib/libvirt/qemu/channel/target/domain-1-fed28/org.qemu.guest_agent.0,server,nowait -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=org.qemu.guest_agent.0 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x6 -object rng-random,id=objrng0,filename=/dev/urandom -device virtio-rng-pci,rng=objrng0,id=rng0,bus=pci.0,addr=0x7 -msg timestamp=on 8075 pts/2 S+ 0:00 grep --color=auto virt
(11)$ sudo dnf install iftop :
Installed: iftop.x86_64 1.0-0.17.pre4.fc28
Complete!
(12) $ grep flags /proc/cpuinfo | grep --color vmx
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp flush_l1d
:
|