儲存庫 vbox 的更動 94217
- 時間撮記:
- 2022-3-14 上午08:56:53 (3 年 以前)
- svn:sync-xref-src-repo-rev:
- 150473
- 位置:
- trunk
- 檔案:
-
- 修改 8 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/doc/manual/Config.kmk
r94213 r94217 65 65 man_VBoxManage-adoptstate.xml \ 66 66 man_VBoxManage-closemedium.xml \ 67 man_VBoxManage-storageattach.xml \ 67 68 man_VBoxManage-storagectl.xml \ 68 69 man_VBoxManage-bandwidthctl.xml \ -
trunk/doc/manual/en_US/man_VBoxManage-storageattach.xml
r93713 r94217 32 32 <refname>VBoxManage-storageattach</refname> 33 33 <refpurpose>attach, remove, and modify storage media used by a virtual machine</refpurpose> 34 <refclass> Oracle VM VirtualBox</refclass>34 <refclass>&product-name;</refclass> 35 35 </refnamediv> 36 36 -
trunk/doc/manual/en_US/user_VBoxManage.xml
r94213 r94217 345 345 <xi:include href="user_man_VBoxManage-closemedium.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" /> 346 346 347 <sect1 id="vboxmanage-storageattach"> 348 349 <title>VBoxManage storageattach</title> 350 351 <para> 352 This command attaches, modifies, and removes a storage medium 353 connected to a storage controller that was previously added with 354 the <command>storagectl</command> command. The syntax is as 355 follows: 356 </para> 357 358 <screen>VBoxManage storageattach <uuid|vmname> 359 --storagectl <name> 360 [--port <number>] 361 [--device <number>] 362 [--type dvddrive|hdd|fdd] 363 [--medium none|emptydrive|additions| 364 <uuid>|<filename>|host:<drive>|iscsi] 365 [--mtype normal|writethrough|immutable|shareable 366 readonly|multiattach] 367 [--comment <text>] 368 [--setuuid <uuid>] 369 [--setparentuuid <uuid>] 370 [--passthrough on|off] 371 [--tempeject on|off] 372 [--nonrotational on|off] 373 [--discard on|off] 374 [--hotpluggable on|off] 375 [--bandwidthgroup name|none] 376 [--forceunmount] 377 [--server <name>|<ip>] 378 [--target <target>] 379 [--tport <port>] 380 [--lun <lun>] 381 [--encodedlun <lun>] 382 [--username <username>] 383 [--password <password>] 384 [--passwordfile <file>] 385 [--initiator <initiator>] 386 [--intnet]</screen> 387 388 <para> 389 A number of parameters are commonly required. Some parameters are 390 required only for iSCSI targets. 391 </para> 392 393 <para> 394 The common parameters are as follows: 395 </para> 396 397 <variablelist> 398 399 <varlistentry> 400 <term> 401 <computeroutput>uuid|vmname</computeroutput> 402 </term> 403 404 <listitem> 405 <para> 406 The VM UUID or VM Name. Mandatory. 407 </para> 408 </listitem> 409 </varlistentry> 410 411 <varlistentry> 412 <term> 413 <computeroutput>--storagectl</computeroutput> 414 </term> 415 416 <listitem> 417 <para> 418 Name of the storage controller. Mandatory. The list of the 419 storage controllers currently attached to a VM can be 420 obtained with <command>VBoxManage showvminfo</command>. See 421 <xref linkend="vboxmanage-showvminfo" />. 422 </para> 423 </listitem> 424 </varlistentry> 425 426 <varlistentry> 427 <term> 428 <computeroutput>--port</computeroutput> 429 </term> 430 431 <listitem> 432 <para> 433 The number of the storage controller's port which is to be 434 modified. Mandatory, unless the storage controller has only 435 a single port. 436 </para> 437 </listitem> 438 </varlistentry> 439 440 <varlistentry> 441 <term> 442 <computeroutput>--device</computeroutput> 443 </term> 444 445 <listitem> 446 <para> 447 The number of the port's device which is to be modified. 448 Mandatory, unless the storage controller has only a single 449 device per port. 450 </para> 451 </listitem> 452 </varlistentry> 453 454 <varlistentry> 455 <term> 456 <computeroutput>--type</computeroutput> 457 </term> 458 459 <listitem> 460 <para> 461 Define the type of the drive to which the medium is being 462 attached, detached, or modified. This argument can only be 463 omitted if the type of medium can be determined from either 464 the medium given with the 465 <computeroutput>--medium</computeroutput> argument or from a 466 previous medium attachment. 467 </para> 468 </listitem> 469 </varlistentry> 470 471 <varlistentry> 472 <term> 473 <computeroutput>--medium</computeroutput> 474 </term> 475 476 <listitem> 477 <para> 478 Specifies what is to be attached. The following values are 479 supported: 480 </para> 481 482 <itemizedlist> 483 484 <listitem> 485 <para> 486 <computeroutput>none</computeroutput>: Any existing 487 device should be removed from the given slot. 488 </para> 489 </listitem> 490 491 <listitem> 492 <para> 493 <computeroutput>emptydrive</computeroutput>: For a 494 virtual DVD or floppy drive only, this makes the device 495 slot behave like a removeable drive into which no media 496 has been inserted. 497 </para> 498 </listitem> 499 500 <listitem> 501 <para> 502 <computeroutput>additions</computeroutput>: For a 503 virtual DVD drive only, this attaches the 504 <emphasis>VirtualBox Guest Additions</emphasis> image to 505 the given device slot. 506 </para> 507 </listitem> 508 509 <listitem> 510 <para> 511 If a UUID is specified, it must be the UUID of a storage 512 medium that is already known to &product-name;. For 513 example, because it has been attached to another virtual 514 machine. See <xref linkend="vboxmanage-list" /> for 515 details of how to list known media. This medium is then 516 attached to the given device slot. 517 </para> 518 </listitem> 519 520 <listitem> 521 <para> 522 If a filename is specified, it must be the full path of 523 an existing disk image in ISO, RAW, VDI, VMDK, or other 524 format. The disk image is then attached to the given 525 device slot. 526 </para> 527 </listitem> 528 529 <listitem> 530 <para> 531 <computeroutput>host:<drive></computeroutput>: For 532 a virtual DVD or floppy drive only, this connects the 533 given device slot to the specified DVD or floppy drive 534 on the host computer. 535 </para> 536 </listitem> 537 538 <listitem> 539 <para> 540 <computeroutput>iscsi</computeroutput>: For virtual hard 541 disks only, this is used for specifying an iSCSI target. 542 In this case, additional parameters must be given. These 543 are described below. 544 </para> 545 </listitem> 546 547 </itemizedlist> 548 549 <para> 550 Some of the above changes, in particular for removeable 551 media such as floppies and CDs/DVDs, can be effected while a 552 VM is running. Others, such as device changes or changes in 553 hard disk device slots, require the VM to be powered off. 554 </para> 555 </listitem> 556 </varlistentry> 557 558 <varlistentry> 559 <term> 560 <computeroutput>--mtype</computeroutput> 561 </term> 562 563 <listitem> 564 <para> 565 Defines how this medium behaves with respect to snapshots 566 and write operations. See <xref linkend="hdimagewrites" />. 567 </para> 568 </listitem> 569 </varlistentry> 570 571 <varlistentry> 572 <term> 573 <computeroutput>--comment</computeroutput> 574 </term> 575 576 <listitem> 577 <para> 578 An optional description that you want to have stored with 579 this medium. For example, for an iSCSI target, "Big storage 580 server downstairs". This is purely descriptive and not 581 needed for the medium to function correctly. 582 </para> 583 </listitem> 584 </varlistentry> 585 586 <varlistentry> 587 <term> 588 <computeroutput>--setuuid, --setparentuuid</computeroutput> 589 </term> 590 591 <listitem> 592 <para> 593 Modifies the UUID or parent UUID of a medium before 594 attaching it to a VM. This is an expert option. 595 Inappropriate use can make the medium unusable or lead to 596 broken VM configurations if any other VM is referring to the 597 same media already. The most frequently used variant is 598 <computeroutput>--setuuid ""</computeroutput>, which assigns 599 a new random UUID to an image. This option is useful for 600 resolving duplicate UUID errors if you duplicated an image 601 using a file copy utility. 602 </para> 603 </listitem> 604 </varlistentry> 605 606 <varlistentry> 607 <term> 608 <computeroutput>--passthrough</computeroutput> 609 </term> 610 611 <listitem> 612 <para> 613 For a virtual DVD drive only, you can enable DVD writing 614 support. This feature is currently experimental, see 615 <xref 616 linkend="storage-cds" />. 617 </para> 618 </listitem> 619 </varlistentry> 620 621 <varlistentry> 622 <term> 623 <computeroutput>--tempeject</computeroutput> 624 </term> 625 626 <listitem> 627 <para> 628 For a virtual DVD drive only, you can configure the behavior 629 for guest-triggered medium eject. If this is set to on, the 630 eject has only a temporary effect. If the VM is powered off 631 and restarted the originally configured medium will be still 632 in the drive. 633 </para> 634 </listitem> 635 </varlistentry> 636 637 <varlistentry> 638 <term> 639 <computeroutput>--nonrotational</computeroutput> 640 </term> 641 642 <listitem> 643 <para> 644 Enables you to enable the non-rotational flag for virtual 645 hard disks. Some guests, such as Windows 7 or later, treat 646 such disks like SSDs and do not perform disk fragmentation 647 on such media. 648 </para> 649 </listitem> 650 </varlistentry> 651 652 <varlistentry> 653 <term> 654 <computeroutput>--discard</computeroutput> 655 </term> 656 657 <listitem> 658 <para> 659 Enables the auto-discard feature for a virtual hard disks. 660 This specifies that a VDI image will be shrunk in response 661 to the trim command from the guest OS. The following 662 requirements must be met: 663 </para> 664 665 <itemizedlist> 666 667 <listitem> 668 <para> 669 The disk format must be VDI. 670 </para> 671 </listitem> 672 673 <listitem> 674 <para> 675 The size of the cleared area must be at least 1 MB. 676 </para> 677 </listitem> 678 679 <listitem> 680 <para> 681 &product-name; will only trim whole 1 MB blocks. The 682 VDIs themselves are organized into 1 MB blocks, so this 683 will only work if the space being trimmed is at least a 684 1 MB contiguous block at a 1 MB boundary. On Windows, 685 occasional defragmentation with <command>defrag.exe 686 /D</command>, or on Linux running <command>btrfs 687 filesystem defrag</command> as a background cron job may 688 be beneficial. 689 </para> 690 </listitem> 691 692 </itemizedlist> 693 694 <note> 695 <para> 696 The Guest OS must be configured to issue the 697 <command>trim</command> command, and typically this means 698 that the guest OS is made to see the disk as an SSD. Ext4 699 supports the -o discard mount flag. Mac OS X probably 700 requires additional settings. Windows should automatically 701 detect and support SSDs, at least in versions 7, 8, and 702 10. The Linux exFAT driver from Samsung supports the 703 <command>trim</command> command. 704 </para> 705 </note> 706 707 <para> 708 It is unclear whether Microsoft's implementation of exFAT 709 supports this feature, even though that file system was 710 originally designed for flash. 711 </para> 712 713 <para> 714 Alternatively, there are other methods to issue trim. For 715 example, the Linux <command>fstrim</command> command, part 716 of the util-linux package. Earlier solutions required a user 717 to zero out unused areas, using zerofree or similar, and to 718 compact the disk. This is only possible when the VM is 719 offline. 720 </para> 721 </listitem> 722 </varlistentry> 723 724 <varlistentry> 725 <term> 726 <computeroutput>--bandwidthgroup</computeroutput> 727 </term> 728 729 <listitem> 730 <para> 731 Sets the bandwidth group to use for the given device. See 732 <xref linkend="storage-bandwidth-limit" />. 733 </para> 734 </listitem> 735 </varlistentry> 736 737 <varlistentry> 738 <term> 739 <computeroutput>--forceunmount</computeroutput> 740 </term> 741 742 <listitem> 743 <para> 744 For a virtual DVD or floppy drive only, this forcibly 745 unmounts the DVD/CD/Floppy or mounts a new DVD/CD/Floppy 746 even if the previous one is locked down by the guest for 747 reading. See <xref linkend="storage-cds" />. 748 </para> 749 </listitem> 750 </varlistentry> 751 752 </variablelist> 753 754 <para> 755 When <computeroutput>iscsi</computeroutput> is used with the 756 <computeroutput>--medium</computeroutput> parameter for iSCSI 757 support, additional parameters must or can be used. See also 758 <xref linkend="storage-iscsi" />. 759 </para> 760 761 <variablelist> 762 763 <varlistentry> 764 <term> 765 <computeroutput>--server</computeroutput> 766 </term> 767 768 <listitem> 769 <para> 770 The host name or IP address of the iSCSI target. Required. 771 </para> 772 </listitem> 773 </varlistentry> 774 775 <varlistentry> 776 <term> 777 <computeroutput>--target</computeroutput> 778 </term> 779 780 <listitem> 781 <para> 782 Target name string. This is determined by the iSCSI target 783 and used to identify the storage resource. Required. 784 </para> 785 </listitem> 786 </varlistentry> 787 788 <varlistentry> 789 <term> 790 <computeroutput>--tport</computeroutput> 791 </term> 792 793 <listitem> 794 <para> 795 TCP/IP port number of the iSCSI service on the target. 796 Optional. 797 </para> 798 </listitem> 799 </varlistentry> 800 801 <varlistentry> 802 <term> 803 <computeroutput>--lun</computeroutput> 804 </term> 805 806 <listitem> 807 <para> 808 Logical Unit Number of the target resource. Optional. Often, 809 this value is zero. 810 </para> 811 </listitem> 812 </varlistentry> 813 814 <varlistentry> 815 <term> 816 <computeroutput>--encodedlun</computeroutput> 817 </term> 818 819 <listitem> 820 <para> 821 Hex-encoded Logical Unit Number of the target resource. 822 Optional. Often, this value is zero. 823 </para> 824 </listitem> 825 </varlistentry> 826 827 <varlistentry> 828 <term> 829 <computeroutput>--username, --password, 830 --passwordfile</computeroutput> 831 </term> 832 833 <listitem> 834 <para> 835 Username and password, called the initiator secret, for 836 target authentication, if required. Optional. 837 </para> 838 839 <note> 840 <para> 841 Username and password are stored without encryption, in 842 clear text, in the XML machine configuration file if no 843 settings password is provided. When a settings password is 844 specified for the first time, the password is stored in 845 encrypted form. As an alternative to providing the 846 password on the command line, a reference to a file 847 containing the text can be provided using the 848 <computeroutput>passwordfile</computeroutput> option. 849 </para> 850 </note> 851 </listitem> 852 </varlistentry> 853 854 <varlistentry> 855 <term> 856 <computeroutput>--initiator</computeroutput> 857 </term> 858 859 <listitem> 860 <para> 861 iSCSI Initiator. Optional. 862 </para> 863 864 <para> 865 Microsoft iSCSI Initiator is a system, such as a server that 866 attaches to an IP network and initiates requests and 867 receives responses from an iSCSI target. The SAN components 868 in Microsoft iSCSI Initiator are largely analogous to Fibre 869 Channel SAN components, and they include the following: 870 </para> 871 872 <itemizedlist> 873 874 <listitem> 875 <para> 876 To transport blocks of iSCSI commands over the IP 877 network, an iSCSI driver must be installed on the iSCSI 878 host. An iSCSI driver is included with Microsoft iSCSI 879 Initiator. 880 </para> 881 </listitem> 882 883 <listitem> 884 <para> 885 A gigabit Ethernet adapter that transmits 1000 megabits 886 per second (Mbps) is recommended for the connection to 887 an iSCSI target. Like standard 10/100 adapters, most 888 gigabit adapters use a preexisting Category 5 or 889 Category 6E cable. Each port on the adapter is 890 identified by a unique IP address. 891 </para> 892 </listitem> 893 894 <listitem> 895 <para> 896 An iSCSI target is any device that receives iSCSI 897 commands. The device can be an end node, such as a 898 storage device, or it can be an intermediate device, 899 such as a network bridge between IP and Fibre Channel 900 devices. Each port on the storage array controller or 901 network bridge is identified by one or more IP addresses 902 </para> 903 </listitem> 904 905 </itemizedlist> 906 </listitem> 907 </varlistentry> 908 909 <varlistentry> 910 <term> 911 <computeroutput>--intnet</computeroutput> 912 </term> 913 914 <listitem> 915 <para> 916 If specified, connect to the iSCSI target using Internal 917 Networking. This needs further configuration, see 918 <xref linkend="iscsi-intnet" />. 919 </para> 920 </listitem> 921 </varlistentry> 922 923 </variablelist> 924 925 </sect1> 347 <xi:include href="user_man_VBoxManage-storageattach.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" /> 926 348 927 349 <xi:include href="user_man_VBoxManage-storagectl.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" /> -
trunk/doc/manual/ru_RU/man_VBoxManage-storageattach.xml
r93713 r94217 20 20 <refentry id="vboxmanage-storageattach" lang="en"> 21 21 <refentryinfo> 22 <pubdate> August 2019</pubdate>22 <pubdate>$Date$</pubdate> 23 23 <title>VBoxManage storageattach</title> 24 24 </refentryinfo> … … 32 32 <refname>VBoxManage-storageattach</refname> 33 33 <refpurpose>подключение, удаление и изменение носителей, используемых виртуальной машиной</refpurpose> 34 <refclass> Oracle VM VirtualBox</refclass>34 <refclass>&product-name;</refclass> 35 35 </refnamediv> 36 36 -
trunk/src/VBox/Frontends/VBoxManage/VBoxManage.cpp
r94213 r94217 220 220 { "snapshot", USAGE_S_NEWCMD, HELP_CMD_SNAPSHOT, handleSnapshot, 0 }, 221 221 { "closemedium", USAGE_S_NEWCMD, HELP_CMD_CLOSEMEDIUM, handleCloseMedium, 0 }, 222 { "storageattach", USAGE_S TORAGEATTACH, VBMG_CMD_TODO, handleStorageAttach, 0 },222 { "storageattach", USAGE_S_NEWCMD,HELP_CMD_STORAGEATTACH, handleStorageAttach, 0 }, 223 223 { "storagectl", USAGE_S_NEWCMD, HELP_CMD_STORAGECTL, handleStorageController, 0 }, 224 224 { "showmediuminfo", USAGE_S_NEWCMD,HELP_CMD_SHOWMEDIUMINFO, handleShowMediumInfo, 0 }, -
trunk/src/VBox/Frontends/VBoxManage/VBoxManage.h
r94213 r94217 112 112 USAGE_I_CONVERTHD, 113 113 USAGE_I_DUMPHDINFO, 114 USAGE_STORAGEATTACH,115 114 USAGE_I_DEBUGLOG, 116 115 USAGE_I_SETHDPARENTUUID, -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp
r94213 r94217 594 594 #define SEP pcszSep1, pcszSep2 595 595 596 if (enmCommand == USAGE_STORAGEATTACH || enmCommand == USAGE_S_ALL)597 RTStrmPrintf(pStrm,598 "%s storageattach %s <uuid|vmname>\n"599 " --storagectl <name>\n"600 " [--port <number>]\n"601 " [--device <number>]\n"602 " [--type dvddrive|hdd|fdd]\n"603 " [--medium none|emptydrive|additions|\n"604 " <uuid|filename>|host:<drive>|iscsi]\n"605 " [--mtype normal|writethrough|immutable|shareable|\n"606 " readonly|multiattach]\n"607 " [--comment <text>]\n"608 " [--setuuid <uuid>]\n"609 " [--setparentuuid <uuid>]\n"610 " [--passthrough on|off]\n"611 " [--tempeject on|off]\n"612 " [--nonrotational on|off]\n"613 " [--discard on|off]\n"614 " [--hotpluggable on|off]\n"615 " [--bandwidthgroup <name>]\n"616 " [--forceunmount]\n"617 " [--server <name>|<ip>]\n"618 " [--target <target>]\n"619 " [--tport <port>]\n"620 " [--lun <lun>]\n"621 " [--encodedlun <lun>]\n"622 " [--username <username>]\n"623 " [--password <password>]\n"624 " [--passwordfile <file>]\n"625 " [--initiator <initiator>]\n"626 " [--intnet]\n"627 "\n", SEP);628 629 596 if (enmCommand == USAGE_MODIFYMEDIUM || enmCommand == USAGE_S_ALL) 630 597 RTStrmPrintf(pStrm, -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageStorageController.cpp
r94179 r94217 316 316 default: 317 317 { 318 errorGetOpt( USAGE_STORAGEATTACH,c, &ValueUnion);318 errorGetOpt(c, &ValueUnion); 319 319 rc = E_FAIL; 320 320 break; … … 327 327 328 328 if (!pszCtl) 329 return errorSyntax( USAGE_STORAGEATTACH,Storage::tr("Storage controller name not specified"));329 return errorSyntax(Storage::tr("Storage controller name not specified")); 330 330 331 331 /* get the virtualbox system properties */ … … 370 370 port = 0; 371 371 else 372 return errorSyntax( USAGE_STORAGEATTACH,Storage::tr("Port not specified"));372 return errorSyntax(Storage::tr("Port not specified")); 373 373 } 374 374 if (device == ~0U) … … 377 377 device = 0; 378 378 else 379 return errorSyntax( USAGE_STORAGEATTACH,Storage::tr("Device not specified"));379 return errorSyntax(Storage::tr("Device not specified")); 380 380 } 381 381
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器