Thursday, December 20, 2018

QEMU to start Linux on Windows


"If you're serious about security, Qubes OS is the best OS available today. It's what I use, and free." 

Edward Snowden, whistleblower and privacy advocate



MORE TIPS>

https://www.qemu.org/download/#windows

https://www.mobatek.net/labs.html


Qemu Installation comes with some handy HTML documentation check if you have that, if not you can look for an online version at the Qemu official website.
as for the way to boot from a live CD ISO image this is the command syntax:
qemu -boot d -cdrom <your-iso-image.iso> -m <ram>
notice the <ram> parameter is used to tell qemu how much memory to dedicate to your guest system from the host System.
If you wish to use create a hard disk image and associate it with the qemu VM as well (useful when formatting the VM using the ISO) you can execute these two commands:
  1. First, create the hard disk image:
    qemu-img create <disk-image-name.img>
Pass in the your desired disk image name, and the size you want to allocate for it.
  1. Now we can use both Iso and Disk image to boot:
    qemu -boot d -cdrom <iso-image.iso> -m -hda <disk-image.img>
That would be it.

qemu-img create -f qcow2 /var/lib/libvirt/images/disk1.img 10G

qemu-img info /var/lib/libvirt/images/disk1.img

https://www.ibm.com/support/knowledgecenter/linuxonibm/com.ibm.linux.z.ldva/ldva_r_qemu-imgCommand.html



https://en.wikibooks.org/wiki/QEMU/Images

rem-------------key set of commands----------------------------
cd \
cd c:\Program Files (x86)\qemu
path c:\Program Files (x86)\qemu
dir q*
qemu-img create -f qcow2 hddhack.img 3G
qemu-system-x86_64 -m 800 -hda hddhack.img -cdrom d:\hack.iso -boot d
rem-------------------------------------------------------------------



  • This example creates a qcow2 image with a maximum size of 10GB:
    # qemu-img create -f qcow2 /var/lib/libvirt/images/disk1.img 10G
    Formatting '/var/lib/libvirt/images/disk1.img', fmt=qcow2
    size=10737418240 encryption=off cluster_size=65536
    lazy_refcounts=off
    Format specific information:
    compat: 1.1
    lazy refcounts: false
    refcount bits: 16
    corrupt: false
  • This example displays attributes of a qcow2 image:
    # qemu-img info /var/lib/libvirt/images/disk1.img
    image: /var/lib/libvirt/images/disk1.img
    file format: qcow2
    virtual size: 10G (10737418240 bytes)
    disk size: 136K
    cluster_size: 65536
  • This example increases the size of a qcow2 image:
    # qemu-img resize /var/lib/libvirt/images/disk1.img 20G
    Image resized.
    
    # qemu-img info /var/lib/libvirt/images/disk1.img      
    image: /var/lib/libvirt/images/disk1.img
    file format: qcow2
    virtual size: 20G (21474836480 bytes)
    disk size: 140K
    cluster_size: 65536
  • This example creates a RAW image with a maximum size of 10GB:
    # qemu-img create -f raw /var/lib/libvirt/images/disk1.img 10G
    Formatting '/var/lib/libvirt/images/disk1.img', fmt=raw 
    size=10737418240
  • This example displays attributes of a RAW image:
    # qemu-img info /var/lib/libvirt/images/disk1.img
    image: /var/lib/libvirt/images/disk1.img
    file format: raw
    virtual size: 10G (10737418240 bytes)
    disk size: 0
  • This example increases the size of a RAW image:
    # qemu-img resize -f raw /var/lib/libvirt/images/disk1.img 20G        
    Image resized.
    
    # qemu-img info /var/lib/libvirt/images/disk1.img      
    image: /var/lib/libvirt/images/disk1.img
    file format: raw
    virtual size: 20G (21474836480 bytes)
    disk size: 0

No comments:

Post a Comment

Коментар: