https://www.vagrantup.com/intro/getting-started/index.html
https://app.vagrantup.com/centos/boxes/7
に従う。
[kanda@localhost vagrantcentos7]$ vagrant init centos/7
たったこれだけなのか。
[kanda@localhost vagrantcentos7]$ grep -v \# Vagrantfile | grep -v ^$
Vagrant.configure("2") do |config|
config.vm.box = "centos/7"
end
[kanda@localhost vagrantcentos7]$ vagrant up
No usable default provider could be found for your system.
https://github.com/vagrant-libvirt/vagrant-libvirt
[kanda@localhost vagrantcentos7]$ vagrant plugin install vagrant-libvirt
Installing the 'vagrant-libvirt' plugin. This can take a few minutes...
Fetching: formatador-0.2.5.gem (100%)
Fetching: excon-0.73.0.gem (100%)
Fetching: fog-core-1.43.0.gem (100%)
Fetching: mini_portile2-2.4.0.gem (100%)
Fetching: nokogiri-1.10.9.gem (100%)
Building native extensions. This could take a while...
Fetching: fog-json-1.2.0.gem (100%)
Fetching: fog-xml-0.1.3.gem (100%)
Fetching: ruby-libvirt-0.7.1.gem (100%)
Building native extensions. This could take a while...
Fetching: fog-libvirt-0.7.0.gem (100%)
Fetching: vagrant-libvirt-0.0.45.gem (100%)
Installed the plugin 'vagrant-libvirt (0.0.45)'!
[kanda@localhost vagrantcentos7]$ vagrant up --provider=libvirt
Bringing machine 'default' up with 'libvirt' provider...
==> default: Box 'centos/7' could not be found. Attempting to find and install...
default: Box Provider: libvirt
default: Box Version: >= 0
==> default: Loading metadata for box 'centos/7'
default: URL: https://vagrantcloud.com/centos/7
==> default: Adding box 'centos/7' (v1905.1) for provider: libvirt
default: Downloading: https://vagrantcloud.com/centos/boxes/7/versions/1905.1/providers/libvirt.box
default: Download redirected to host: cloud.centos.org
==> default: Successfully added box 'centos/7' (v1905.1) for 'libvirt'!
==> default: Uploading base box image as volume into libvirt storage...
==> default: Creating image (snapshot of base box volume).
==> default: Creating domain with the following settings...
==> default: -- Name: vagrantcentos7_default
==> default: -- Domain type: kvm
==> default: -- Cpus: 1
==> default: -- Feature: acpi
==> default: -- Feature: apic
==> default: -- Feature: pae
==> default: -- Memory: 512M
==> default: -- Management MAC:
==> default: -- Loader:
==> default: -- Nvram:
==> default: -- Base box: centos/7
==> default: -- Storage pool: default
==> default: -- Image: /var/lib/libvirt/images/vagrantcentos7_default.img (41G)
==> default: -- Volume Cache: default
==> default: -- Kernel:
==> default: -- Initrd:
==> default: -- Graphics Type: vnc
==> default: -- Graphics Port: -1
==> default: -- Graphics IP: 127.0.0.1
==> default: -- Graphics Password: Not defined
==> default: -- Video Type: cirrus
==> default: -- Video VRAM: 9216
==> default: -- Sound Type:
==> default: -- Keymap: en-us
==> default: -- TPM Path:
==> default: -- INPUT: type=mouse, bus=ps2
==> default: Creating shared folders metadata...
==> default: Starting domain.
==> default: Waiting for domain to get an IP address...
==> default: Waiting for SSH to become available...
default:
default: Vagrant insecure key detected. Vagrant will automatically replace
default: this with a newly generated keypair for better security.
default:
default: Inserting generated public key within guest...
default: Removing insecure key from the guest if it's present...
default: Key inserted! Disconnecting and reconnecting using new SSH key...
==> default: Configuring and enabling network interfaces...
default: SSH address: 192.168.121.5:22
default: SSH username: vagrant
default: SSH auth method: private key
==> default: Rsyncing folder: /home/kanda/vagrantcentos7/ => /vagrant
[kanda@localhost vagrantcentos7]$ vagrant ssh
[vagrant@localhost ~]$ uname -a
Linux localhost.localdomain 3.10.0-957.12.2.el7.x86_64 #1 SMP Tue May 14 21:24:32 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
[kanda@localhost ~]$ ls .vagrant.d/gems/2.4.9/gems/
excon-0.73.0 fog-libvirt-0.7.0 mini_portile2-2.4.0 vagrant-libvirt-0.0.45
fog-core-1.43.0 fog-xml-0.1.3 nokogiri-1.10.9
fog-json-1.2.0 formatador-0.2.5 ruby-libvirt-0.7.1
[vagrant@localhost ~]$ ip addr
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 52:54:00:6a:e6:44 brd ff:ff:ff:ff:ff:ff
inet 192.168.121.5/24 brd 192.168.121.255 scope global noprefixroute dynamic eth0
[vagrant@localhost ~]$ lspci
00:00.0 Host bridge: Intel Corporation 440FX - 82441FX PMC [Natoma] (rev 02)
00:01.0 ISA bridge: Intel Corporation 82371SB PIIX3 ISA [Natoma/Triton II]
00:01.1 IDE interface: Intel Corporation 82371SB PIIX3 IDE [Natoma/Triton II]
00:01.2 USB controller: Intel Corporation 82371SB PIIX3 USB [Natoma/Triton II] (rev 01)
00:01.3 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 03)
00:02.0 VGA compatible controller: Cirrus Logic GD 5446
00:03.0 SCSI storage controller: Red Hat, Inc. Virtio block device
00:04.0 Unclassified device [00ff]: Red Hat, Inc. Virtio memory balloon
00:05.0 Ethernet controller: Red Hat, Inc. Virtio network device
[vagrant@localhost ~]$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
vda 253:0 0 41G 0 disk
`-vda1 253:1 0 40G 0 part /
[root@centos7v ~]# lsmod
Module Size Used by
iosf_mbi 15582 0
kvm 615914 0
cirrus 24377 1
ttm 114635 1 cirrus
drm_kms_helper 179394 1 cirrus
irqbypass 13503 1 kvm
crc32_pclmul 13133 0
ghash_clmulni_intel 13273 0
syscopyarea 12529 1 drm_kms_helper
aesni_intel 189415 0
lrw 13286 1 aesni_intel
sysfillrect 12701 1 drm_kms_helper
ppdev 17671 0
gf128mul 15139 1 lrw
sysimgblt 12640 1 drm_kms_helper
joydev 17389 0
pcspkr 12718 0
glue_helper 13990 1 aesni_intel
ablk_helper 13597 1 aesni_intel
fb_sys_fops 12703 1 drm_kms_helper
cryptd 21190 3 ghash_clmulni_intel,aesni_intel,ablk_helper
virtio_net 28063 0
drm 429744 4 ttm,drm_kms_helper,cirrus
virtio_balloon 18015 0
i2c_piix4 22401 0
parport_pc 28205 0
drm_panel_orientation_quirks 12957 1 drm
parport 46395 2 ppdev,parport_pc
sunrpc 353407 1
ip_tables 27126 0
xfs 997127 1
libcrc32c 12644 1 xfs
virtio_blk 18222 2
ata_generic 12923 0
pata_acpi 13053 0
crct10dif_pclmul 14307 0
crct10dif_common 12595 1 crct10dif_pclmul
crc32c_intel 22094 1
serio_raw 13434 0
ata_piix 35052 0
libata 243133 3 pata_acpi,ata_generic,ata_piix
virtio_pci 22985 0
virtio_ring 22746 4 virtio_blk,virtio_net,virtio_pci,virtio_balloon
virtio 14959 4 virtio_blk,virtio_net,virtio_pci,virtio_balloon
[root@centos7v ~]#
[root@centos7v ~]# dmesg
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Initializing cgroup subsys cpuacct
[ 0.000000] Linux version 3.10.0-1127.el7.x86_64 (mockbuild@kbuilder.bsys.centos.org) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-39) (GCC) ) #1 SMP Tue Mar 31 23:36:51 UTC 2020
[ 0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-3.10.0-1127.el7.x86_64 root=UUID=8ac075e3-1124-4bb6-bef7-a6811bf8b870 ro no_timer_check console=tty0 console=ttyS0,115200n8 net.ifnames=0 biosdevname=0 elevator=noop crashkernel=auto LANG=en_US.UTF-8
[ 0.000000] e820: BIOS-provided physical RAM map:
[ 0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009fbff] usable
[ 0.000000] BIOS-e820: [mem 0x000000000009fc00-0x000000000009ffff] reserved
[ 0.000000] BIOS-e820: [mem 0x00000000000f0000-0x00000000000fffff] reserved
[ 0.000000] BIOS-e820: [mem 0x0000000000100000-0x000000001ffdbfff] usable
[ 0.000000] BIOS-e820: [mem 0x000000001ffdc000-0x000000001fffffff] reserved
[ 0.000000] BIOS-e820: [mem 0x00000000feffc000-0x00000000feffffff] reserved
[ 0.000000] BIOS-e820: [mem 0x00000000fffc0000-0x00000000ffffffff] reserved
[ 0.000000] NX (Execute Disable) protection: active
[ 0.000000] SMBIOS 2.8 present.
[ 0.000000] DMI: Red Hat KVM, BIOS 1.11.1-4.module_el8.1.0+248+298dec18 04/01/2014
[ 0.000000] Hypervisor detected: KVM
[ 0.000000] e820: update [mem 0x00000000-0x00000fff] usable ==> reserved
[ 0.000000] e820: remove [mem 0x000a0000-0x000fffff] usable
[ 0.000000] e820: last_pfn = 0x1ffdc max_arch_pfn = 0x400000000
[ 0.000000] MTRR default type: write-back
[ 0.000000] MTRR fixed ranges enabled:
[ 0.000000] 00000-9FFFF write-back
[ 0.000000] A0000-BFFFF uncachable
[ 0.000000] C0000-FFFFF write-protect
[ 0.000000] MTRR variable ranges enabled:
[ 0.000000] 0 base 0080000000 mask 7F80000000 uncachable
[ 0.000000] 1 disabled
[ 0.000000] 2 disabled
[ 0.000000] 3 disabled
[ 0.000000] 4 disabled
[ 0.000000] 5 disabled
[ 0.000000] 6 disabled
[ 0.000000] 7 disabled
[ 0.000000] PAT configuration [0-7]: WB WC UC- UC WB WP UC- UC
[ 0.000000] found SMP MP-table at [mem 0x000f5cc0-0x000f5ccf] mapped at [ffffffffff200cc0]
[ 0.000000] Base memory trampoline at [ffff9a87c0099000] 99000 size 24576
[ 0.000000] Using GB pages for direct mapping
[ 0.000000] BRK [0x10273000, 0x10273fff] PGTABLE
[ 0.000000] BRK [0x10274000, 0x10274fff] PGTABLE
[ 0.000000] BRK [0x10275000, 0x10275fff] PGTABLE
[ 0.000000] BRK [0x10276000, 0x10276fff] PGTABLE
[ 0.000000] BRK [0x10277000, 0x10277fff] PGTABLE
[ 0.000000] RAMDISK: [mem 0x1e403000-0x1f0b1fff]
[ 0.000000] Early table checksum verification disabled
[ 0.000000] ACPI: RSDP 00000000000f5a90 00014 (v00 BOCHS )
[ 0.000000] ACPI: RSDT 000000001ffe14f7 0002C (v01 BOCHS BXPCRSDT 00000001 BXPC 00000001)
[ 0.000000] ACPI: FACP 000000001ffe140b 00074 (v01 BOCHS BXPCFACP 00000001 BXPC 00000001)
[ 0.000000] ACPI: DSDT 000000001ffe0040 013CB (v01 BOCHS BXPCDSDT 00000001 BXPC 00000001)
[ 0.000000] ACPI: FACS 000000001ffe0000 00040
[ 0.000000] ACPI: APIC 000000001ffe147f 00078 (v01 BOCHS BXPCAPIC 00000001 BXPC 00000001)
[ 0.000000] ACPI: Local APIC address 0xfee00000
[ 0.000000] No NUMA configuration found
[ 0.000000] Faking a node at [mem 0x0000000000000000-0x000000001ffdbfff]
[ 0.000000] NODE_DATA(0) allocated [mem 0x1ffb5000-0x1ffdbfff]
[ 0.000000] crashkernel=auto resulted in zero bytes of reserved memory.
[ 0.000000] kvm-clock: cpu 0, msr 0:1ff64001, primary cpu clock
[ 0.000000] kvm-clock: Using msrs 4b564d01 and 4b564d00
[ 0.000000] kvm-clock: using sched offset of 442843194305 cycles
[ 0.000000] Zone ranges:
[ 0.000000] DMA [mem 0x00001000-0x00ffffff]
[ 0.000000] DMA32 [mem 0x01000000-0xffffffff]
[ 0.000000] Normal empty
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x00001000-0x0009efff]
[ 0.000000] node 0: [mem 0x00100000-0x1ffdbfff]
[ 0.000000] Initmem setup node 0 [mem 0x00001000-0x1ffdbfff]
[ 0.000000] On node 0 totalpages: 130938
[ 0.000000] DMA zone: 64 pages used for memmap
[ 0.000000] DMA zone: 21 pages reserved
[ 0.000000] DMA zone: 3998 pages, LIFO batch:0
[ 0.000000] DMA32 zone: 1984 pages used for memmap
[ 0.000000] DMA32 zone: 126940 pages, LIFO batch:31
[ 0.000000] ACPI: PM-Timer IO Port: 0x608
[ 0.000000] ACPI: Local APIC address 0xfee00000
[ 0.000000] ACPI: LAPIC (acpi_id[0x00] lapic_id[0x00] enabled)
[ 0.000000] ACPI: LAPIC_NMI (acpi_id[0xff] dfl dfl lint[0x1])
[ 0.000000] ACPI: IOAPIC (id[0x00] address[0xfec00000] gsi_base[0])
[ 0.000000] IOAPIC[0]: apic_id 0, version 17, address 0xfec00000, GSI 0-23
[ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
[ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 5 global_irq 5 high level)
[ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)
[ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 10 global_irq 10 high level)
[ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 11 global_irq 11 high level)
[ 0.000000] ACPI: IRQ0 used by override.
[ 0.000000] ACPI: IRQ5 used by override.
[ 0.000000] ACPI: IRQ9 used by override.
[ 0.000000] ACPI: IRQ10 used by override.
[ 0.000000] ACPI: IRQ11 used by override.
[ 0.000000] Using ACPI (MADT) for SMP configuration information
[ 0.000000] smpboot: Allowing 1 CPUs, 0 hotplug CPUs
[ 0.000000] PM: Registered nosave memory: [mem 0x0009f000-0x0009ffff]
[ 0.000000] PM: Registered nosave memory: [mem 0x000a0000-0x000effff]
[ 0.000000] PM: Registered nosave memory: [mem 0x000f0000-0x000fffff]
[ 0.000000] e820: [mem 0x20000000-0xfeffbfff] available for PCI devices
[ 0.000000] Booting paravirtualized kernel on KVM
[ 0.000000] setup_percpu: NR_CPUS:5120 nr_cpumask_bits:1 nr_cpu_ids:1 nr_node_ids:1
[ 0.000000] percpu: Embedded 38 pages/cpu s118784 r8192 d28672 u2097152
[ 0.000000] pcpu-alloc: s118784 r8192 d28672 u2097152 alloc=1*2097152
[ 0.000000] pcpu-alloc: [0] 0
[ 0.000000] KVM setup async PF for cpu 0
[ 0.000000] kvm-stealtime: cpu 0, msr 1fc1c040
[ 0.000000] Built 1 zonelists in Node order, mobility grouping on. Total pages: 128869
[ 0.000000] Policy zone: DMA32
[ 0.000000] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-3.10.0-1127.el7.x86_64 root=UUID=8ac075e3-1124-4bb6-bef7-a6811bf8b870 ro no_timer_check console=tty0 console=ttyS0,115200n8 net.ifnames=0 biosdevname=0 elevator=noop crashkernel=auto LANG=en_US.UTF-8
[ 0.000000] PID hash table entries: 2048 (order: 2, 16384 bytes)
[ 0.000000] x86/fpu: xstate_offset[2]: 0240, xstate_sizes[2]: 0100
[ 0.000000] x86/fpu: xstate_offset[3]: 03c0, xstate_sizes[3]: 0040
[ 0.000000] x86/fpu: xstate_offset[4]: 0400, xstate_sizes[4]: 0040
[ 0.000000] xsave: enabled xstate_bv 0x1f, cntxt size 0x440 using standard form
[ 0.000000] Memory: 482672k/524144k available (7784k kernel code, 392k absent, 41080k reserved, 5957k data, 1980k init)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] Hierarchical RCU implementation.
[ 0.000000] RCU restricting CPUs from NR_CPUS=5120 to nr_cpu_ids=1.
[ 0.000000] NR_IRQS:327936 nr_irqs:256 0
[ 0.000000] Console: colour VGA+ 80x25
[ 0.000000] console [tty0] enabled
[ 0.000000] console [ttyS0] enabled
[ 0.000000] allocated 2097152 bytes of page_cgroup
[ 0.000000] please try 'cgroup_disable=memory' option if you don't want memory cgroups
[ 0.000000] tsc: Detected 2112.000 MHz processor
[ 0.178829] Calibrating delay loop (skipped) preset value.. 4224.00 BogoMIPS (lpj=2112000)
[ 0.180802] pid_max: default: 32768 minimum: 301
[ 0.181785] Security Framework initialized
[ 0.182739] SELinux: Initializing.
[ 0.183612] SELinux: Starting in permissive mode
[ 0.183614] Yama: becoming mindful.
[ 0.194776] Dentry cache hash table entries: 65536 (order: 7, 524288 bytes)
[ 0.196103] Inode-cache hash table entries: 32768 (order: 6, 262144 bytes)
[ 0.197380] Mount-cache hash table entries: 1024 (order: 1, 8192 bytes)
[ 0.198549] Mountpoint-cache hash table entries: 1024 (order: 1, 8192 bytes)
[ 0.199947] Initializing cgroup subsys memory
[ 0.200903] Initializing cgroup subsys devices
[ 0.201849] Initializing cgroup subsys freezer
[ 0.202798] Initializing cgroup subsys net_cls
[ 0.203770] Initializing cgroup subsys blkio
[ 0.204703] Initializing cgroup subsys perf_event
[ 0.205677] Initializing cgroup subsys hugetlb
[ 0.206659] Initializing cgroup subsys pids
[ 0.207629] Initializing cgroup subsys net_prio
[ 0.208656] x86/cpu: User Mode Instruction Prevention (UMIP) activated
[ 0.210879] Last level iTLB entries: 4KB 0, 2MB 0, 4MB 0
[ 0.211968] Last level dTLB entries: 4KB 0, 2MB 0, 4MB 0
[ 0.212983] tlb_flushall_shift: 6
[ 0.213923] FEATURE SPEC_CTRL Present
[ 0.214786] FEATURE IBPB_SUPPORT Present
[ 0.215733] Spectre V1 : Mitigation: Load fences, usercopy/swapgs barriers and __user pointer sanitization
[ 0.217774] Spectre V2 : Enabling Indirect Branch Prediction Barrier
[ 0.218998] Spectre V2 : Mitigation: Enhanced IBRS
[ 0.220074] Speculative Store Bypass: Mitigation: Speculative Store Bypass disabled via prctl and seccomp
[ 0.221994] TAA: Mitigation: Clear CPU buffers
[ 0.238759] Freeing SMP alternatives: 28k freed
[ 0.246181] ACPI: Core revision 20130517
[ 0.247340] ACPI: All ACPI Tables successfully acquired
[ 0.248877] ftrace: allocating 29618 entries in 116 pages
[ 0.279461] Enabling x2apic
[ 0.280177] Enabled x2apic
[ 0.281025] Switched APIC routing to physical x2apic.
[ 0.282797] ..TIMER: vector=0x30 apic1=0 pin1=2 apic2=-1 pin2=-1
[ 0.283869] smpboot: CPU0: Intel Core Processor (Skylake, IBRS) (fam: 06, model: 5e, stepping: 03)
[ 0.285745] TSC deadline timer enabled
[ 0.285785] Performance Events: unsupported p6 CPU model 94 no PMU driver, software events only.
[ 0.287660] KVM setup paravirtual spinlock
[ 0.289759] Brought up 1 CPUs
[ 0.290502] smpboot: Max logical packages: 1
[ 0.291342] smpboot: Total of 1 processors activated (4224.00 BogoMIPS)
[ 0.292751] devtmpfs: initialized
[ 0.293630] x86/mm: Memory block size: 128MB
[ 0.295927] EVM: security.selinux
[ 0.296738] EVM: security.ima
[ 0.297501] EVM: security.capability
[ 0.298845] atomic64 test passed for x86-64 platform with CX8 and with SSE
[ 0.300076] pinctrl core: initialized pinctrl subsystem
[ 0.301176] RTC time: 12:02:53, date: 05/03/20
[ 0.302192] NET: Registered protocol family 16
[ 0.303215] cpuidle: using governor haltpoll
[ 0.304221] ACPI: bus type PCI registered
[ 0.305058] acpiphp: ACPI Hot Plug PCI Controller Driver version: 0.5
[ 0.306206] PCI: Using configuration type 1 for base access
[ 0.307876] ACPI: Added _OSI(Module Device)
[ 0.308740] ACPI: Added _OSI(Processor Device)
[ 0.309633] ACPI: Added _OSI(3.0 _SCP Extensions)
[ 0.310609] ACPI: Added _OSI(Processor Aggregator Device)
[ 0.311666] ACPI: Added _OSI(Linux-Dell-Video)
[ 0.312773] ACPI: EC: Look up EC in DSDT
[ 0.313035] ACPI: Interpreter enabled
[ 0.313863] ACPI: (supports S0 S5)
[ 0.314674] ACPI: Using IOAPIC for interrupt routing
[ 0.315627] PCI: Using host bridge windows from ACPI; if necessary, use "pci=nocrs" and report a bug
[ 0.317393] ACPI: Enabled 2 GPEs in block 00 to 0F
[ 0.320168] ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-ff])
[ 0.321204] acpi PNP0A03:00: _OSC: OS supports [ASPM ClockPM Segments MSI]
[ 0.322308] acpi PNP0A03:00: _OSC failed (AE_NOT_FOUND); disabling ASPM
[ 0.323404] acpi PNP0A03:00: fail to add MMCONFIG information, can't access extended PCI configuration space under this bridge.
[ 0.325493] acpiphp: Slot [3] registered
[ 0.326317] acpiphp: Slot [4] registered
[ 0.327180] acpiphp: Slot [5] registered
[ 0.328023] acpiphp: Slot [6] registered
[ 0.328909] acpiphp: Slot [7] registered
[ 0.329781] acpiphp: Slot [8] registered
[ 0.330662] acpiphp: Slot [9] registered
[ 0.331593] acpiphp: Slot [10] registered
[ 0.332459] acpiphp: Slot [11] registered
[ 0.333319] acpiphp: Slot [12] registered
[ 0.334178] acpiphp: Slot [13] registered
[ 0.335034] acpiphp: Slot [14] registered
[ 0.335891] acpiphp: Slot [15] registered
[ 0.336746] acpiphp: Slot [16] registered
[ 0.337600] acpiphp: Slot [17] registered
[ 0.338452] acpiphp: Slot [18] registered
[ 0.339320] acpiphp: Slot [19] registered
[ 0.340182] acpiphp: Slot [20] registered
[ 0.341050] acpiphp: Slot [21] registered
[ 0.341997] acpiphp: Slot [22] registered
[ 0.342893] acpiphp: Slot [23] registered
[ 0.343766] acpiphp: Slot [24] registered
[ 0.344686] acpiphp: Slot [25] registered
[ 0.345550] acpiphp: Slot [26] registered
[ 0.346407] acpiphp: Slot [27] registered
[ 0.347274] acpiphp: Slot [28] registered
[ 0.348132] acpiphp: Slot [29] registered
[ 0.349496] acpiphp: Slot [30] registered
[ 0.350329] acpiphp: Slot [31] registered
[ 0.351165] PCI host bridge to bus 0000:00
[ 0.351990] pci_bus 0000:00: root bus resource [io 0x0000-0x0cf7 window]
[ 0.353162] pci_bus 0000:00: root bus resource [io 0x0d00-0xffff window]
[ 0.354349] pci_bus 0000:00: root bus resource [mem 0x000a0000-0x000bffff window]
[ 0.355879] pci_bus 0000:00: root bus resource [mem 0x20000000-0xfebfffff window]
[ 0.357408] pci_bus 0000:00: root bus resource [mem 0x100000000-0x17fffffff window]
[ 0.359098] pci_bus 0000:00: root bus resource [bus 00-ff]
[ 0.360139] pci 0000:00:00.0: [8086:1237] type 00 class 0x060000
[ 0.360454] pci 0000:00:01.0: [8086:7000] type 00 class 0x060100
[ 0.360829] pci 0000:00:01.1: [8086:7010] type 00 class 0x010180
[ 0.362421] pci 0000:00:01.1: reg 0x20: [io 0xc0a0-0xc0af]
[ 0.363011] pci 0000:00:01.1: legacy IDE quirk: reg 0x10: [io 0x01f0-0x01f7]
[ 0.364258] pci 0000:00:01.1: legacy IDE quirk: reg 0x14: [io 0x03f6]
[ 0.365438] pci 0000:00:01.1: legacy IDE quirk: reg 0x18: [io 0x0170-0x0177]
[ 0.366602] pci 0000:00:01.1: legacy IDE quirk: reg 0x1c: [io 0x0376]
[ 0.367806] pci 0000:00:01.2: [8086:7020] type 00 class 0x0c0300
[ 0.369270] pci 0000:00:01.2: reg 0x20: [io 0xc040-0xc05f]
[ 0.370001] pci 0000:00:01.3: [8086:7113] type 00 class 0x068000
[ 0.370292] pci 0000:00:01.3: quirk: [io 0x0600-0x063f] claimed by PIIX4 ACPI
[ 0.372200] pci 0000:00:01.3: quirk: [io 0x0700-0x070f] claimed by PIIX4 SMB
[ 0.373623] pci 0000:00:02.0: [1013:00b8] type 00 class 0x030000
[ 0.374591] pci 0000:00:02.0: reg 0x10: [mem 0xfc000000-0xfdffffff pref]
[ 0.375212] pci 0000:00:02.0: reg 0x14: [mem 0xfebd0000-0xfebd0fff]
[ 0.378547] pci 0000:00:02.0: reg 0x30: [mem 0xfebc0000-0xfebcffff pref]
[ 0.379194] pci 0000:00:03.0: [1af4:1001] type 00 class 0x010000
[ 0.380265] pci 0000:00:03.0: reg 0x10: [io 0xc000-0xc03f]
[ 0.381319] pci 0000:00:03.0: reg 0x14: [mem 0xfebd1000-0xfebd1fff]
[ 0.384697] pci 0000:00:03.0: reg 0x20: [mem 0xfe000000-0xfe003fff 64bit pref]
[ 0.386020] pci 0000:00:04.0: [1af4:1002] type 00 class 0x00ff00
[ 0.386524] pci 0000:00:04.0: reg 0x10: [io 0xc060-0xc07f]
[ 0.388102] pci 0000:00:04.0: reg 0x20: [mem 0xfe004000-0xfe007fff 64bit pref]
[ 0.388921] pci 0000:00:05.0: [1af4:1000] type 00 class 0x020000
[ 0.389646] pci 0000:00:05.0: reg 0x10: [io 0xc080-0xc09f]
[ 0.390308] pci 0000:00:05.0: reg 0x14: [mem 0xfebd2000-0xfebd2fff]
[ 0.392472] pci 0000:00:05.0: reg 0x20: [mem 0xfe008000-0xfe00bfff 64bit pref]
[ 0.393810] pci 0000:00:05.0: reg 0x30: [mem 0xfeb80000-0xfebbffff pref]
[ 0.394508] ACPI: PCI Interrupt Link [LNKA] (IRQs 5 *10 11)
[ 0.396070] ACPI: PCI Interrupt Link [LNKB] (IRQs 5 *10 11)
[ 0.397497] ACPI: PCI Interrupt Link [LNKC] (IRQs 5 10 *11)
[ 0.398971] ACPI: PCI Interrupt Link [LNKD] (IRQs 5 10 *11)
[ 0.400263] ACPI: PCI Interrupt Link [LNKS] (IRQs *9)
[ 0.401627] vgaarb: device added: PCI:0000:00:02.0,decodes=io+mem,owns=io+mem,locks=none
[ 0.403179] vgaarb: loaded
[ 0.403854] vgaarb: bridge control possible 0000:00:02.0
[ 0.404874] SCSI subsystem initialized
[ 0.405689] ACPI: bus type USB registered
[ 0.406542] usbcore: registered new interface driver usbfs
[ 0.407489] usbcore: registered new interface driver hub
[ 0.408414] usbcore: registered new device driver usb
[ 0.409970] EDAC MC: Ver: 3.0.0
[ 0.410880] PCI: Using ACPI for IRQ routing
[ 0.411718] PCI: pci_cache_line_size set to 64 bytes
[ 0.411812] e820: reserve RAM buffer [mem 0x0009fc00-0x0009ffff]
[ 0.411815] e820: reserve RAM buffer [mem 0x1ffdc000-0x1fffffff]
[ 0.411955] NetLabel: Initializing
[ 0.412721] NetLabel: domain hash size = 128
[ 0.413576] NetLabel: protocols = UNLABELED CIPSOv4
[ 0.414540] NetLabel: unlabeled traffic allowed by default
[ 0.415537] amd_nb: Cannot enumerate AMD northbridges
[ 0.416456] Switched to clocksource kvm-clock
[ 0.419695] pnp: PnP ACPI init
[ 0.420430] ACPI: bus type PNP registered
[ 0.421461] pnp 00:00: Plug and Play ACPI device, IDs PNP0b00 (active)
[ 0.421494] pnp 00:01: Plug and Play ACPI device, IDs PNP0303 (active)
[ 0.421532] pnp 00:02: Plug and Play ACPI device, IDs PNP0f13 (active)
[ 0.421543] pnp 00:03: [dma 2]
[ 0.421550] pnp 00:03: Plug and Play ACPI device, IDs PNP0700 (active)
[ 0.421596] pnp 00:04: Plug and Play ACPI device, IDs PNP0501 (active)
[ 0.421683] pnp: PnP ACPI: found 5 devices
[ 0.422581] ACPI: bus type PNP unregistered
[ 0.428603] pci_bus 0000:00: resource 4 [io 0x0000-0x0cf7 window]
[ 0.428605] pci_bus 0000:00: resource 5 [io 0x0d00-0xffff window]
[ 0.428606] pci_bus 0000:00: resource 6 [mem 0x000a0000-0x000bffff window]
[ 0.428606] pci_bus 0000:00: resource 7 [mem 0x20000000-0xfebfffff window]
[ 0.428607] pci_bus 0000:00: resource 8 [mem 0x100000000-0x17fffffff window]
[ 0.428627] NET: Registered protocol family 2
[ 0.429624] TCP established hash table entries: 4096 (order: 3, 32768 bytes)
[ 0.430736] TCP bind hash table entries: 4096 (order: 4, 65536 bytes)
[ 0.431770] TCP: Hash tables configured (established 4096 bind 4096)
[ 0.432800] TCP: reno registered
[ 0.433587] UDP hash table entries: 256 (order: 1, 8192 bytes)
[ 0.434577] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[ 0.435634] NET: Registered protocol family 1
[ 0.436547] pci 0000:00:00.0: Limiting direct PCI/PCI transfers
[ 0.437586] pci 0000:00:01.0: PIIX3: Enabling Passive Release
[ 0.439122] pci 0000:00:01.0: Activating ISA DMA hang workarounds
[ 0.452469] ACPI: PCI Interrupt Link [LNKD] enabled at IRQ 11
[ 0.466180] pci 0000:00:02.0: Boot video device
[ 0.466208] PCI: CLS 0 bytes, default 64
[ 0.466268] Unpacking initramfs...
[ 0.573884] Freeing initrd memory: 12988k freed
[ 0.576791] sha1_ssse3: Using AVX2 optimized SHA-1 implementation
[ 0.577868] sha256_ssse3: Using AVX2 optimized SHA-256 implementation
[ 0.579579] futex hash table entries: 256 (order: 2, 16384 bytes)
[ 0.580578] Initialise system trusted keyring
[ 0.581418] audit: initializing netlink socket (disabled)
[ 0.582369] type=2000 audit(1588507373.780:1): initialized
[ 0.599621] HugeTLB registered 1 GB page size, pre-allocated 0 pages
[ 0.600745] HugeTLB registered 2 MB page size, pre-allocated 0 pages
[ 0.602534] zpool: loaded
[ 0.603227] zbud: loaded
[ 0.604053] VFS: Disk quotas dquot_6.5.2
[ 0.604913] Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[ 0.606136] Key type big_key registered
[ 0.606948] SELinux: Registering netfilter hooks
[ 0.607263] NET: Registered protocol family 38
[ 0.608105] Key type asymmetric registered
[ 0.608912] Asymmetric key parser 'x509' registered
[ 0.609823] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 248)
[ 0.611330] io scheduler noop registered (default)
[ 0.612216] io scheduler deadline registered
[ 0.613081] io scheduler cfq registered
[ 0.613872] io scheduler mq-deadline registered
[ 0.614731] io scheduler kyber registered
[ 0.624979] pci_hotplug: PCI Hot Plug PCI Core version: 0.5
[ 0.625934] pciehp: PCI Express Hot Plug Controller Driver version: 0.4
[ 0.627000] shpchp: Standard Hot Plug PCI Controller Driver version: 0.4
[ 0.628107] intel_idle: does not run on family 6 model 94
[ 0.628145] input: Power Button as /devices/LNXSYSTM:00/LNXPWRBN:00/input/input0
[ 0.629626] ACPI: Power Button [PWRF]
[ 0.630477] GHES: HEST is not enabled!
[ 0.631308] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
[ 0.654882] 00:04: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
[ 0.656102] Non-volatile memory driver v1.3
[ 0.656950] Linux agpgart interface v0.103
[ 0.657838] crash memory driver: version 1.1
[ 0.658708] rdac: device handler registered
[ 0.659560] hp_sw: device handler registered
[ 0.660376] emc: device handler registered
[ 0.661221] alua: device handler registered
[ 0.662096] libphy: Fixed MDIO Bus: probed
[ 0.662990] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 0.664129] ehci-pci: EHCI PCI platform driver
[ 0.664962] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 0.665973] ohci-pci: OHCI PCI platform driver
[ 0.666846] uhci_hcd: USB Universal Host Controller Interface driver
[ 0.679937] uhci_hcd 0000:00:01.2: UHCI Host Controller
[ 0.680954] uhci_hcd 0000:00:01.2: new USB bus registered, assigned bus number 1
[ 0.682629] uhci_hcd 0000:00:01.2: detected 2 ports
[ 0.683659] uhci_hcd 0000:00:01.2: irq 11, io base 0x0000c040
[ 0.684706] usb usb1: New USB device found, idVendor=1d6b, idProduct=0001, bcdDevice= 3.10
[ 0.686272] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 0.687770] usb usb1: Product: UHCI Host Controller
[ 0.688655] usb usb1: Manufacturer: Linux 3.10.0-1127.el7.x86_64 uhci_hcd
[ 0.689770] usb usb1: SerialNumber: 0000:00:01.2
[ 0.690728] hub 1-0:1.0: USB hub found
[ 0.691532] hub 1-0:1.0: 2 ports detected
[ 0.692464] usbcore: registered new interface driver usbserial_generic
[ 0.693579] usbserial: USB Serial support registered for generic
[ 0.694680] i8042: PNP: PS/2 Controller [PNP0303:KBD,PNP0f13:MOU] at 0x60,0x64 irq 1,12
[ 0.696763] serio: i8042 KBD port at 0x60,0x64 irq 1
[ 0.697684] serio: i8042 AUX port at 0x60,0x64 irq 12
[ 0.698676] mousedev: PS/2 mouse device common for all mice
[ 0.699861] input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input1
[ 0.701983] input: VirtualPS/2 VMware VMMouse as /devices/platform/i8042/serio1/input/input2
[ 0.703668] rtc_cmos 00:00: RTC can wake from S4
[ 0.704841] input: VirtualPS/2 VMware VMMouse as /devices/platform/i8042/serio1/input/input3
[ 0.706551] rtc_cmos 00:00: rtc core: registered rtc_cmos as rtc0
[ 0.707638] rtc_cmos 00:00: alarms up to one day, y3k, 114 bytes nvram
[ 0.709444] hidraw: raw HID events driver (C) Jiri Kosina
[ 0.710552] usbcore: registered new interface driver usbhid
[ 0.711597] usbhid: USB HID core driver
[ 0.712493] drop_monitor: Initializing network drop monitor service
[ 0.713654] TCP: cubic registered
[ 0.714393] Initializing XFRM netlink socket
[ 0.715297] NET: Registered protocol family 10
[ 0.716263] NET: Registered protocol family 17
[ 0.717108] mpls_gso: MPLS GSO support
[ 0.717971] mce: Using 10 MCE banks
[ 0.718808] PM: Hibernation image not present or could not be loaded.
[ 0.718810] Loading compiled-in X.509 certificates
[ 0.719716] Loaded X.509 cert 'CentOS Linux kpatch signing key: ea0413152cde1d98ebdca3fe6f0230904c9ef717'
[ 0.721447] Loaded X.509 cert 'CentOS Linux Driver update signing key: 7f421ee0ab69461574bb358861dbe77762a4201b'
[ 0.723464] Loaded X.509 cert 'CentOS Linux kernel signing key: 690e8a482fe76bfbf231d860f0c662d8f1173d57'
[ 0.725271] registered taskstats version 1
[ 0.727450] Key type trusted registered
[ 0.729269] Key type encrypted registered
[ 0.730109] IMA: No TPM chip found, activating TPM-bypass! (rc=-19)
[ 0.731242] Magic number: 4:451:25
[ 0.732080] rtc_cmos 00:00: setting system clock to 2020-05-03 12:02:53 UTC (1588507373)
[ 0.734314] Freeing unused kernel memory: 1980k freed
[ 0.735449] Write protecting the kernel read-only data: 12288k
[ 0.737125] Freeing unused kernel memory: 396k freed
[ 0.738901] Freeing unused kernel memory: 540k freed
[ 0.742770] random: systemd: uninitialized urandom read (16 bytes read)
[ 0.744292] random: systemd: uninitialized urandom read (16 bytes read)
[ 0.745427] random: systemd: uninitialized urandom read (16 bytes read)
[ 0.747323] systemd[1]: systemd 219 running in system mode. (+PAM +AUDIT +SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 -SECCOMP +BLKID +ELFUTILS +KMOD +IDN)
[ 0.750271] systemd[1]: Detected virtualization kvm.
[ 0.751214] systemd[1]: Detected architecture x86-64.
[ 0.752149] systemd[1]: Running in initial RAM disk.
[ 0.753921] systemd[1]: Set hostname to <centos7v>.
[ 0.771491] random: systemd: uninitialized urandom read (16 bytes read)
[ 0.772676] random: systemd: uninitialized urandom read (16 bytes read)
[ 0.773812] random: systemd: uninitialized urandom read (16 bytes read)
[ 0.775389] random: systemd: uninitialized urandom read (16 bytes read)
[ 0.776617] random: systemd: uninitialized urandom read (16 bytes read)
[ 0.777912] random: systemd: uninitialized urandom read (16 bytes read)
[ 0.779177] random: systemd: uninitialized urandom read (16 bytes read)
[ 0.782498] systemd[1]: Created slice Root Slice.
[ 0.784052] systemd[1]: Reached target Local File Systems.
[ 0.785770] systemd[1]: Created slice System Slice.
[ 0.787282] systemd[1]: Reached target Slices.
[ 0.788744] systemd[1]: Listening on udev Kernel Socket.
[ 0.790338] systemd[1]: Listening on udev Control Socket.
[ 0.792017] systemd[1]: Started Dispatch Password Requests to Console Directory Watch.
[ 0.794438] systemd[1]: Listening on Journal Socket.
[ 0.796201] systemd[1]: Starting Journal Service...
[ 0.797596] systemd[1]: Reached target Sockets.
[ 0.799476] systemd[1]: Reached target Paths.
[ 0.802773] systemd[1]: Starting Apply Kernel Variables...
[ 0.805992] systemd[1]: Reached target Swap.
[ 0.810620] systemd[1]: Reached target Timers.
[ 0.813278] systemd[1]: Starting Create list of required static device nodes for the current kernel...
[ 0.817419] systemd[1]: Started Journal Service.
[ 0.825971] random: fast init done
[ 1.163868] libata version 3.00 loaded.
[ 1.196789] ACPI: PCI Interrupt Link [LNKC] enabled at IRQ 10
[ 1.205677] ata_piix 0000:00:01.1: version 2.13
[ 1.214496] scsi host0: ata_piix
[ 1.222699] scsi host1: ata_piix
[ 1.223538] ata1: PATA max MWDMA2 cmd 0x1f0 ctl 0x3f6 bmdma 0xc0a0 irq 14
[ 1.224620] ata2: PATA max MWDMA2 cmd 0x170 ctl 0x376 bmdma 0xc0a8 irq 15
[ 1.343256] ACPI: PCI Interrupt Link [LNKA] enabled at IRQ 10
[ 1.450119] virtio-pci 0000:00:03.0: irq 24 for MSI/MSI-X
[ 1.450135] virtio-pci 0000:00:03.0: irq 25 for MSI/MSI-X
[ 1.450986] virtio_blk virtio0: [vda] 85983232 512-byte logical blocks (44.0 GB/41.0 GiB)
[ 1.494900] vda: vda1
[ 1.578486] tsc: Refined TSC clocksource calibration: 2111.988 MHz
[ 1.605195] SGI XFS with ACLs, security attributes, no debug enabled
[ 1.620336] XFS (vda1): Mounting V5 Filesystem
[ 1.626466] XFS (vda1): Ending clean mount
[ 1.817852] systemd-journald[85]: Received SIGTERM from PID 1 (systemd).
[ 1.832058] type=1404 audit(1588507374.599:2): enforcing=1 old_enforcing=0 auid=4294967295 ses=4294967295
[ 1.838870] SELinux: 2048 avtab hash slots, 111988 rules.
[ 1.870672] SELinux: 2048 avtab hash slots, 111988 rules.
[ 1.886758] SELinux: 8 users, 14 roles, 5037 types, 316 bools, 1 sens, 1024 cats
[ 1.886764] SELinux: 129 classes, 111988 rules
[ 1.889513] SELinux: Class bpf not defined in policy.
[ 1.890869] SELinux: the above unknown classes and permissions will be allowed
[ 1.893212] SELinux: Completing initialization.
[ 1.893213] SELinux: Setting up existing superblocks.
[ 1.896616] type=1403 audit(1588507374.664:3): policy loaded auid=4294967295 ses=4294967295
[ 1.902881] systemd[1]: Successfully loaded SELinux policy in 70.746ms.
[ 1.913382] ip_tables: (C) 2000-2006 Netfilter Core Team
[ 1.914490] systemd[1]: Inserted module 'ip_tables'
[ 1.932103] systemd[1]: Relabelled /dev, /run and /sys/fs/cgroup in 14.094ms.
[ 2.125459] systemd-journald[1127]: Received request to flush runtime journal from PID 1
[ 2.426781] type=1305 audit(1588507375.194:4): audit_pid=1325 old=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:auditd_t:s0 res=1
[ 2.546659] RPC: Registered named UNIX socket transport module.
[ 2.547718] RPC: Registered udp transport module.
[ 2.548591] RPC: Registered tcp transport module.
[ 2.549474] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 2.684021] Adding 2097148k swap on /swapfile. Priority:-2 extents:1 across:2097148k FS
[ 2.727532] piix4_smbus 0000:00:01.3: SMBus Host Controller at 0x700, revision 0
[ 2.989278] virtio-pci 0000:00:05.0: irq 26 for MSI/MSI-X
[ 2.989293] virtio-pci 0000:00:05.0: irq 27 for MSI/MSI-X
[ 2.989312] virtio-pci 0000:00:05.0: irq 28 for MSI/MSI-X
[ 2.998878] input: PC Speaker as /devices/platform/pcspkr/input/input4
[ 3.095754] cryptd: max_cpu_qlen set to 1000
[ 3.158318] AVX2 version of gcm_enc/dec engaged.
[ 3.159350] AES CTR mode by8 optimization enabled
[ 3.169923] [TTM] Zone kernel: Available graphics memory: 249302 kiB
[ 3.171096] [TTM] Initializing pool allocator
[ 3.176945] [TTM] Initializing DMA pool allocator
[ 3.188273] [drm] fb mappable at 0xFC000000
[ 3.189151] [drm] vram aper at 0xFC000000
[ 3.190462] [drm] size 33554432
[ 3.191174] [drm] fb depth is 16
[ 3.191902] [drm] pitch is 2048
[ 3.206670] fbcon: cirrusdrmfb (fb0) is primary device
[ 3.284056] Console: switching to colour frame buffer device 128x48
[ 3.299234] cirrus 0000:00:02.0: fb0: cirrusdrmfb frame buffer device
[ 3.304122] [drm] Initialized cirrus 1.0.0 20110418 for 0000:00:02.0 on minor 0
[ 3.361940] alg: No test for __gcm-aes-aesni (__driver-gcm-aes-aesni)
[ 3.397325] alg: No test for __generic-gcm-aes-aesni (__driver-generic-gcm-aes-aesni)
[ 3.449263] ppdev: user-space parallel port driver
[ 3.767283] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 3.768854] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 3.777399] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 3.804595] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 4.012482] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[root@centos7v ~]#
[root@localhost kanda]# ls -lh /var/lib/libvirt/images/vagrantcentos7_default.img
-rw------- 1 qemu qemu 22M 4月 26 22:20 /var/lib/libvirt/images/vagrantcentos7_default.img
[root@localhost kanda]# virsh list --all
Id 名前 状態
----------------------------------------------------
1 vagrantcentos7_default 実行中
[root@localhost kanda]# virsh dumpxml vagrantcentos7_default
<domain type='kvm'>
<name>vagrantcentos7_default</name>
<uuid>e6c7afa4-df67-4725-af65-4da879e6ecbf</uuid>
<memory unit='KiB'>524288</memory>
<currentMemory unit='KiB'>524288</currentMemory>
<vcpu placement='static'>1</vcpu>
<os>
<type arch='x86_64' machine='pc-i440fx-rhel7.6.0'>hvm</type>
<boot dev='hd'/>
</os>
<features>
<acpi/>
<apic/>
<pae/>
</features>
<cpu mode='host-model' check='partial'>
<model fallback='allow'/>
</cpu>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<emulator>/usr/libexec/qemu-kvm</emulator>
<disk type='file' device='disk'>
<driver name='qemu' type='qcow2'/>
<source file='/var/lib/libvirt/images/vagrantcentos7_default.img'/>
<target dev='vda' bus='virtio'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</disk>
<controller type='usb' index='0' model='piix3-uhci'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
</controller>
<controller type='pci' index='0' model='pci-root'/>
<interface type='network'>
<mac address='52:54:00:6a:e6:44'/>
<source network='vagrant-libvirt'/>
<model type='virtio'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
</interface>
<serial type='pty'>
<target type='isa-serial' port='0'>
<model name='isa-serial'/>
</target>
</serial>
<console type='pty'>
<target type='serial' port='0'/>
</console>
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
<graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' keymap='en-us'>
<listen type='address' address='127.0.0.1'/>
</graphics>
<video>
<model type='cirrus' vram='16384' heads='1' primary='yes'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
</video>
<memballoon model='virtio'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
</memballoon>
</devices>
</domain>
https://www.vagrantup.com/docs/boxes/format.html
[kanda@localhost ~]$ gunzip < Downloads/CentOS-7-x86_64-Vagrant-1905_01.Libvirt.box | tar t
Vagrantfile
box.img
metadata.json
[kanda@localhost libvirt]$ pwd
/home/kanda/.vagrant.d/boxes/centos-VAGRANTSLASH-7/1905.1/libvirt
[kanda@localhost libvirt]$ ls
Vagrantfile box.img metadata.json
[kanda@localhost libvirt]$ cat Vagrantfile
Vagrant.configure('2') do |config|
config.vm.synced_folder ".", "/vagrant", type: "rsync"
config.vm.provider :libvirt do |libvirt|
libvirt.driver = 'kvm'
libvirt.connect_via_ssh = false
libvirt.username = 'root'
libvirt.storage_pool_name = 'default'
end
end
[kanda@localhost libvirt]$ cat metadata.json
{"provider": "libvirt", "format": "qcow2", "virtual_size": 41}
[kanda@localhost libvirt]$ file box.img
box.img: QEMU QCOW Image (v2), 42949672960 bytes
domain xml のテンプレートがあって、
[kanda@localhost vagrant-libvirt]$ more templates/domain.xml.erb
<domain type='<%= @domain_type %>' xmlns:qemu='http://libvirt.org/schemas/domain
/qemu/1.0'>
<name><%= @name %></name>
<uuid><%= @uuid %></uuid>
<memory><%= @memory_size %></memory>
<vcpu><%= @cpus %></vcpu>
ここで、可変部分を差し替えて、
create_domain.rb
module VagrantPlugins
module ProviderLibvirt
module Action
class CreateDomain
def call(env)
ドメインを作る。
# Create libvirt domain.
server = env[:machine].provider.driver.connection.servers.create(
xml: to_xml('domain')
)
飛ぶ先は、 libvirt ruby binding であるはず。
lib/vagrant-libvirt/driver.rb
require 'fog/libvirt'
require 'libvirt'
def connection
@logger.info("Connecting to Libvirt (#{uri}) ...")
@@connection = Fog::Compute.new(conn_attr)
def system_connection
@@system_connection = Libvirt::open_read_only(config.system_uri)
fog ってなんだ。
ラッパーらしい。
fog-libvirt-0.7.0/lib/fog/libvirt/compute.rb
def initialize(options={})
@uri = ::Fog::Libvirt::Util::URI.new(enhance_uri(options[:libvirt_uri]))
require 'libvirt'
@client = ::Libvirt::open(uri.uri)
[root@centos8 kanda]# virsh start vagrantcentos7_default
エラー: ドメイン vagrantcentos7_default の起動に失敗しました
エラー: 要求された操作は有効ではありません: network 'vagrant-libvirt' is not active
https://github.com/hashicorp/vagrant/issues/7564
.vagrant.d にあるものを、削除して、
[kanda@centos8 ~]$ vagrant plugin uninstall vagrant-libvirt
Uninstalling the 'vagrant-libvirt' plugin...
Successfully uninstalled formatador-0.2.5
Successfully uninstalled excon-0.73.0
Successfully uninstalled fog-core-1.43.0
Successfully uninstalled mini_portile2-2.4.0
Removing nokogiri
Successfully uninstalled nokogiri-1.10.9
Successfully uninstalled fog-json-1.2.0
Successfully uninstalled fog-xml-0.1.3
Successfully uninstalled ruby-libvirt-0.7.1
Successfully uninstalled fog-libvirt-0.7.0
Successfully uninstalled vagrant-libvirt-0.0.45
ルートで、 gem install する。
[root@centos8 kanda]# gem install vagrant-libvirt
依存パッケージ含めて、この辺に入る。
/usr/local/share/gems/gems/vagrant-libvirt-0.0.45
[root@centos8 kanda]# gem list
vagrant-libvirt (0.0.45)
。。
動くかな。
[kanda@centos8 vagrantcentos7]$ vagrant up
The provider 'libvirt' could not be found, but was requested to
back the machine 'default'. Please use a provider that exists.
Vagrant knows about the following providers: docker, hyperv, virtualbox
だめじゃん。
strace を見ても、/usr/local/share/gems/gems/vagrant-libvirt を拾う様子はない。
[kanda@centos8 ~]$ cat .vagrant.d/plugins.json
{"version":"1","installed":{"vagrant-libvirt":{"ruby_version":"2.4.9","vagrant_version":"2.2.7","gem_version":"","require":"","sources":["https://gems.hashicorp.com/","https://rubygems.org/"],"installed_gem_version":"0.0.45","env_local":false}}}
[root@centos8 kanda]# gem install vagrant-libvirt
Fetching: formatador-0.2.5.gem (100%)
..
[guest@centos8 ~]$ cp plugins.json .vagrant.d/
だめだ。
[guest@centos8 vagrantcentos7]$ vagrant up
Vagrant failed to initialize at a very early stage:
The plugins failed to initialize correctly. This may be due to manual
modifications made within the Vagrant home directory. Vagrant can
attempt to automatically correct this issue by running:
vagrant plugin repair
If Vagrant was recently updated, this error may be due to incompatible
versions of dependencies. To fix this problem please remove and re-install
all plugins. Vagrant can attempt to do this automatically by running:
vagrant plugin expunge --reinstall
Or you may want to try updating the installed plugins to their latest
versions:
vagrant plugin update
Error message given during initialization: Unable to resolve dependency: user requested 'vagrant-libvirt (= 0.0.45)'
いわれるとおり、リペアするか。
[guest@centos8 vagrantcentos7]$ vagrant plugin repair
==> vagrant: A new version of Vagrant is available: 2.2.9 (installed version: 2.2.7)!
==> vagrant: To upgrade visit: https://www.vagrantup.com/downloads.html
Repairing currently installed global plugins. This may take a few minutes...
Fetching: formatador-0.2.5.gem (100%)
あら、落としてくるのか。
あきらめた。
以上