5  Virtual  storage  Limits  are  configured  through  VBoxManage.  The  example  below  creates  a  bandwidth  group  named  “Limit”,  sets  the  limit  to  20  MB/s  and  assigns  the  group  to  the  attached  disks  of  the  VM:  VBoxManage  bandwidthctl  "VM  name"  --name  Limit  --add  disk  --limit  20  VBoxManage  storageattach  "VM  name"  --controller  "SATA"  --port  0  --device  0  --type  hdd  --medium  disk1.vdi  --bandwidthgroup  Limit  VBoxManage  storageattach  "VM  name"  --controller  "SATA"  --port  1  --device  0  --type  hdd  --medium  disk2.vdi  --bandwidthgroup  Limit  All  disks  in  a  group  share  the  bandwidth  limit,  meaning  that  in  the  example  above  the  band-  width  of  both  images  combined  can  never  exceed  20  MB/s.  However  if  one  disk  doesn’t  require  bandwidth  the  other  can  use  the  remaining  bandwidth  of  its  group.  The  limits  for  each  group  can  be  changed  while  the  VM  is  running,  with  changes  being  picked  up  immediately.  The  example  below  changes  the  limit  for  the  group  created  in  the  example  above  to  10  MB/s:  VBoxManage  bandwidthctl  "VM  name"  --name  Limit  --limit  10  5.9  CD/DVD  support  The  virtual  CD/DVD  drive(s)  by  default  support  only  reading.  The  medium  configuration  is  changeable  at  runtime.  You  can  select  between  three  options  to  provide  the  medium  data:  •  Host  Drive  defines  that  the  guest  can  read  from  the  medium  in  the  host  drive.  •  Image  file  (typically  an  ISO  file)  gives  the  guest  read-only  access  to  the  data  in  the  image.  •  Empty  stands  for  a  drive  without  an  inserted  medium.  Changing  between  the  above,  or  changing  a  medium  in  the  host  drive  that  is  accessed  by  a  machine,  or  changing  an  image  file  will  signal  a  medium  change  to  the  guest  operating  system,  which  can  then  react  to  the  change  (e.g.  by  starting  an  installation  program).  Medium  changes  can  be  prevented  by  the  guest,  and  VirtualBox  reflects  that  by  locking  the  host  drive  if  appropriate.  You  can  force  a  medium  removal  in  such  situations  via  the  VirtualBox  GUI  or  the  VBoxManage  command  line  tool.  Effectively  this  is  the  equivalent  of  the  emergency  eject  which  many  CD/DVD  drives  provide,  with  all  associated  side  effects:  the  guest  OS  can  issue  error  messages,  just  like  on  real  hardware,  and  guest  applications  may  misbehave.  Use  this  with  caution.  Note:  The  identification  string  of  the  drive  provided  to  the  guest  (which,  in  the  guest,  would  be  displayed  by  configuration  tools  such  as  the  Windows  Device  Manager)  is  always  “VBOX  CD-ROM”,  irrespective  of  the  current  configuration  of  the  virtual  drive.  This  is  to  prevent  hardware  detection  from  being  triggered  in  the  guest  operating  sys-  tem  every  time  the  configuration  is  changed.  The  standard  CD/DVD  emulation  allows  for  reading  standard  data  CD  and  DVD  formats  only.  As  an  experimental  feature,  for  additional  capabilities,  it  is  possible  to  give  the  guest  direct  access  to  the  CD/DVD  host  drive  by  enabling  “passthrough”  mode.  Depending  on  the  host  hardware,  this  may  enable  three  things  to  work,  potentially:  •  CD/DVD  writing  from  within  the  guest,  if  the  host  DVD  drive  is  a  CD/DVD  writer  •  playing  audio  CDs  •  playing  encrypted  DVDs.  81  
Purchased from Demo (abedemo.tizrapublisher.com) for the exclusive use of unknown. © 2025 Demo. Please report unauthorized use to pirate@tizra.com
            











































































































































































































































































