virt-install to create a new VM instance
2015-09-09 13:32
531 查看
Create a NFS shared in the NFS server:
# mkdir /var/tmp/OEL5
# mount -o loop,ro /var/tmp/Linux.iso /var/tmp/OEL5
# exportfs *:/var/tmp/OEL5
The command to install the VM instance with virt-install command
# virt-install -n VM1 -r 2048 -f /OVS/running_pool/VM1/System.img -s 20 --nographics -l nfs:192.168.200.11:/mnt -d -b xenbr0
# virt-install -n VM1 -r 2048 -f /OVS/running_pool/VM1/System.img -s 20 --nographics -l http:192.168.200.11:/mnt -d -b xenbr0
# virt-install -n VM1 -r 2048 -f /OVS/running_pool/VM1/System.img -s 20 --nographics -l ftp:192.168.200.11:/mnt -d -b xenbr0
The help option of virt-install:
[root@ovs1 log]# virt-install -h
usage: virt-install [options]
options:
-h, --help show this help message and exit
-n NAME, --name=NAME Name of the guest instance
-r MEMORY, --ram=MEMORY
Memory to allocate for guest instance in megabytes
-u UUID, --uuid=UUID UUID for the guest; if none is given a random UUID
will be generated
--vcpus=VCPUS Number of vcpus to configure for your guest
-f DISKFILE, --file=DISKFILE
File to use as the disk image
-s DISKSIZE, --file-size=DISKSIZE
Size of the disk image (if it doesn't exist) in
gigabytes
--nonsparse Don't use sparse files for disks. Note that this will
be significantly slower for guest creation
-m MAC, --mac=MAC Fixed MAC address for the guest; if none or RANDOM is
given a random address will be used
-b BRIDGE, --bridge=BRIDGE
Bridge to connect guest NIC to; if none given, will
try to determine the default
--vnc Use VNC for graphics support
--vncport=VNCPORT Port to use for VNC
--vncpasswd=VNCPASSWD
File with VNC password
--vnclisten=VNCLISTEN
VNC listener IP address
--usbtablet Use tablet config for VNC mouse
--sdl Use SDL for graphics support
--nographics Don't set up a graphical console for the guest.
--noautoconsole Don't automatically try to connect to the guest
console
--keymap=KEYMAP set up keymap for a graphical console
-p, --paravirt This guest should be a paravirtualized guest
-l LOCATION, --location=LOCATION
Installation source for paravirtualized guest (eg,
nfs:host:/path, http://host/path, ftp://host/path)
-x EXTRA, --extra-args=EXTRA
Additional arguments to pass to the installer with
paravirt guests
-d, --debug Print debugging information
# mkdir /var/tmp/OEL5
# mount -o loop,ro /var/tmp/Linux.iso /var/tmp/OEL5
# exportfs *:/var/tmp/OEL5
The command to install the VM instance with virt-install command
# virt-install -n VM1 -r 2048 -f /OVS/running_pool/VM1/System.img -s 20 --nographics -l nfs:192.168.200.11:/mnt -d -b xenbr0
# virt-install -n VM1 -r 2048 -f /OVS/running_pool/VM1/System.img -s 20 --nographics -l http:192.168.200.11:/mnt -d -b xenbr0
# virt-install -n VM1 -r 2048 -f /OVS/running_pool/VM1/System.img -s 20 --nographics -l ftp:192.168.200.11:/mnt -d -b xenbr0
The help option of virt-install:
[root@ovs1 log]# virt-install -h
usage: virt-install [options]
options:
-h, --help show this help message and exit
-n NAME, --name=NAME Name of the guest instance
-r MEMORY, --ram=MEMORY
Memory to allocate for guest instance in megabytes
-u UUID, --uuid=UUID UUID for the guest; if none is given a random UUID
will be generated
--vcpus=VCPUS Number of vcpus to configure for your guest
-f DISKFILE, --file=DISKFILE
File to use as the disk image
-s DISKSIZE, --file-size=DISKSIZE
Size of the disk image (if it doesn't exist) in
gigabytes
--nonsparse Don't use sparse files for disks. Note that this will
be significantly slower for guest creation
-m MAC, --mac=MAC Fixed MAC address for the guest; if none or RANDOM is
given a random address will be used
-b BRIDGE, --bridge=BRIDGE
Bridge to connect guest NIC to; if none given, will
try to determine the default
--vnc Use VNC for graphics support
--vncport=VNCPORT Port to use for VNC
--vncpasswd=VNCPASSWD
File with VNC password
--vnclisten=VNCLISTEN
VNC listener IP address
--usbtablet Use tablet config for VNC mouse
--sdl Use SDL for graphics support
--nographics Don't set up a graphical console for the guest.
--noautoconsole Don't automatically try to connect to the guest
console
--keymap=KEYMAP set up keymap for a graphical console
-p, --paravirt This guest should be a paravirtualized guest
-l LOCATION, --location=LOCATION
Installation source for paravirtualized guest (eg,
nfs:host:/path, http://host/path, ftp://host/path)
-x EXTRA, --extra-args=EXTRA
Additional arguments to pass to the installer with
paravirt guests
-d, --debug Print debugging information
相关文章推荐
- Linux socket 初步
- 10 篇对初学者和专家都有用的 Linux 命令教程
- Linux 与 Windows 对UNICODE 的处理方式
- Ubuntu12.04下QQ完美走起啊!走起啊!有木有啊!
- 解決Linux下Android开发真机调试设备不被识别问题
- 运维入门
- 运维提升
- Linux 自检和 SystemTap
- Ubuntu Linux使用体验
- c语言实现hashmap(转载)
- Linux 信号signal处理机制
- linux下mysql添加用户
- Scientific Linux 5.5 图形安装教程
- 基于 Linux 集群环境上 GPFS 的问题诊断
- 谁是桌面王者?Win PK Linux三大镇山之宝
- vivi下重新调整分区
- Linux VS Unix:Linux欲一统天下 Unix不死
- linux下设定环境变量
- Linux下修改MySQL编码的方法