En VirtualBox podemos gestionar cuatro (4) tarjetas de Red utilizando el interface gráfico, sin embargo, disponemos de un total de ocho (8) tarjetas de Red -emuladas- disponibles.
Para ello, deberemos utilizar los comandos de <VBoxManage> para poder añadir, eliminar, modificar parámetros desde la línea de comandos.
Gestionar la Configuración utilizando VBoxManage
Para poder ver la configuración actual de la máquina virtual utilizaremos la opción <showvminfo _vm_name_>, por ejemplo, suponiendo que nuestra máquina virtual se llame SafeChildren Appliance, haremos:
$ ./VBoxManage showvminfo "SafeChildren Appliance"
Sun VirtualBox Command Line Management Interface Version 3.1.6
(C) 2005-2010 Sun Microsystems, Inc.
All rights reserved.
Name: SafeChildren Appliance
Guest OS: OpenSolaris (64 bit)
UUID: fc59e47f-e83a-49ee-908e-7dcf1e54d4a2
Config file: /Users/itily/Library/VirtualBox/Machines/SafeChildren Appliance/SafeChildren Appliance.xml
Hardware UUID: fc59e47f-e83a-49ee-908e-7dcf1e54d4a2
Memory size: 2048MB
VRAM size: 6MB
Number of CPUs: 2
Synthetic Cpu: off
CPUID overrides: None
Boot menu mode: message and menu
Boot Device (1): DVD
Boot Device (2): HardDisk
Boot Device (3): Not Assigned
Boot Device (4): Not Assigned
ACPI: on
IOAPIC: on
PAE: on
Time offset: 0 ms
Hardw. virt.ext: on
Hardw. virt.ext exclusive: off
Nested Paging: on
VT-x VPID: on
State: powered off (since 2010-04-30T12:21:39.000000000)
Monitor count: 1
3D Acceleration: off
2D Video Acceleration: off
Teleporter Enabled: off
Teleporter Port: 0
Teleporter Address:
Teleporter Password:
Storage Controller Name (0): Controlador IDE
Storage Controller Type (0): PIIX4
Storage Controller Instance Number (0): 0
Storage Controller Max Port Count (0): 2
Storage Controller Port Count (0): 2
Storage Controller Name (1): Controlador de disquete
Storage Controller Type (1): I82078
Storage Controller Instance Number (1): 0
Storage Controller Max Port Count (1): 1
Storage Controller Port Count (1): 1
Controlador IDE (0, 0): /Users/itily/Library/VirtualBox/HardDisks/SafeChildren Appliance.vdi (UUID: 007e4925-cf11-426b-9b78-385878feb2f1)
Controlador IDE (1, 0): Empty
Controlador de disquete (0, 0): Empty
NIC 1: MAC: 080027831CA3, Attachment: Bridged Interface 'en0: Ethernet', Cable connected: on, Trace: off (file: none), Type: 82540EM, Reported speed: 0 Mbps
NIC 2: MAC: 080027B5E8FD, Attachment: Bridged Interface 'en0: Ethernet', Cable connected: on, Trace: off (file: none), Type: 82540EM, Reported speed: 0 Mbps
NIC 3: MAC: 080027CB82E5, Attachment: Bridged Interface 'en0: Ethernet', Cable connected: on, Trace: off (file: none), Type: 82540EM, Reported speed: 0 Mbps
NIC 4: MAC: 080027E447C8, Attachment: Bridged Interface 'en0: Ethernet', Cable connected: on, Trace: off (file: none), Type: 82540EM, Reported speed: 0 Mbps
NIC 5: MAC: 0800277292EE, Attachment: Bridged Interface 'en0: Ethernet', Cable connected: on, Trace: off (file: none), Type: 82540EM, Reported speed: 0 Mbps
NIC 6: MAC: 080027B8D241, Attachment: Bridged Interface 'en0: Ethernet', Cable connected: on, Trace: off (file: none), Type: 82540EM, Reported speed: 0 Mbps
NIC 7: disabled
NIC 8: disabled
UART 1: disabled
UART 2: disabled
Audio: disabled
Clipboard Mode: Bidirectional
VRDP: disabled
USB: disabled
USB Device Filters:
Shared folders:
Guest:
Statistics update: disabled
Como vemos, tiene soporte hasta NIC 8 -como ya hemos comentado- pero no podremos gestionarlas desde el interface gráfico. Ahora si queremos añadir una nueva tarjeta virtual haciendo bridge sobre la tarjeta física en0 haremos lo siguiente:
$ ./VBoxManage modifyvm "SafeChildren Appliance" --nic7 bridged --cableconnected7 on --nictype7 82540EM --macaddress7 auto --bridgeadapter7 'en0: Ethernet'
Sun VirtualBox Command Line Management Interface Version 3.1.6
(C) 2005-2010 Sun Microsystems, Inc.
All rights reserved.
Si ahora volvemos a mostrar la configuración de la máquina veremos cómo ya tenemos activada la nueva tarjeta NIC 7 -he dejado sólo la parte de las NICs-
$ ./VBoxManage showvminfo "SafeChildren Appliance"
Sun VirtualBox Command Line Management Interface Version 3.1.6
(C) 2005-2010 Sun Microsystems, Inc.
All rights reserved.
NIC 1: MAC: 080027831CA3, Attachment: Bridged Interface 'en0: Ethernet', Cable connected: on, Trace: off (file: none), Type: 82540EM, Reported speed: 0 Mbps
NIC 2: MAC: 080027B5E8FD, Attachment: Bridged Interface 'en0: Ethernet', Cable connected: on, Trace: off (file: none), Type: 82540EM, Reported speed: 0 Mbps
NIC 3: MAC: 080027CB82E5, Attachment: Bridged Interface 'en0: Ethernet', Cable connected: on, Trace: off (file: none), Type: 82540EM, Reported speed: 0 Mbps
NIC 4: MAC: 080027E447C8, Attachment: Bridged Interface 'en0: Ethernet', Cable connected: on, Trace: off (file: none), Type: 82540EM, Reported speed: 0 Mbps
NIC 5: MAC: 0800277292EE, Attachment: Bridged Interface 'en0: Ethernet', Cable connected: on, Trace: off (file: none), Type: 82540EM, Reported speed: 0 Mbps
NIC 6: MAC: 080027B8D241, Attachment: Bridged Interface 'en0: Ethernet', Cable connected: on, Trace: off (file: none), Type: 82540EM, Reported speed: 0 Mbps
NIC 7: MAC: 080027EC1471, Attachment: Bridged Interface 'en0: Ethernet', Cable connected: on, Trace: off (file: none), Type: 82540EM, Reported speed: 0 Mbps
NIC 8: disabled
Por último, si queremos deshabilitar una tarjeta, deberemos indicar el tipo <none>, por ejemplo:
$ ./VBoxManage modifyvm "SafeChildren Appliance" --nic7 none
Sun VirtualBox Command Line Management Interface Version 3.1.6
(C) 2005-2010 Sun Microsystems, Inc.
All rights reserved.
$ ./VBoxManage showvminfo "SafeChildren Appliance"
Sun VirtualBox Command Line Management Interface Version 3.1.6
(C) 2005-2010 Sun Microsystems, Inc.
All rights reserved.
NIC 1: MAC: 080027831CA3, Attachment: Bridged Interface 'en0: Ethernet', Cable connected: on, Trace: off (file: none), Type: 82540EM, Reported speed: 0 Mbps
NIC 2: MAC: 080027B5E8FD, Attachment: Bridged Interface 'en0: Ethernet', Cable connected: on, Trace: off (file: none), Type: 82540EM, Reported speed: 0 Mbps
NIC 3: MAC: 080027CB82E5, Attachment: Bridged Interface 'en0: Ethernet', Cable connected: on, Trace: off (file: none), Type: 82540EM, Reported speed: 0 Mbps
NIC 4: MAC: 080027E447C8, Attachment: Bridged Interface 'en0: Ethernet', Cable connected: on, Trace: off (file: none), Type: 82540EM, Reported speed: 0 Mbps
NIC 5: MAC: 0800277292EE, Attachment: Bridged Interface 'en0: Ethernet', Cable connected: on, Trace: off (file: none), Type: 82540EM, Reported speed: 0 Mbps
NIC 6: MAC: 080027B8D241, Attachment: Bridged Interface 'en0: Ethernet', Cable connected: on, Trace: off (file: none), Type: 82540EM, Reported speed: 0 Mbps
NIC 7: disabled
NIC 8: disabled
(C) 2005-2010 Sun Microsystems, Inc.
All rights reserved.
$ ./VBoxManage showvminfo "SafeChildren Appliance"
Sun VirtualBox Command Line Management Interface Version 3.1.6
(C) 2005-2010 Sun Microsystems, Inc.
All rights reserved.
NIC 1: MAC: 080027831CA3, Attachment: Bridged Interface 'en0: Ethernet', Cable connected: on, Trace: off (file: none), Type: 82540EM, Reported speed: 0 Mbps
NIC 2: MAC: 080027B5E8FD, Attachment: Bridged Interface 'en0: Ethernet', Cable connected: on, Trace: off (file: none), Type: 82540EM, Reported speed: 0 Mbps
NIC 3: MAC: 080027CB82E5, Attachment: Bridged Interface 'en0: Ethernet', Cable connected: on, Trace: off (file: none), Type: 82540EM, Reported speed: 0 Mbps
NIC 4: MAC: 080027E447C8, Attachment: Bridged Interface 'en0: Ethernet', Cable connected: on, Trace: off (file: none), Type: 82540EM, Reported speed: 0 Mbps
NIC 5: MAC: 0800277292EE, Attachment: Bridged Interface 'en0: Ethernet', Cable connected: on, Trace: off (file: none), Type: 82540EM, Reported speed: 0 Mbps
NIC 6: MAC: 080027B8D241, Attachment: Bridged Interface 'en0: Ethernet', Cable connected: on, Trace: off (file: none), Type: 82540EM, Reported speed: 0 Mbps
NIC 7: disabled
NIC 8: disabled
Conclusiones
La potencia del CLI de <VirtualBox> nos permite no sólo cambiar configuraciones, sino gestionar por completo la máquina virtual. Esto, es de gran ayuda cuando no contamos con acceso al X11.
Referencias
No hay comentarios:
Publicar un comentario