User Tools

Site Tools


unix:virtualization:virtlib:quickreference

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
unix:virtualization:virtlib:quickreference [2022/10/31 23:12] – c/libvirt/ rodolicounix:virtualization:virtlib:quickreference [2025/07/27 16:34] (current) rodolico
Line 32: Line 32:
       * This will attach a new bridge to domain //domain//, using //bridge// defined on hypervisor, called vnet3 on the virtual, with the mac address set to whatever you use.       * This will attach a new bridge to domain //domain//, using //bridge// defined on hypervisor, called vnet3 on the virtual, with the mac address set to whatever you use.
     * detach-interface //domain// --type bridge --mac 00:16:3e:xx:xx:xx --config     * detach-interface //domain// --type bridge --mac 00:16:3e:xx:xx:xx --config
 +  * Attach/Detach Block Device
 +    * <code bash>virsh detach-disk router sda --config
 +    * <code bash>virsh attach-disk router /dev/vg/lvname sda --config --targetbus=virtio
   * Remove virtual image (config file only)<code bash> virsh undefine domainname</code>   * Remove virtual image (config file only)<code bash> virsh undefine domainname</code>
   * **change-media //name// //drive//** - Insert or Eject a CDROM   * **change-media //name// //drive//** - Insert or Eject a CDROM
-    * change-media //name// //drive// --eject +    * <code bash>virsh change-media domainname driveletter --eject</code> 
-    * change-media //name// //drive// //path/to/image// --insert+    * <code bash>virsh change-media domainname driveletter /path/to/image/ --insert</code> 
 +  * Rename Domain 
 +    * <code bash>virsh shutdown domainname ; virsh domrename domainname newname ; virsh start newname</code>
  
 ==== Boot from CD ROM ==== ==== Boot from CD ROM ====
Line 272: Line 277:
  
 You can now do things like <code bash>ifconfig dom113</code> or <code bash>ip a show dom113</code> You can now do things like <code bash>ifconfig dom113</code> or <code bash>ip a show dom113</code>
 +
 +===== Adding USB Drive Image =====
 +
 +Building and using a USB Thumbdrive image is a little weird, but it can be done. See [[software:multibootusb|]] for an example of one way I did it.
  
 ===== Links ===== ===== Links =====
unix/virtualization/virtlib/quickreference.1667275950.txt.gz · Last modified: 2022/10/31 23:12 by rodolico