Virt-install Examples: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 6: Line 6:


==Text-Based Anaconda Guest Installation==
==Text-Based Anaconda Guest Installation==
Mount the ISO image under /mnt/dvd:


<pre>
<pre>
virt-install --name testvm-01 --memory 1024 --os-type=linux --os-variant=rhel7.3 --location /mnt/RHEL7DVD --graphics none \
mount -o loop /root/archive/rhel-server-7.3-x86_64-dvd.iso /mnt/dvd
</pre>
 
<pre>
virt-install --name testvm-01 --memory 1024 --vcpus 2 --os-type=linux --os-variant=rhel7.3 \
--location /mnt/dvd --extra-args="console=tty0 console=ttyS0,115200n8" --disk=/root/archive/rhel-server-7.3-x86_64-dvd.iso,device=cdrom \
--disk=/main-storage-pool/testvm-01.img,size=4 \
--disk=/main-storage-pool/testvm-01.img,size=4 \
--extra-args="console=tty0 console=ttyS0,115200n8"
--graphics none
</pre>
</pre>


==NAT==
==NAT==

Revision as of 02:24, 27 June 2017

Internal

Examples

Text-Based Anaconda Guest Installation

Mount the ISO image under /mnt/dvd:

mount -o loop /root/archive/rhel-server-7.3-x86_64-dvd.iso /mnt/dvd
virt-install --name testvm-01 --memory 1024 --vcpus 2 --os-type=linux --os-variant=rhel7.3 \
--location /mnt/dvd --extra-args="console=tty0 console=ttyS0,115200n8" --disk=/root/archive/rhel-server-7.3-x86_64-dvd.iso,device=cdrom \
--disk=/main-storage-pool/testvm-01.img,size=4 \
--graphics none

NAT

TO TEST:

NAT:

virt-install --network=default --name=rhel7-machine --ram=756 --vcpus=4 --os-type=linux --os-variant=rhel7

External DHCP server:

virt-install --network=br0 \ --name=rhel7-machine --ram=756 --vcpus=4 \ --os-type=linux --os-variant=rhel7


Static IPV4 Address:

virt-install \ --network=br0 \
--name=rhel7-machine --ram=756 --vcpus=4 \ --os-type=linux --os-variant=rhel7 \ --extra-args="ip=192.168.1.2::192.168.1.1:255.255.255.0:test.example.com:eth0:n one

The arguments of the --extra-args parameter specify the static network setting, using the following structure:

ip=[ip]::[gateway]:[netmask]:[hostname]:[interface]:[autoconf]