1virt-install(1M) System Administration Commands virt-install(1M)
2
3
4
6 virt-install - install guest operating system on xVM system
7
9 /usr/bin/virt-install [options]
10
11
13 The virt-install program enables you to install a guest operating sys‐
14 tem on a machine running Solaris xVM.
15
16
17 virt-install allows you to enter information about a guest as a set of
18 command-line options that enable you to specify the following:
19
20 o Name of your guest domain. This name serves as the label of
21 the guest operating system and will be the name of the file
22 that stores the guest's configuration. For network-based
23 installs, the name of the domain must match its real host‐
24 name.
25
26 o Amount of RAM to be allocated to the guest, in MB. Solaris
27 domains should use 512MB minimum.
28
29 o Path to the disk image of the guest. This path is exported
30 as an entire disk to your guest. It is on the xVM control
31 domain and can be to a physical disk, a flat file, or any
32 device that provides a block device interface; for example,
33 a ZFS volume or a Solaris Volume Manager volume.
34
35 o If the path specified in the preceding bullet does not
36 already exist, the size, in GB, of the virtual disk for your
37 guest.
38
39 o You must choose whether to enable graphics support for the
40 domain. Note that paravirtualized Solaris domains do not
41 currently support a graphical console in this manner.
42
43 o URI for the location of the installation software. This can
44 be an NFS path, or the path to a local directory or ISO.
45 Some operating systems do not yet support ISO installs. Some
46 operating systems require that the install host be fully
47 qualified (for example, my.nfs.server.com) for the install
48 to work. Examples of acceptable installation paths are:
49
50 nfs:my.nfs.server.com:/home/install/test/tree
51 /export/solarisdvd.iso
52
53
54
55
56 After entering required information, installation starts. If you
57 enabled graphics, a Virtual Network Computing (VNC) window opens and
58 presents the graphical installer. If graphics are not enabled, the text
59 installer is displayed.
60
61
62 You can connect to the graphical console by finding the correct display
63 with the command:
64
65 % virsh vncdisplay dom-name
66
67
68
69
70 ...and then running:
71
72 % vncviewer localhost:d
73
74
75
76
77 ...where d is the display returned by the preceding virsh vncdisplay
78 command.
79
80
81 Autoconfiguration data (see the --autocf option, below) is presented to
82 the guest as a floppy device. For Solaris, this can be a UFS or PCFS
83 file system image containing sysidcfg(4) and Jumpstart profile data.
84
85
86 To run virt-install, you must become superuser or assume the Primary
87 Administrator role.
88
90 The following options are supported:
91
92 --autocf=location
93
94 Specifies location of autoconfiguration data for the guest.
95
96 For fully virtualized guests installing from an ISO file or DVD,
97 location specifies the pathname of a disk image to be presented to
98 the guest as the floppy device fda. The following is the path to a
99 local filename containing a floppy image:
100
101 /path/to/guest/autocf.img
102
103
104 This option is ignored for fully virtualized guests installing over
105 a network using PXE. Such a guest will retrieve any autoconfigura‐
106 tion data over the network. For paravirtualized guests, support for
107 this option is guest-specific.
108
109 For Solaris paravirtualized guests installing over NFS, this option
110 allows you to specify the NFS pathname to a directory containing a
111 sysidcfg(4) file along with a Solaris Jumpstart profile. The fol‐
112 lowing is the path to a NFS directory containing Solaris autocon‐
113 figuration data:
114
115 nfs:netinstall:/export/guests/guest.autocf
116
117
118 For OpenSolaris paravirtualized guests installing using an OpenSo‐
119 laris AI (Automated Installer) server using the opensolaris os-
120 variant flag, specify a set of comma-separated name/value pairs
121 used by AI. These are:
122
123 install_service=[install_service_name]
124 install_media=[HTTP server containing AI image]
125
126
127 At present, only install_service is required. install_media can be
128 used to override the install_media path specified in the --location
129 option (see below). Additional name/value pairs can be appended
130 should the AI server require them.
131
132 At such time as the OpenSolaris AI supports the ability of clients
133 to self-discover the AI install service, an empty string should be
134 used for install_service to indicate an AI install is desired.
135
136 For fully virtualized guests (HVM domains), use the --pxe argument
137 to perform AI installs.
138
139 See EXAMPLES for an example of the use of the OpenSolaris AI.
140
141
142 -b bridge, --bridge=bridge
143
144 Bridge to which to connect the network interface. If you do not
145 specify a bridge, the system attempts to determine the default.
146 This should be the name of the interface in the control domain
147 through which to route the domain's networking traffic, for exam‐
148 ple, bge0. This option is obsolete. Use the -w/--network option,
149 instead.
150
151
152 -c cdrom, --cdrom=cdrom
153
154 File to use as a virtual CD-ROM device for fully virtualized
155 guests. This option works with HVM domains and is ignored with par‐
156 avirtualized domains. It can be path to an ISO image, or to a CD-
157 ROM device. It can also be a URL from which to fetch or access a
158 minimal boot ISO image. The URLs take the same format as described
159 for the --location argument. If this option is omitted then either
160 the --location argument must be entered, to specify a location for
161 the kernel and initrd, or the --pxe option used, to install from
162 the network.
163
164
165 --check-cpu
166
167 Check that VCPUs do not exceed physical CPUs and warn if they do.
168
169
170 --connect=URI
171
172 Connect to hypervisor at URI.
173
174
175 --cpuset=cpuset
176
177 Specify which physical CPUs the guest can use. cpuset is a comma-
178 separated list of numbers, which can be specified in ranges. For
179 example:
180
181 0,2,3,5 Use processors 0, 2, 3, and 5
182
183
184 1-3,5,6-8 Use processors 1, 2, 3, 5, 6, 7, and 8
185
186
187
188 -d, --debug
189
190 Display debugging information. The debugging information is stored
191 in $HOME/.virtinst/virt-install.log, even if this option is omit‐
192 ted. In this path, $HOME is the home directory of the user invoking
193 virt-install, such as / or /root.
194
195
196 --disk path=... [options]
197
198 Specify a disk to attach to the guest domain. This is a comma-sepa‐
199 rated list of options, which must start with the path argument. For
200 example:
201
202 --disk path=/guest/root.img,sparse=true
203
204
205 The available argument and options are:
206
207 path=...
208
209 Path to the file, disk partition, or logical volume to use as
210 the backing store for the guest's virtual disk.
211
212
213 perms=ro
214
215 The disk should be read-only.
216
217
218 device=disk|cdrom|floppy
219
220 The disk should be presented as a normal hard disk, CD-ROM, or
221 floppy disk.
222
223
224 size=...
225
226 Size of the disk in Gb, if it does not yet exist.
227
228
229 sparse=true|false
230
231 Where appropriate, mark the disk as sparse or fully-allocated.
232
233
234
235 -f pathname, --file=pathname
236
237 Path to the file, disk partition, or logical volume to use as the
238 backing store for the guest's virtual disk. If the path does not
239 exist, then --file-size option should also be specified, allowing
240 the disk to be created.
241
242
243 -h, --help
244
245 Display list of virt-install options.
246
247
248 --import
249
250 Skip the OS installation process, and build a guest around an
251 existing disk image. The device used for booting is the first
252 device specified by means of the --disk or --file options.
253
254
255 -k keymap, --keymap=keymap
256
257 Request that the virtual console be configured to run with a non-
258 English keyboard layout.
259
260
261 -l location, --location=location
262
263 Installation source for paravirtualized guest. Fully virtualized
264 guests must use either --location to specify a kernel and initrd or
265 the --cdrom option to specify an ISO/CDROM image. The location
266 argument can take the forms, nfs:host:/path, or a file system path
267 in the control domain, as described above.
268
269
270 --livecd
271
272 Treat the CD-ROM media as a live CD.
273
274
275 -m mac_addr, --mac=mac_addr
276
277 Specifies a fixed MAC address for the guest. If this parameter is
278 omitted, or the value random is specified, a suitable address will
279 be randomly generated. For xVM virtual machines it is required that
280 the first 3 pairs in the MAC address be the sequence 00:16:3e. This
281 option could be used when performing PXE or NFS-based installations
282 of Solaris guests. This option is obsolete. Use the -w/--network
283 option, instead.
284
285
286 -n name, --name=name
287
288 Name of the new guest virtual machine instance. This must be unique
289 among all guests known to the hypervisor on this machine, including
290 those not currently active.
291
292
293 --noacpi
294
295 Disables Advanced Configuration and Power Interface (ACPI) for
296 fully virtualized guest. Overrides configuration setting stored in
297 systems specified by --os-type and --os-variant options.
298
299
300 --noapic
301
302 Disables Advanced Programmable Interrupt Controller (APIC) for
303 fully virtualized guest. Overrides configuration setting stored in
304 systems specified by --os-type and --os-variant options.
305
306
307 --noautoconsole
308
309 Do not automatically try to connect to the guest console. The
310 default behavior is to launch a VNC client to display the graphical
311 console, or to run the virsh console command to display the text
312 console. Use of this option disables this behavior.
313
314 Use of this option should be combined with the --wait option, as
315 described below.
316
317
318 --nodisks
319
320 Request a virtual machine without any local disk storage, typically
321 used for running "Live CD" images or installing to network storage
322 (iSCSI or NFS root). This disables all interactive prompts for disk
323 setup.
324
325
326 --nographics
327
328 Disable all interactive prompts for the guest virtual console. No
329 graphical console will be allocated for the guest. A text-based
330 console will always be available on the first serial port (or
331 equivalent paravirtualised console device).
332
333
334 --nonetworks
335
336 Do not create network interfaces for the guest.
337
338
339 --nonsparse
340
341 Request creation of a non-sparse file for the guest virtual disk.
342 Note that use of this option causes guest creation to be signifi‐
343 cantly slower than otherwise.
344
345
346 --noreboot
347
348 Do not automatically reboot the guest domain after the first stage
349 of installation.
350
351
352 --os-type=os_type
353
354 Optimize the guest configuration for a type of operating system.
355 This option attempts to pick the most suitable ACPI and APIC set‐
356 tings, select optimally supported mouse drivers, and generally
357 accommodate other operating system peculiarities. See "OS Types and
358 OS Variants", below for a list of acceptable values.
359
360 For optimal guest operating system performance, you should specify
361 the --os-type and --os-variant options.
362
363
364 --os-variant=os_variant
365
366 The OS variant for fully virtualized guests. See "OS Types and OS
367 Variants", below for a list of acceptable values.
368
369 For optimal guest operating system performance, you should specify
370 the --os-type and --os-variant options.
371
372
373 -p, --paravirt
374
375 Indicates that guest is paravirtualized. If the host supports both
376 paravirtualization and full virtualization, and neither this param‐
377 eter nor the --hvm option are specified, this will be prompted for
378 interactively.
379
380
381 --pxe
382
383 Use the PXE boot protocol to load the initial ramdisk and kernel
384 for starting the guest installation process. If this option is
385 omitted, then either the --location or --cdrom options must be
386 entered, to specify a location for the kernel and initrd.
387
388
389 -r mem_amount, --ram=mem_amount
390
391 Memory to allocate for guest instance, in megabytes.
392
393
394 -s filesize, --file-size=filesize
395
396 Size of the file to create for the guest virtual disk, if the path
397 specified with the --file does not already exist. The filesize is
398 specified in gigabytes, with fractional numbers allowed. The stor‐
399 age for the file will not be pre-allocated unless the --nonsparse
400 option is also specified.
401
402
403 --sdl
404
405 Use Simple DirectMedia Layer (SDL) for graphics support. This
406 option works with some guest domains, including HVM, but not with
407 Solaris.
408
409
410 --sound
411
412 Use sound device emulation. Does not work on Solars xVM.
413
414
415 -u UUID, --uuid=UUID
416
417 Specifies UUID, as a 32-digit hexadecimal number, for the guest. if
418 no UUID is specified, the system generates a random UUID. If you
419 enter a UUID, keep in mind that it is intended to be a globally
420 unique value.
421
422
423 -v, --hvm
424
425 Specifies that the guest is a Hardware-assisted Virtual Machine
426 (HVM). Requests the use of full virtualization, if both paravirtu‐
427 alization and full virtualization are available on the host. This
428 parameter might not be available if connecting to a hypervisor on a
429 machine without hardware virtualization support.
430
431 This guest should be fully virtualized.
432
433
434 --vcpus=vcpus
435
436 Number of Virtual (VCPUs) to configure for your guest.
437
438
439 --vnc
440
441 Use Virtual Network Computing (VNC) for graphics support. This
442 option works with HVM domains but not with paravirtualized domains.
443 Unless the --vncport parameter is also provided, the VNC server
444 will run on the first free port number at 5900 or above. The actual
445 VNC display allocated can be obtained using the vncdisplay subcom‐
446 mand to virsh(1M).
447
448
449 --vncport=vncport
450
451 Request a permanent, statically assigned port number for the guest
452 VNC console. Use of this option is discouraged as another guest
453 might automatically choose to run on the specified port, creating a
454 conflict.
455
456
457 -w property_list, --network=property_list
458
459 Describes a virtual interface by means of a list of property-value
460 pairs, each pair separated by a comma. Supported properties are:
461
462 bridge=bridge
463
464 Bridge to which to connect the virtual interface. If you do not
465 specify a bridge, the system attempts to determine the default.
466 This should be the name of the interface in the control domain
467 through which to route the domain's networking traffic, for
468 example, bge0. This property makes the -b/--bridge option obso‐
469 lete.
470
471
472 mac=mac_addr
473
474 Specifies a fixed MAC address for the guest. If this parameter
475 is omitted, or the value RANDOM is specified, a suitable
476 address will be randomly generated. For Solaris xVM virtual
477 machines it is required that the first three pairs in the MAC
478 address be the sequence 00:16:3e. This property is required
479 when performing PXE or NFS-based installations of Solaris
480 guests. This property makes the -m/--mac option obsolete.
481
482
483 capped-bandwidth=bandwidth
484
485 Sets bandwidth of this interface. Bandwidth should be specified
486 as an integer with one of the scale suffixes (K, M, or G for
487 Kbps, Mbps, or Gbps, respectively). Bandwidth will be rounded
488 up to 1.2M, if the input is smaller than that figure.
489
490
491 vlanid=vid
492
493 Sets VLAN ID of this interface to vid.
494
495 If this option is omitted, a single NIC will be created in the
496 guest. If there is a bridge device in the host with a physical
497 interface enslaved, this interface will be used for connectivity.
498 This option can be specified multiple times to setup more than one
499 NIC. Do not mix it with any one of the -b/--bridge and -m/--mac
500 options.
501
502
503 --wait=num_minutes
504
505 If a VNC viewer could not be launched for a graphical installation,
506 and the guest is a Windows domain, virt-install waits indefinitely
507 for the guest to finish installation.
508
509 For the domain to correctly reboot during install, virt-install
510 must stay running until installation is complete. This happens by
511 default when virt-install connects to the console. If the --noauto‐
512 console option is used, or you need to disconnect from the console,
513 use this option to keep virt-install running. A value of -1 will
514 wait indefinitely. A value of 0 will exit immediately (and thus
515 implies --noautoconsole).
516
517 It is recommended that scripts use:
518
519 --wait=-1 --noautoconsole
520
521
522 ...as needed.
523
524
525 -x extra_args, --extra-args=extra_args
526
527 When installing paravirtualized guests, specifies additional argu‐
528 ments to pass to the installer.
529
530
531 OS Types and OS Variants
532 The following are the valid OS type and OS variant values for --os-type
533 and --os-variant options described above.
534
535 os-type os-variant
536 ------- ----------
537 linux (Linux 2.x series)
538 rhel2.1
539 rhel3
540 rhel4
541 rhel5
542 fedora5
543 fedora6
544 fedora7
545 fedora8
546 fedora9
547 fedora10
548 fedora11
549 ubuntuhardy
550 ubuntuintrepid
551 ubuntujaunty
552 sles10
553 debianEtch
554 debianLenny
555 generic24
556 generic26
557
558 windows (Microsoft Windows 9x or later)
559 winxp
560 winxp64
561 win2k
562 win2k3
563 win2k8
564 vista
565
566 unix (Traditional UNIX BSD or SysV derivatives)
567 freebsd6
568 freebsd7
569 openbsd4
570
571 solaris (Solaris 9 or later)
572 solaris9
573 solaris10
574 opensolaris
575
576 other (Not in one of groups above)
577 msdos
578 netware4
579 netware5
580 netware6
581 generic
582
583
584
585
586 For Windows 7, use vista.
587
589 Example 1 Installing Solaris onto a Local Disk from an ISO
590
591
592 The following command installs a paravirtualized Solaris guest from an
593 ISO file.
594
595
596 # virt-install --name solaris2 --ram 1024 --nographics \
597 --file /dev/md/dsk/solaris2-disk \
598 --os-type=solaris os-variant=solaris10 \
599 --location /export/isos/nv75-dvd.iso
600
601
602
603 Example 2 Installing Microsoft Windows
604
605
606 The following command installs a Microsoft Windows guest using a local
607 file as a root disk.
608
609
610 # virt-install --hvm --name windows1 --ram 1024 \
611 --cdrom //en_winxp_pro_with_sp2.iso \
612 --file /guests/windows1-disk --file-size 10 \
613 --os-type=windows os-variant=winxp \
614 --vnc
615
616
617
618 Example 3 Installing Paravirtualized Solaris Guest from an NFS Server
619
620
621 The following command installs a Solaris paravirtualized xVM guest, 500
622 MB of RAM, 6 GB of disk, from an NFS server, in text-only mode:
623
624
625 # virt-install \
626 --paravirt \
627 --name demo \
628 --ram 500 \
629 --file /export/guests/demo/images/demo.img \
630 --file-size 6 \
631 --nographics \
632 --mac=00:16:3e:2f:8a:1a \
633 --os-type=solaris os-variant=opensolaris \
634 --location nfs:netinstall:/export/s10u6/combined.s10x_u6wos/latest \
635 --autocf=nfs:netinstall:/export/guests/demo/autocf
636
637
638
639 Example 4 Installing xVM Guest Using ZFS zvol
640
641
642 The following command installs an xVM guest, using a ZFS zvol, booting
643 from the host CD-ROM, using the VNC server/viewer:
644
645
646 # virt-install \
647 --hvm --name demo \
648 --ram 500 \
649 --file /dev/zvol/dsk/guests/root \
650 --vnc \
651 --hvm \
652 --os-type=solaris os-variant=opensolaris \
653 --autocf=/export/guests/demo/images/autocf.img \
654 --cdrom /dev/dsk/c2t0d0s2
655
656
657
658
659 Example 5 Installing Paravirtualized Guest over HTTP
660
661
662 The following command installs a paravirtualized Fedora guest domain
663 over HTTP using the text installer:
664
665
666 # virt-install -n demo -x 'console=hvc0' --paravirt \
667 -f /dev/zvol/dsk/guests/root \
668 -l http://mirror.cc.vt.edu/pub/fedora/linux/releases/8/Fedora/x86_64/os/ \
669 --os-type=linux os-variant=fedora8 \
670 -r 512 --nographics
671
672
673
674 Example 6 Installing Red Hat Enterprise Linux Guest over NFS
675
676
677 The following sequence of commands installs a Red Hat Enterprise Linux
678 guest over NFS using the text installer:
679
680
681 # mount -F hsfs /rhel.iso /mnt
682 # share -o ro /mnt
683 # virt-install -n pv-rhel -r 1024 -l nfs:mydom0:/mnt \
684 --os-type=linux os-variant=rhel4 \
685 -f /dev/zvol/dsk/pv-rhel.zvol -p --nographics
686
687
688
689 Example 7 Installing with Kickstart Automation
690
691
692 The following command installs a RedHat guest using the media in the
693 dom0 CD-ROM, utilizing kickstart to automate the installation process.
694
695
696 # virt-install \
697 --name rhat \
698 --ram 500 \
699 --file /dev/zvol/dsk/rhat.zvol \
700 --paravirt \
701 --location /dev/dsk/c2t0d0s2 \
702 --os-type=linux os-variant=rhel5 \
703 --extra-args "ks=/export/install/rhat/ks.cfg"
704
705
706
707 Example 8 Installing an HVM Solaris Domain Using Network Boot
708
709
710 The following commands install HVM Solaris domains using network boot
711 (PXE).
712
713
714 # virt-install -n pxe-domu -r 1024 --hvm --mac 00:16:3e:2f:8a:1a \
715 --os-type=solaris --os-variant=opensolaris \
716 -f /dev/zvol/dsk/guests/root \
717 --vnc --pxe --vcpus=4
718
719 # virt-install -n domu-221 -r 1024 --hvm \
720 --mac `~johnlev/bin/maca domu-221` --os-type=solaris \
721 --os-variant=opensolaris -f /iscsi/nevada-hvm --vnc --pxe --vcpus=4
722
723
724
725 Example 9 Installing with OpenSolaris AI
726
727
728 The following command installs an OpenSolaris guest using the
729 x86_install AI install service from a specified install media.
730
731
732 # virt-install --name osol \
733 --location http://10.0.0.1:5555/space/images/osol_111b \
734 --ram 1024 \
735 --file /rpool/guests/osol.raw \
736 --os-variant=opensolaris \
737 --autocf install_service=myservice
738
739
740
741
742 The following command installs an OpenSolaris guest, under conditions
743 in which the guest is able to self-discover its install service:
744
745
746 # virt-install --name osol \
747 --location http://10.0.0.1:5555/space/images/osol_111b \
748 --ram 1024 \
749 --file /rpool/guests/osol.raw \
750 --os-variant=opensolaris \
751 --autocf ""
752
753
754
756 See attributes(5) for descriptions of the following attributes:
757
758
759
760
761 ┌─────────────────────────────┬─────────────────────────────┐
762 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
763 ├─────────────────────────────┼─────────────────────────────┤
764 │Availability │SUNWxvmu │
765 ├─────────────────────────────┼─────────────────────────────┤
766 │Interface Stability │Volatile │
767 └─────────────────────────────┴─────────────────────────────┘
768
770 virsh(1M), virt-clone(1M), xend(1M), xentop(1M), xenstored(1M), xm(1M),
771 sysidcfg(4), attributes(5), xVM(5)
772
773
774
775SunOS 5.11 4 Sep 2009 virt-install(1M)