28
An empty VM CD/DVD drive means that the VM is attached to neither an ISO image nor a physical CD/DVD
mounted via the XenServer host. Further, it requires that the VM not be attached to any physical CD/DVD drive
on the XenServer host at all.
To empty the CD/DVD drive of a VM using the xe CLI:
1. Identify which VMs do not have empty CD/DVD drives by entering the following:
xe vbd-list type=CD empty=false
This returns a list of all the VM CD/DVD drives that are not empty, for example:
uuid ( RO) : abae3997-39af-2764-04a1-ffc501d132d9
vm-uuid ( RO): 340a8b49-866e-b27c-99d1-fb41457344d9
vm-name-label ( RO): VM02_DemoLinux
vdi-uuid ( RO): a14b0345-b20a-4027-a233-7cbd1e005ede
empty ( RO): false
device ( RO): xvdd
uuid ( RO) : ec174a21-452f-7fd8-c02b-86370fa0f654
vm-uuid ( RO): db80f319-016d-0e5f-d8db-3a6565256c71
vm-name-label ( RO): VM01_DemoLinux
vdi-uuid ( RO): a14b0345-b20a-4027-a233-7cbd1e005ede
empty ( RO): false
device ( RO): xvdd
Note the uuid, which is the first item in the list.
2. To empty the CD/DVD drives of the VMs listed, enter the following:
xe vbd-eject uuid=<uuid>
7.2.2. Upgrading a Single XenServer Host Using the xe CLI
To upgrade a single XenServer host using the xe CLI:
1. Disable the XenServer host that you wish to upgrade by entering the following:
xe host-disable <host-selector>=<host_selector_value>
When a XenServer host is disabled, VMs can neither be created nor started on that host. VMs also cannot
be migrated to a disabled host.
2. Shut down or suspend any VMs running on the host that you wish to upgrade by using the xe vm-shutdown
or xe vm-suspend commands.
3. Shut down the host by using the xe host-shutdown command.
4. Follow the XenServer installation procedure (see Chapter 3, Installing XenServer and XenCenter) until the
installer offers you the option to upgrade. Choose to upgrade.
Warning:
Be absolutely sure to select the upgrade option so as to avoid losing any existing data.
You will not be required to re-enter any settings during the setup procedure. The upgrade process follows the
first-time installation process but several setup steps are bypassed, and the existing settings for networking
configuration, system time, and so on are retained.
Once your host restarts, normal service is restored after a few minutes.
5. Restart any shutdown VMs, and/or resume any suspended VMs.