- KVM Virtualization Cookbook
- Konstantin Ivanov
- 150字
- 2021-07-02 22:07:08
How to do it...
To start a new virtual machine using the qemu-system utility, perform the following steps:
- Start a new QEMU virtual machine using the x86_64 CPU architecture:
root@kvm:~# qemu-system-x86_64 -name debian -vnc 146.20.141.254:0 -cpu Nehalem -m 1024 -drive format=raw,index=2,file=debian.img -daemonize
root@kvm:~#
- Ensure that the instance is running:
root@kvm:~# pgrep -lfa qemu
3527 qemu-system-x86_64 -name debian -vnc 146.20.141.254:0 -m 1024 -drive format=raw,index=2,file=debian.img -daemonize
root@kvm:~#
- Terminate the Debian QEMU instance:
root@kvm:~# pkill qemu
root@kvm:~#
- Start a new QEMU instance using the prebuilt CentOS image:
root@kvm:~# qemu-system-x86_64 -vnc 146.20.141.254:0 -m 1024 -hda CentOS-7-x86_64-GenericCloud.qcow2 -daemonize
root@kvm:~#
- Ensure that the instance is running:
root@kvm:~# pgrep -lfa qemu
3546 qemu-system-x86_64 -vnc 146.20.141.254:0 -m 1024 -hda CentOS-7-x86_64-GenericCloud.qcow2 -daemonize
root@kvm:~#
- Terminate the CentOS QEMU instance:
root@kvm:~# pkill qemu
root@kvm:~#
Make sure to replace the IP address of the -vnc parameter with the one from your host machine.
推薦閱讀
- 現代C++編程:從入門到實踐
- Programming ArcGIS 10.1 with Python Cookbook
- Java從入門到精通(第4版)
- Banana Pi Cookbook
- Easy Web Development with WaveMaker
- Spring+Spring MVC+MyBatis整合開發實戰
- Java:High-Performance Apps with Java 9
- Learning Unity 2D Game Development by Example
- 領域驅動設計:軟件核心復雜性應對之道(修訂版)
- MySQL從入門到精通(軟件開發視頻大講堂)
- CoffeeScript Application Development Cookbook
- 輕松上手2D游戲開發:Unity入門
- 編程改變生活:用Python提升你的能力(進階篇·微課視頻版)
- 從Excel到Python數據分析:Pandas、xlwings、openpyxl、Matplotlib的交互與應用
- 你真的會寫代碼嗎