- 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.
推薦閱讀
- Extending Jenkins
- Visual Basic .NET程序設計(第3版)
- Mastering ServiceStack
- 華為HMS生態與應用開發實戰
- C語言程序設計同步訓練與上機指導(第三版)
- Instant Debian:Build a Web Server
- App Inventor少兒趣味編程動手做
- 零基礎看圖學ScratchJr:少兒趣味編程(全彩大字版)
- 數據科學中的實用統計學(第2版)
- Python面試通關寶典
- Serverless工程實踐:從入門到進階
- Visual FoxPro數據庫程序設計
- Instant JRebel
- Image Processing with ImageJ(Second Edition)
- 計算機教學研究與實踐:2017學術年會論文集