Sub topic 3
Sizing Host Resources and Choosing Virtualization Options
Assume you know basic CPU, RAM, storage, IP address, and LAN terms. This chapter focuses on choosing settings and resources for a virtual machine (VM), a software computer that runs inside a physical computer.
Sizing Host Resources for Virtual Machines
The host is the physical PC. The guest is the operating system inside the VM. The host must provide enough resources for both itself and each guest.
- CPU: Assign virtual processors, or vCPUs, according to the guest workload. Do not assign every host core. The host needs CPU time too.
- RAM: Reserve enough memory for the guest while leaving sufficient RAM for the host. Too much assigned RAM can make the entire PC slow.
- Storage: Use fast storage for the VM files. Leave free space for the guest operating system, applications, updates, and virtual memory.
- Hardware support: The CPU should support hardware virtualization, such as Intel VT-x or AMD-V. Virtualization must also be enabled in BIOS/UEFI.
| Workload | Resource approach |
|---|---|
| Basic Linux test VM | A small number of vCPUs, moderate RAM, and a dynamically expanding virtual disk |
| Database or build server | More CPU, RAM, and fast storage, with capacity reserved for the host |
Virtual Network Modes
A VM's virtual network adapter connects through a software switch. The mode controls what the guest can reach.
- NAT: The guest reaches external networks through the host. This is convenient and usually hides the guest from inbound LAN connections.
- Bridged: The guest appears as a separate device on the physical LAN and receives its own network identity.
- Host-only: The guest communicates with the host and other host-only guests, but normally not the physical LAN or internet.
- Internal: Guests communicate with each other on an isolated virtual network. The host normally cannot access it.
Security and Isolation of Virtual Machines
A VM is isolated by the hypervisor, but isolation is not absolute. Keep the guest patched, use antivirus where appropriate, and avoid sharing host folders or devices unless needed. Treat bridged guests as normal LAN computers. Use host-only or internal networking for malware analysis and other contained tests, but do not assume containment is perfect.
> callout warning > A VM can still expose data through shared folders, clipboard integration, USB passthrough, or vulnerable virtualization software.
Virtual Desktop Infrastructure
Virtual desktop infrastructure (VDI) hosts users' desktop VMs in a data center or cloud. Users connect through thin clients or ordinary PCs. VDI centralizes updates and data, but it requires reliable network access, server capacity, and storage. It is useful when an organization needs standardized desktops or centralized administration.
Emulators and Containers Compared with Virtual Machines
An emulator imitates different hardware or a different CPU architecture. It supports software built for that target but can be slower.
A container isolates an application and its dependencies while sharing the host operating system kernel. Containers start quickly and use fewer resources, but they do not provide the same operating-system isolation as a full VM.
A VM virtualizes hardware and can run a different complete operating system.
Putting It Together: Scenario Questions
Choose based on reachability, isolation, and workload:
- Need internet access without a separate LAN address: NAT.
- Need the guest to act as a LAN server: bridged.
- Need host-to-guest testing without LAN exposure: host-only.
- Need several guests to communicate privately: internal.
- Need to run one Linux application efficiently: container.
- Need to test another operating system: VM.
Exercise
A technician must test an untrusted application while preventing it from reaching the company LAN. Which network mode is the best starting choice?
Show answer
Use host-only or internal networking, with internal networking providing the stronger separation from the host.