QEMU的官网:【 http://wiki.qemu.org/Main_Page 】
QEMU默认是不支持Windows的,这里笔记一个Windows版本的下载地址:【 http://qemu.weilnetz.de/ 】
QEMU安装完成之后,记得更新下Path路径,方便后续使用。如下图:
这里简单的笔记下两个QEMU的命令,方便后续使用。
CONTENTS
qemu-system-XXXXX.exe:
该命令主要是启动一个特定类型的虚拟机,我们这里可以简单的尝试下,如下图:
默认【CTRL + ALT + G】切换主宿机操作。
帮助文档
这里以qemu-system-x86_64.exe为例,看下帮助。
输入qemu-system-x86_64.exe -h 可以看到各种输入参数,这里简单起见,只笔记需要使用的,其他的用到时再增补吧。
Block device options: -fda/-fdb file use 'file' as floppy disk 0/1 image -hda/-hdb file use 'file' as IDE hard disk 0/1 image #使用文件模拟硬盘设备 -hdc/-hdd file use 'file' as IDE hard disk 2/3 image 。。。。。。。 。。。。。。。 Linux/Multiboot boot specific: -kernel bzImage use 'bzImage' as kernel image #自定义Linux Kernel -append cmdline use 'cmdline' as kernel command line #自定义Linux启动参数 -initrd file use 'file' as initial ram disk -dtb file use 'file' as device tree image
qemu-img.exe:
该命令主要是用来生成一个QMEU可用的模拟文件,用来模拟硬盘。
输入qemu-img.exe -h 可以看到各种输入参数,这里简单起见,只笔记需要使用的,其他的用到时再增补吧。
qemu-img.exe create -f qcow2 vmdisk1 8G #创建一个qcow2的虚拟文件,名称为vmdisk1,大小为8G qemu-img.exe create -f qcow2 -b rootfs.ext2 vmdisk1 8G #以rootfs.ext2为模板创建一个qcow2的虚拟文件,名称为vmdisk1,大小为8G
发表评论