免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 9873 | 回复: 6
打印 上一主题 下一主题

[KVM] kvm虚拟机启动时间很长 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2014-04-25 03:22 |只看该作者 |倒序浏览
本帖最后由 jackysc01 于 2014-04-25 03:27 编辑

kvm里我装的是rhel5.8... 启动时间长达6分钟   
dmesg信息如下
qemu-kvm版本是qemu-kvm 2.0.0~rc1+dfsg-0ubuntu3

Linux version 2.6.18-308.el5 (mockbuild@x86-007.build.bos.redhat.com) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-50)) #1 SMP Fri Jan 27 17:17:51 EST 2012
Command line: ro root=/dev/VolGroup00/LogVol00 rhgb quiet time apiccalibrationdiff=10000 divider=10
BIOS-provided physical RAM map:
BIOS-e820: 0000000000010000 - 000000000009fc00 (usable)
BIOS-e820: 000000000009fc00 - 00000000000a0000 (reserved)
BIOS-e820: 00000000000f0000 - 0000000000100000 (reserved)
BIOS-e820: 0000000000100000 - 000000003fffe000 (usable)
BIOS-e820: 000000003fffe000 - 0000000040000000 (reserved)
BIOS-e820: 00000000feffc000 - 00000000ff000000 (reserved)
BIOS-e820: 00000000fffc0000 - 0000000100000000 (reserved)
DMI 2.4 present.
DMI: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011
kvm-clock: cpu 0, msr 7eff:804a7401, boot clock
ACPI: RSDP (v000 BOCHS                                 ) @ 0x00000000000f09c0
ACPI: RSDT (v001 BOCHS  BXPCRSDT 0x00000001 BXPC 0x00000001) @ 0x000000003ffffbbe
ACPI: FADT (v001 BOCHS  BXPCFACP 0x00000001 BXPC 0x00000001) @ 0x000000003ffff1c5
ACPI: SSDT (v001 BOCHS  BXPCSSDT 0x00000001 BXPC 0x00000001) @ 0x000000003ffff239
ACPI: MADT (v001 BOCHS  BXPCAPIC 0x00000001 BXPC 0x00000001) @ 0x000000003ffffb0e
ACPI: HPET (v001 BOCHS  BXPCHPET 0x00000001 BXPC 0x00000001) @ 0x000000003ffffb86
ACPI: DSDT (v001 BOCHS  BXPCDSDT 0x00000001 BXPC 0x00000001) @ 0x0000000000000000
No NUMA configuration found
Faking a node at 0000000000000000-000000003fffe000
Bootmem setup node 0 0000000000000000-000000003fffe000
bootmap start 19000 pages 8
Memory for crash kernel (0x0 to 0x0) notwithin permissible range
disabling kdump
Setting up node 0 0-3fffe
On node 0 totalpages: 256944
  DMA zone: 2425 pages, LIFO batch:0
  DMA32 zone: 254519 pages, LIFO batch:31
ACPI: PM-Timer IO Port: 0xb008
ACPI: Local APIC address 0xfee00000
ACPI: LAPIC (acpi_id[0x00] lapic_id[0x00] enabled)
Processor #0 7:7 APIC version 20
ACPI: LAPIC_NMI (acpi_id[0xff] dfl dfl lint[0x1])
ACPI: IOAPIC (id[0x00] address[0xfec00000] gsi_base[0])
IOAPIC[0]: apic_id 0, version 17, address 0xfec00000, GSI 0-23
ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)qemu-kvm 2.0.0~rc1+dfsg-0ubuntu3
ACPI: INT_SRC_OVR (bus 0 bus_irq 5 global_irq 5 high level)
ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)
ACPI: INT_SRC_OVR (bus 0 bus_irq 10 global_irq 10 high level)
ACPI: INT_SRC_OVR (bus 0 bus_irq 11 global_irq 11 high level)
ACPI: IRQ0 used by override.
ACPI: IRQ2 used by override.
ACPI: IRQ5 used by override.
ACPI: IRQ9 used by override.
ACPI: IRQ10 used by override.
ACPI: IRQ11 used by override.
Setting APIC routing to physical flat
ACPI: HPET id: 0x8086a201 base: 0xfed00000
Using ACPI (MADT) for SMP configuration information
Nosave address range: 000000000009f000 - 00000000000a0000
Nosave address range: 00000000000a0000 - 00000000000f0000
Nosave address range: 00000000000f0000 - 0000000000100000
Allocating PCI resources starting at 50000000 (gap: 40000000:beffc000)
SMP: Allowing 1 CPUs, 0 hotplug CPUs
kvm-clock: cpu 0, msr 0:1735401, primary cpu clock
Built 1 zonelists.  Total pages: 256944
Kernel command line: ro root=/dev/VolGroup00/LogVol00 rhgb quiet time apiccalibrationdiff=10000 divider=10
[    0.000000] Initializing CPU#0
[    0.000000] PID hash table entries: 4096 (order: 12, 32768 bytes)
[    0.000000] Using TSC for driving interrupts
[  318.225952] Console: colour VGA+ 80x25
[  318.228184] Dentry cache hash table entries: 131072 (order: 8, 1048576 bytes)
[  318.228870] Inode-cache hash table entries: 65536 (order: 7, 524288 bytes)
[  318.228948] Checking aperture...
[  318.229124] ACPI: DMAR not present
[  318.238445] Memory: 1022448k/1048568k available (2616k kernel code, 25668k reserved, 1672k data, 224k init)
[  318.238654] Calibrating delay loop (skipped), value calculated using timer frequency.. 5053.93 BogoMIPS (lpj=252696
[  318.238725] Security Framework v1.0.0 initialized
[  318.238735] SELinux:  Initializing.
[  318.238759] SELinux:  Starting in permissive mode
[  318.238767] selinux_register_security:  Registering secondary module capability
[  318.238769] Capability LSM initialized as secondary
[  318.238800] Mount-cache hash table entries: 256
[  318.239076] CPU: L1 I cache: 32K, L1 D cache: 32K
[  318.239078] CPU: L2 cache: 4096K
[  318.239223] SMP alternatives: switching to UP code
[  318.239663] Freeing SMP alternatives: 32k freed
[  318.239669] ACPI: Core revision 20060707
[  318.342745] Using local APIC timer interrupts.
[  318.382385] WARNING calibrate_APIC_clock: the APIC timer calibration may be wrong.
[  318.382896] Detected 62.499 MHz APIC timer.
[  318.391897] Brought up 1 CPUs
[  318.392075] time.c: Using 100.000000 MHz WALL KVM GTOD KVM timer.
[  318.392077] time.c: Detected 2526.968 MHz processor.
[  318.392078] sizeof(vma)=176 bytes
[  318.392079] sizeof(page)=56 bytes
[  318.392080] sizeof(inode)=560 bytes
[  318.392081] sizeof(dentry)=216 bytes
[  318.392082] sizeof(ext3inode)=760 bytes
[  318.392083] sizeof(buffer_head)=96 bytes
[  318.392084] sizeof(skbuff)=248 bytes
[  318.392351] checking if image is initramfs... it is
[  318.597394] Freeing initrd memory: 3430k freed
[  318.599148] NET: Registered protocol family 16
[  318.599199] ACPI: bus type pci registered
[  318.599295] PCI: Using configuration type 1
[  318.601637] ACPI: Interpreter enabled
[  318.601640] ACPI: Using IOAPIC for interrupt routing
[  318.601915] ACPI: No dock devices found.
[  318.602080] ACPI: PCI Root Bridge [PCI0] (0000:00)
[  318.607584] PCI quirk: region b000-b03f claimed by PIIX4 ACPI
[  318.607605] PCI quirk: region b100-b10f claimed by PIIX4 SMB
[  318.617522] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT]
[  318.622444] ACPI: PCI Interrupt Link [LNKA] (IRQs 5 *10 11)
[  318.622741] ACPI: PCI Interrupt Link [LNKB] (IRQs 5 *10 11)
[  318.623021] ACPI: PCI Interrupt Link [LNKC] (IRQs 5 10 *11)
[  318.623306] ACPI: PCI Interrupt Link [LNKD] (IRQs 5 10 *11)
[  318.623455] ACPI: PCI Interrupt Link [LNKS] (IRQs *9)
[  318.623613] Linux Plug and Play Support v0.97 (c) Adam Belay
[  318.623629] pnp: PnP ACPI init
[  318.624596] pnp: PnP ACPI: found 6 devices
[  318.624705] usbcore: registered new driver usbfs
[  318.624740] usbcore: registered new driver hub
[  318.624797] PCI: Using ACPI for IRQ routing
[  318.624798] PCI: If a device doesn't work, try "pci=routeirq".  If it helps, post a report
[  318.625120] NetLabel: Initializing
[  318.625121] NetLabel:  domain hash size = 128
[  318.625122] NetLabel:  protocols = UNLABELED CIPSOv4
[  318.625135] NetLabel:  unlabeled traffic allowed by default
[  318.625177] hpet0: at MMIO 0xfed00000 (virtual 0xffffffffff5fe000), IRQs 2, 8, 0
[  318.625180] hpet0: 3 64-bit timers, 100000000 Hz
[  318.626263] ACPI: DMAR not present
[  318.626273] PCI-GART: No AMD northbridge found.
[  318.626590] NET: Registered protocol family 2
[  318.692247] IP route cache hash table entries: 32768 (order: 6, 262144 bytes)
[  318.692493] TCP established hash table entries: 131072 (order: 9, 2097152 bytes)
[  318.693502] TCP bind hash table entries: 65536 (order: 8, 1048576 bytes)
[  318.694788] TCP: Hash tables configured (established 131072 bind 65536)
[  318.694791] TCP reno registered
[  318.696450] audit: initializing netlink socket (disabled)
[  318.696470] type=2000 audit(1398366782.479:1): initialized
[  318.696745] Total HugeTLB memory allocated, 0
[  318.696833] VFS: Disk quotas dquot_6.5.1
[  318.696848] Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[  318.696963] SELinux:  Registering netfilter hooks
[  318.751694] Initializing Cryptographic API
[  318.751719] alg: No test for crc32c (crc32c-generic)
[  318.751720] ksign: Installing public key data
[  318.751725] Loading keyring
[  318.751739] - Added public key 2D3142B3E704051
[  318.751741] - User ID: Red Hat, Inc. (Kernel Module GPG key)
[  318.751745] io scheduler noop registered
[  318.751767] io scheduler anticipatory registered
[  318.751774] io scheduler deadline registered
[  318.751788] io scheduler cfq registered (default)
[  318.751795] Limiting direct PCI/PCI transfers.
[  318.751835] PCI: PIIX3: Enabling Passive Release on 0000:00:01.0
[  318.753094] Activating ISA DMA hang workarounds.
[  318.753420] Boot video device is 0000:00:02.0
[  318.755226] pci_hotplug: PCI Hot Plug PCI Core version: 0.5
[  318.758485] Real Time Clock Driver v1.12ac
[  318.758542] hpet_resources: 0xfed00000 is busy
[  318.758587] Non-volatile memory driver v1.2
[  318.758589] Linux agpgart interface v0.101 (c) Dave Jones
[  318.758656] Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing enabled
[  318.759531] brd: module loaded
[  318.759639] Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
[  318.759641] ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
[  318.759672] PIIX3: IDE controller at PCI slot 0000:00:01.1
[  318.759745] PIIX3: chipset revision 0
[  318.759747] PIIX3: not 100% native mode: will probe irqs later
[  318.760376] PCI: Setting latency timer of device 0000:00:01.1 to 64
[  318.760408]     ide0: BM-DMA at 0xc0a0-0xc0a7, BIOS settings: hda:pio, hdb:pio
[  318.760467]     ide1: BM-DMA at 0xc0a8-0xc0af, BIOS settings: hdc:pio, hdd:pio
[  318.760487] Probing IDE interface ide0...
[  319.361328] Probing IDE interface ide1...
[  320.131377] hdc: QEMU DVD-ROM, ATAPI CD/DVD-ROM drive
[  320.860962] ide1 at 0x170-0x177,0x376 on irq 15
[  320.861649] Probing IDE interface ide0...
[  321.470441] ide-floppy driver 0.99.newide
[  321.470710] usbcore: registered new driver hiddev
[  321.470790] usbcore: registered new driver usbhid
[  321.470795] drivers/usb/input/hid-core.c: v2.6:USB HID core driver
[  321.470947] PNP: PS/2 Controller [PNP0303:KBD,PNP0f13:MOU] at 0x60,0x64 irq 1,12
[  321.473367] serio: i8042 KBD port at 0x60,0x64 irq 1
[  321.473378] serio: i8042 AUX port at 0x60,0x64 irq 12
[  321.473514] mice: PS/2 mouse device common for all mice
[  321.473556] md: md driver 0.90.3 MAX_MD_DEVS=256, MD_SB_DISKS=27
[  321.473561] md: bitmap version 4.39
[  321.473698] TCP bic registered
[  321.473701] Initializing IPsec netlink socket
[  321.473731] NET: Registered protocol family 1
[  321.473743] NET: Registered protocol family 17
[  321.475413] input: AT Translated Set 2 keyboard as /class/input/input0
[  321.475532] ACPI: (supports S3 S4 S5)
[  321.475825] Initalizing network drop monitor service
[  321.475870] Freeing unused kernel memory: 224k freed
[  321.476230] Write protecting the kernel read-only data: 530k
[  321.682098] input: ImExPS/2 Generic Explorer Mouse as /class/input/input1
[  321.771311] ohci_hcd: 2005 April 22 USB 1.1 'Open' Host Controller (OHCI) Driver (PCI)
[  321.775351] USB Universal Host Controller Interface driver v3.0
[  321.775801] ACPI: PCI Interrupt Link [LNKD] enabled at IRQ 11
[  321.775833] ACPI: PCI Interrupt 0000:00:01.2[D] -> Link [LNKD] -> GSI 11 (level, high) -> IRQ 11
[  321.775878] PCI: Setting latency timer of device 0000:00:01.2 to 64
[  321.775896] uhci_hcd 0000:00:01.2: UHCI Host Controller
[  321.775957] uhci_hcd 0000:00:01.2: new USB bus registered, assigned bus number 1
[  321.776115] uhci_hcd 0000:00:01.2: irq 11, io base 0x0000c040
[  321.776290] usb usb1: configuration #1 chosen from 1 choice
[  321.776309] hub 1-0:1.0: USB hub found
[  321.776315] hub 1-0:1.0: 2 ports detected
[  321.908075] ACPI: PCI Interrupt Link [LNKC] enabled at IRQ 10
[  321.908101] ACPI: PCI Interrupt 0000:00:03.0[A] -> Link [LNKC] -> GSI 10 (level, high) -> IRQ 10
[  321.908477] ACPI: PCI Interrupt Link [LNKA] enabled at IRQ 10
[  321.908479] ACPI: PCI Interrupt 0000:00:05.0[A] -> Link [LNKA] -> GSI 10 (level, high) -> IRQ 10
[  321.909460] ACPI: PCI Interrupt Link [LNKB] enabled at IRQ 11
[  321.909462] ACPI: PCI Interrupt 0000:00:06.0[A] -> Link [LNKB] -> GSI 11 (level, high) -> IRQ 11
[  321.913641]  vda: vda1 vda2 vda3
[  321.928850] SCSI subsystem initialized
[  321.944783] libata version 3.00 loaded.
[  321.955531] device-mapper: uevent: version 1.0.3
[  321.955574] device-mapper: ioctl: 4.11.6-ioctl (2011-02-1 initialised: dm-devel@redhat.com
[  321.987245] device-mapper: dm-raid45: initialized v0.2594l
[  342.195044] kjournald starting.  Commit interval 5 seconds
[  342.195053] EXT3-fs: mounted filesystem with ordered data mode.
[  342.242605] SELinux:  Disabled at runtime.
[  342.242607] SELinux:  Unregistering netfilter hooks
[  342.308315] type=1404 audit(1398366806.109:2): selinux=0 auid=4294967295 ses=4294967295
[  343.874897] hdc: ATAPI 4X DVD-ROM drive, 512kB Cache, (U)DMA
[  343.874903] Uniform CD-ROM driver Revision: 3.20
[  344.148568] piix4_smbus 0000:00:01.3: Found 0000:00:01.3 device
[  344.266725] input: PC Speaker as /class/input/input2
[  346.339069] FDC 0 is a S82078B
[  346.386714] lp: driver loaded but no devices found
[  346.760408] NET: Registered protocol family 10
[  346.760503] lo: Disabled Privacy Extensions
[  346.760595] IPv6 over IPv4 tunneling driver
[  346.760641] sit0: Disabled Privacy Extensions
[  346.923599] mtrr: type mismatch for fc000000,100000 old: uncachable new: write-combining
[  346.931978] mtrr: type mismatch for fc000000,400000 old: uncachable new: write-combining
[  351.955862] ACPI: Power Button (FF) [PWRF]
[  351.969137] ACPI: Mapper loaded
[  351.975320] dell-wmi: No known WMI GUID found
[  352.219171] md: Autodetecting RAID arrays.
[  352.219173] md: autorun ...
[  352.219174] md: ... autorun DONE.
[  352.269251] device-mapper: multipath: version 1.0.6 loaded
[  352.464453] EXT3 FS on dm-0, internal journal
[  352.514436] kjournald starting.  Commit interval 5 seconds
[  352.514750] EXT3 FS on vda1, internal journal
[  352.514755] EXT3-fs: mounted filesystem with ordered data mode.
[  352.789185] Adding 3148732k swap on /dev/vda2.  Priority:-1 extents:1 across:3148732k
[  352.980552] IA-32 Microcode Update Driver: v1.14a <tigran@veritas.com>
[  353.307940] Loading iSCSI transport class v2.0-871.
[  353.338581] 802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>
[  353.338585] All bugs added by David S. Miller <davem@redhat.com>
[  353.364577] libcxgbi:libcxgbi_init_module: tag itt 0x1fff, 13 bits, age 0xf, 4 bits.
[  353.364580] libcxgbi:ddp_setup_host_page_size: system PAGE 4096, ddp idx 0.
[  353.373062] Chelsio T3 iSCSI Driver cxgb3i v2.0.0 (Jun. 2010)
[  353.381434] iscsi: registered transport (cxgb3i)
[  353.406270] cnic: Broadcom NetXtreme II CNIC Driver cnic v2.5.7 (July 20, 2011)
[  353.418587] Broadcom NetXtreme II iSCSI Driver bnx2i v2.7.0.3 (Aug 04, 2011)
[  353.427854] iscsi: registered transport (bnx2i)
[  353.451604] iscsi: registered transport (tcp)
[  353.546967] iscsi: registered transport (iser)
[  353.577933] iscsi: registered transport (be2iscsi)
[  360.559185] Bluetooth: Core ver 2.10
[  360.559236] NET: Registered protocol family 31
[  360.559237] Bluetooth: HCI device and connection manager initialized
[  360.559240] Bluetooth: HCI socket layer initialized
[  360.611310] Bluetooth: L2CAP ver 2.8
[  360.611313] Bluetooth: L2CAP socket layer initialized
[  360.649534] Bluetooth: RFCOMM socket layer initialized
[  360.649556] Bluetooth: RFCOMM TTY layer initialized
[  360.649557] Bluetooth: RFCOMM ver 1.8
[  362.963362] Bluetooth: HIDP (Human Interface Emulation) ver 1.1
[  365.285257] eth0: no IPv6 routers present
[  368.598483] mtrr: type mismatch for fc000000,100000 old: uncachable new: write-combining
[  368.603279] mtrr: type mismatch for fc000000,400000 old: uncachable new: write-combining


因为看不太动所以特来求助- -

论坛徽章:
1
摩羯座
日期:2014-08-04 14:50:06
2 [报告]
发表于 2014-04-25 09:22 |只看该作者
是不是没有带-enable-kvm参数,没有开启硬件虚拟化。

论坛徽章:
0
3 [报告]
发表于 2014-04-25 10:53 |只看该作者
回复 2# kifast


    开了  是用virt-manager创建的虚拟机 虚拟机开机完毕后速度很快

论坛徽章:
1
摩羯座
日期:2014-08-04 14:50:06
4 [报告]
发表于 2014-04-25 14:35 |只看该作者
回复 3# jackysc01


    提供信息太少,自己去多做排除性的分析,看是不是host机io不够,尝试把镜像文件放入内存,看是不是变得很快。
看guest机启动时,停在哪个阶段比较久,看是不是guest系统问题。
虚拟化性能问题,无非是cpu、io、mem、net这些资源虚拟化的问题。
多做排除,定位到具体问题点,再解决。

论坛徽章:
0
5 [报告]
发表于 2014-04-25 15:27 |只看该作者
回复 4# kifast


    不是Host机的问题  而是qemu的版本太新了   之后换用centos5.10就没这个问题
    看起来是因为rhel5.8的内核版本太旧的缘故

论坛徽章:
6
CU大牛徽章
日期:2013-05-20 10:43:41IT运维版块每日发帖之星
日期:2016-07-29 06:20:00IT运维版块每日发帖之星
日期:2016-01-27 06:20:00CU大牛徽章
日期:2013-05-20 10:44:16CU大牛徽章
日期:2013-05-20 10:44:0615-16赛季CBA联赛之广东
日期:2018-03-09 11:17:08
6 [报告]
发表于 2014-04-25 23:13 |只看该作者
我之前也弄了好久kvm 发现安装个ubuntu server超级慢(近1个小时,在pc上比较快用virtualbox,10g内存,双核),但是启动还是挺快的   用的是dell的服务器48g内存,8核cpu

论坛徽章:
0
7 [报告]
发表于 2014-04-29 10:17 |只看该作者
我还是建议你改用virtualbox吧,同时也兼容VM的镜像,所以你切换过去也不用重装系统,启动非常快,并且暂停和恢复相当快,不到20秒就完成了。VM启动过程会非常卡,启动之后感觉机器很吃力,我是I3的处理器。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP