Article Title: common parameters of the qemu-kvm command line virtual system. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
For example, to install a Windows 7 system, common parameters are as follows:
Qemu-kvm-m 1024-localtime-M pc-smp 1-drive file = Windows7_x86.img, cache = writeback, boot = on-net nic, macaddr = 52: 54: 00: 12: 34: 80-net tap-cdrom Windows7.iso-boot d-name kvm-win7, process = kvm-win7-vnc: 2-usb-usbdevice tablet
-M 1024: Set the virtual system memory to 1024 MB.
-Localtime: Make the virtual system consistent with the host system time
-M pc: the virtual system type is pc.
-Smp: 1 CPU
-Drive file = Windows7_x86.img, cache = writeback, boot = on
Hard Disk option. The virtual disk is Windows7_x86.img, And the cache mode is writeback.
-Net nic, macaddr = 52: 54: 00: 12: 34: 80 nic option, manually specify the mac address.
-Net tap type network, equivalent to "Bridge Mode"
-Cdrom windows 7.iso Optical Drive
-Boot d startup sequence. D Represents the optical drive.
-Name kvm-win7, process = kvm-win7 name the Virtual Machine for easy identification
-Vnc: 2 here is the control window through vnc connection, and here is the port 5902. Available client IP: 2 connection.
-Usb device tablet enables the tablet function on the usb device. Enable this function to synchronize the mouse inside and outside the VM.
In addition, after the disk and network card are installed with a semi-virtualization driver, you can add if = virtio in-drive to use the disk semi-virtualization, add model = virtio to-net nic to use the semi-virtualization driver of the nic.
For example, to install a Windows 7 system, common parameters are as follows:
Qemu-kvm-m 1024-localtime-M pc-smp 1-drive file = Windows7_x86.img, cache = writeback, boot = on-net nic, macaddr = 52: 54: 00: 12: 34: 80-net tap-cdrom Windows7.iso-boot d-name kvm-win7, process = kvm-win7-vnc: 2-usb-usbdevice tablet
-M 1024: Set the virtual system memory to 1024 MB.
-Localtime: Make the virtual system consistent with the host system time
-M pc: the virtual system type is pc.
-Smp: 1 CPU
-Drive file = Windows7_x86.img, cache = writeback, boot = on
Hard Disk option. The virtual disk is Windows7_x86.img, And the cache mode is writeback.
-Net nic, macaddr = 52: 54: 00: 12: 34: 80 nic option, manually specify the mac address.
-Net tap type network, equivalent to "Bridge Mode"
-Cdrom windows 7.iso Optical Drive
-Boot d startup sequence. D Represents the optical drive.
-Name kvm-win7, process = kvm-win7 name the Virtual Machine for easy identification
-Vnc: 2 here is the control window through vnc connection, and here is the port 5902. Available client IP: 2 connection.
-Usb device tablet enables the tablet function on the usb device. Enable this function to synchronize the mouse inside and outside the VM.
In addition, after the disk and network card are installed with a semi-virtualization driver, you can add if = virtio in-drive to use the disk semi-virtualization, add model = virtio to-net nic to use the semi-virtualization driver of the nic.