<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    ivaneeo's blog

    自由的力量,自由的生活。

      BlogJava :: 首頁 :: 聯系 :: 聚合  :: 管理
      669 Posts :: 0 Stories :: 64 Comments :: 0 Trackbacks
    sudo qemu-img create -f qcow2 -o size=30240M,preallocation=metadata win2003_hda.img
    http://blog.kreyolys.com/2011/09/27/kvm-virtual-machines-disk-format-file-basedqcow2-or-block-devicelvm2/---比較
    sudo virt-install \
    --name win2003_test \
    --ram=1024 \
    --vcpus=2 \
    --disk /kvm/win2003_hda.img,bus=virtio \
    --network bridge:br0,model=virtio \
    --vnc \
    --accelerate \
    -c /share/os/win2003-i386.iso \
    --disk /home/kvm/virtio-win-1.1.16.vfd,device=floppy \
    -c /home/kvm/virtio-win-0.1-22.iso \
    --os-type=windows \
    --os-variant=win2k3 \
    --noapic \
    --connect \
    qemu:///system \
    --hvm

    http://www.howtoforge.com/installing-kvm-guests-with-virt-install-on-ubuntu-12.04-lts-server


    半虛擬化參考:
    1. #!/bin/sh
    2. WINISO=/path/to/win7.iso    #Windows ISO
    3. INSTALLDISK=win7virtio.img  #Disk location. Can be LVM LV
    4. VFD=http://alt.fedoraproject.org/pub/alt/virtio-win/latest/images/bin/virtio-win-1.1.16.vfd
    5. DRVRISO=http://alt.fedoraproject.org/pub/alt/virtio-win/latest/images/bin/virtio-win-0.1-22.iso
    6.  
    7. [ -e $(basename $VFD) ]     || wget $VFD
    8. [ -e $(basename $DRVRISO) ] || wget $DRVRISO
    9. [ -e $INSTALLDISK ]         || qemu-img create $INSTALLDISK 30G
    10.  
    11. sudo virt-install -c qemu:///system --virt-type kvm --name win7virtio --ram 1024 --disk path="$INSTALLDISK",bus=virtio \
    12. --disk $(basename $VFD),device=floppy --os-variant win7 --cdrom $(basename $DRVRISO) --cdrom "$WINISO" --vcpus 2
    13. ENDING OF BASH SCRIPT

    其他參考:

     

    In my previous article KVM Guests: Using Virt-Install to Import an Existing Disk Image we discussed how to use virt-install to import an existing disk image, which already has an OS installed into it.  Additionally in KVM Guests: Using Virt-Install to Install Debian and Ubuntu Guests I documented how to initiate an install directly off of the apt mirror of your choice for Debian and Ubuntu Guests using virt-install.  In this article we will use virt-install to create a guest and begin the installation using a CD or ISO image for installation media.

    Assumptions I Have Made

    • My KVM host is Ubuntu 10.10 and I am assuming that yours is as well.  If it is not then the syntax might be slightly different or may not include the same features.
    • That you have kvm installed on the host and you can manually create VMs using virt-manager and they work perfectly.
    • That you have a bridge configured and working on other guests.
    • That you have virt-install and libvirt-bin installed as well as virt-manager or virt-viewer so that you can complete the install after the virt-install command has completed.
    • That you are trying to import disk images that support VirtIO devices (most recent Linux distributions, Windows does not natively support the VirtIO interface, so you will had to have manually installed the VirtIO drivers into your disk image).

    The Basic Command

    # virt-install -n vmname -r 2048 --os-type=linux --os-variant=ubuntu --disk /kvm/images/disk/vmname_boot.img,device=disk,bus=virtio,size=40,sparse=true,format=raw -w bridge=br0,model=virtio --vnc --noautoconsole -c /kvm/images/iso/ubuntu.iso

    Parameters Detailed

    • -n vmname [the name of your VM]
    • -r 2048 [the amount of RAM in MB for your VM]
    • –os-type=linux [the type of OS linux or windows]
    • –os-variant=ubuntu [the distribution or version of Windows for a full list see man virt-install]
    • –disk /kvm/images/disk/vmname_boot.img,device=disk,bus=virtio,size=40,sparse=true,format=raw [this is a long one you define the path, then comma delimited options, device is the type of storage cdrom, disk, floppy, bus is the interface ide, scsi, usb, virtio - virtio is the fastest but you need to install the drivers for Windows and older versions of Linux don't have support]
    • -w bridge=br0,model=virtio [the network configuration, in this case we are connecting to a bridge named br0, and using the virtio drivers which perform much better if you are using an OS which doesn't support virtio you can use e1000 or rtl8139.  You could alternatively use --nonetworks if you do not need networking]
    • –vnc [configures the graphics card to use VNC allowing you to use virt-viewer or virt-manager to see the desktop as if you were at the a monitor of a physical machine]
    • –noautoconsole [configures the installer to NOT automatically try to open virt-viewer to view the console to complete the installation - this is helpful if you are working on a remote system through SSH]
    • -c /kvm/images/iso/ubuntu.iso [this option specifies the cdrom device or iso image with which to boot off of.  You could additionally specify the cdrom device as a disk device, and not use the -c option, it will then boot off of the cdrom if you don't specify another installation method]

    LVM Disk Variation

    # virt-install -n vmname -r 2048 --os-type=linux --os-variant=ubuntulucid  --disk  /dev/vg_name/lv_name,device=disk,bus=virtio  -w bridge=br0,model=virtio --vnc --noautoconsole -c  /kvm/images/iso/ubuntu.iso

    No VirtIO Variation (Uses IDE and e1000 NIC Emulation)

    # virt-install -n vmname -r 2048 --os-type=linux  --os-variant=ubuntulucid --disk  /kvm/images/disk/vmname_boot.img,device=disk,bus=ide,size=40,sparse=true,format=raw  -w bridge=br0,model=e1000 --vnc --noautoconsole -c  /kvm/images/iso/ubuntu.iso

    Define VM Without Installation Method

    # virt-install -n vmname -r 2048 --os-type=linux --os-variant=ubuntulucid --disk /kvm/images/disk/vmname_boot.img,device=disk,bus=virtio,size=40,sparse=true,format=raw --disk /kvm/images/iso/ubuntu.iso,device=cdrom -w bridge=br0,model=virtio --vnc --noautoconsole

     

    posted on 2012-06-08 17:55 ivaneeo 閱讀(855) 評論(0)  編輯  收藏 所屬分類:
    主站蜘蛛池模板: 18禁网站免费无遮挡无码中文| 免费观看AV片在线播放| 热99re久久精品精品免费| 亚洲精品中文字幕无码AV| 中文字幕免费不卡二区 | 亚洲精品宾馆在线精品酒店 | 亚洲国产精品一区二区成人片国内| 亚洲视频在线观看不卡| 免费网站看av片| 无码日韩精品一区二区免费| 亚洲人成电影院在线观看| 亚洲免费在线观看视频| 亚洲同性男gay网站在线观看| 亚洲人成免费网站| 亚洲一区二区三区免费视频| 国产电影午夜成年免费视频 | 亚洲AV无一区二区三区久久| 永久免费A∨片在线观看| 亚洲高清视频在线观看| 成人婷婷网色偷偷亚洲男人的天堂 | 最近免费视频中文字幕大全| 亚洲精品免费在线| 免费可以看黄的视频s色| 亚洲av无码片vr一区二区三区| 亚洲成a人片在线观看久| 日本三级在线观看免费| 久久久久久久亚洲Av无码| 国产香蕉九九久久精品免费| 久久久亚洲精品国产| 国产精品免费网站| 国产成人综合亚洲| 亚洲国产一成人久久精品| 91成人免费观看| 国产成人高清亚洲一区91| 久久亚洲国产精品一区二区| 无码人妻精品中文字幕免费东京热| 亚洲欧美日韩中文字幕一区二区三区 | AV在线播放日韩亚洲欧| 亚洲精品蜜夜内射| 国产午夜亚洲精品理论片不卡 | 亚洲国产成人va在线观看网址|