此内容没有您所选择的语言版本。

10.3. Working With Your Virtual Systems


Once you have set up your virtual system, you can then manage and customize them via various methods, including connecting via SSH and via the virtualization management interface on the host system.

10.3.1. Logging into Virtual Systems Directly via SSH

  1. You will need to locate the virtual system's IP address. Locate it by navigating to the SystemsVirtual Systems tab and clicking on the virtual system's profile name.
  2. On the virtual system's profile page, you'll find the IP address in the left-hand informational column in the IP Address field.
  3. Connect to the IP address by using ssh as root, using the password you set for the virtual system in the kickstart profile you created for it earlier.

10.3.2. Gaining Console Access Via the Host

  1. First you will need to connect to the host system and determine the ID number of the guest you would like to work with. Connect to the host system via ssh and run the following command:
    xm list
    
    Copy to Clipboard Toggle word wrap
    This should provide you with a list all of the guests you created on your Satellite, including their ID number. look for the guest, guest1, that we created earlier in this list. If, for example, this guest has been assigned an ID of 2, then:
  2. Run the following command to access the console of this virtual system:
    xm console 2
    
    Copy to Clipboard Toggle word wrap
    You should immediately be able to view a login prompt on guest1.
  3. Login to guest1 as root using the same password you set in the kickstart profile you used to provision the system.
    (There may be some messages on the screen. In this case, hit the Enter key on your keyboard to receive a fresh login prompt.)
  4. To exit the guest console and return to the host system's command prompt, you may hit the Ctrl and ] keys on your keyboard simultaneously.

10.3.3. Installing Software Via the Satellite Web Interface

  1. Browse to the virtual system's profile in your Satellite's web interface by logging in and navigating to SystemsSystemsVirtual Systems and clicking on the name of your virtual system's profile.
  2. In the virtual system's profile, click on the SoftwarePackages tab.
  3. Click on Install New Packages in the Packages tab menu.
  4. Select the packages you wish to install and click the Install Selected Packages button in the lower right-hand corner of the screen.
  5. Review the package install details and click on the Confirm button in the lower right-hand corner of the screen.
  6. The package install will take place the next time the guest system checks in with the Satellite. To force the install to take place immediately, you may run the rhn_check command on the guest system.

10.3.4. Installing Software Via Yum From the Virtual System

Your virtual system registered to your Satellite as part of the guest provisioning process, so you may simply use the yum command to install and update software. For example, to install the text editor vim, issue the following command:
yum install -y vim-enhanced
Copy to Clipboard Toggle word wrap

10.3.5. Restarting Guests when Host Reboots

By default, when a host system reboots, the guests are not restarted and must be manually started by the administrator.
However, the rhn-virtualization-host service can restart guests automatically in the event of a host system reboot.
To use this service, follow these steps:
  1. Locate the guest's config file on the host in /etc/sysconfig/rhn/virt/. It will be named by UUID, but the correct file can be found by using the grep command to search for the guest name within the UUID files.
  2. When you have found the UUID file corresponding to your guest system, create a symbolic link from the UUID file to the /etc/sysconfig/rhn/virt/auto/ directory.
    ln -s /etc/sysconfig/rhn/virt/GUEST_UUID.xml /etc/sysconfig/rhn/virt/auto/
    
    Copy to Clipboard Toggle word wrap

10.3.6. Deleting Virtual Systems

Deleting a virtual system is a multi-step process.
  1. First you must shut down the virtual system that you wish to delete. You may do this by browsing to the host system's profile in the Satellite web interface, clicking on the virtualization tab, and checking off the virtual systems that you would like to delete. Finish shutting down by clicking the Shutdown Systems button at the bottom of the screen.
  2. Next, delete the virtual system from Satellite. This is accomplished by checking off the virtual system's checkbox and clicking the Delete System button at the bottom of the screen>

    Note

    Please allow for at least two minutes between shutting down a virtual system and deleting it. Otherwise, the virtual system may not shut down properly and you will delete it while it is running. If you delete a virtual system from Satellite while it is running, it will reappear on the Satellite the next time it checks in. If this happens, simply shutdown the system, wait two minutes, and delete it again.
  3. Delete the disk image for the virtual system you would like to delete. You will find the disk image for guest1, for example, at the following location on the host system:
    /var/lib/xen/disk-images/guest1.disk
    
    Copy to Clipboard Toggle word wrap
    Delete it with the following command:
    rm /var/lib/xen/disk-images/guest1.disk
    
    Copy to Clipboard Toggle word wrap
  4. Finally, you must delete the RHN configuration files from the host system. To locate the RHN configuration file for guest1, run the following command:
    grep guest1 /etc/sysconfig/rhn/virt/*.xml
    
    Copy to Clipboard Toggle word wrap
    Then delete the file indicated. For example:
    rm /etc/sysconfig/rhn/virt/14e5cfbf72342515236ad74b260c2f6b.xml
    
    Copy to Clipboard Toggle word wrap
  5. You have successfully deleted a guest system from your host system and from Satellite.
返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2025 Red Hat